From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Cc: Alexander Graf <alex@csgraf.de>,
	The OpenBIOS Mailinglist <openbios@openbios.org>,
	Laurent Vivier <laurent@lvivier.info>
Subject: Re: [Qemu-devel] Re: [OpenBIOS] QEMU OpenBIOS booting?
Date: Mon, 20 Apr 2009 04:15:30 +0400 (MSD)	[thread overview]
Message-ID: <Pine.LNX.4.64.0904200413360.2512@linmac.oyster.ru> (raw)
In-Reply-To: <f488382f0904191536r65778953x767e54d8c0aad8e0@mail.gmail.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 3445 bytes --]
On Sun, 19 Apr 2009, Steven Noonan wrote:
> On Sun, Apr 19, 2009 at 3:28 PM, Steven Noonan <steven@uplinklabs.net> wrote:
> > On Sun, Apr 19, 2009 at 2:32 PM, Steven Noonan <steven@uplinklabs.net> wrote:
> >> On Sun, Apr 19, 2009 at 2:02 PM, Steven Noonan <steven@uplinklabs.net> wrote:
> >>> On Sun, Apr 19, 2009 at 1:48 PM, Laurent Vivier <Laurent@vivier.eu> wrote:
> >>>> Le dimanche 19 avril 2009 ? 13:33 -0700, Steven Noonan a ?crit :
> >>>>> On Sun, Apr 19, 2009 at 1:24 PM, Laurent Vivier <Laurent@vivier.eu> wrote:
> >>>>> > Le dimanche 19 avril 2009 ? 13:14 -0700, Steven Noonan a ?crit :
> >>>>> > The problem is in OpenBios: I put some structures in memory without
> >>>>> > knowing this... but this is not part of openfirmware specification.
[..snip..]
> >>
> >>        diff --git a/arch/ppc/qemu/ldscript b/arch/ppc/qemu/ldscript
> >>        index 66fcbcd..8fdf654 100644
> >>        --- a/arch/ppc/qemu/ldscript
> >>        +++ b/arch/ppc/qemu/ldscript
> >>        @@ -3,15 +3,15 @@ OUTPUT_ARCH(powerpc)
> >>
> >>         /* Initial load address
> >>          */
> >>        -BASE_ADDR = 0xfff00000;
> >>        +BASE_ADDR = 0x06800000;
> >>
> >>        -/* As NVRAM is at 0xfff04000, the .text needs to be after that
> >>        +/* As NVRAM is at 0x06804000, the .text needs to be after that
> >>          */
> >>        -TEXT_ADDR = 0xfff08000;
> >>        +TEXT_ADDR = 0x06808000;
> >>
> >>         /* Hard reset vector address
> >>          */
> >>        -HRESET_ADDR = 0xfffffffc;
> >>        +HRESET_ADDR = 0x06ffffff;
> >>
> >>         CSTACK_SIZE = 32768;   /* client stack size */
> >
> > With the above numbers, I get linker problems:
> >
> > target/arch/ppc/qemu/start.o: In function `vector__0x300':
> > (.text.vectors+0x384): relocation truncated to fit: R_PPC_ADDR24
> > against `.text.vectors'+c
> > target/arch/ppc/qemu/start.o: In function `vector__0x400':
> > (.text.vectors+0x484): relocation truncated to fit: R_PPC_ADDR24
> > against `.text.vectors'+c
> >
> > I don't see why it'd do that.
> >
> 
> 
> What the hell? Why would this change resolve it?
> 
> 	diff --git a/arch/ppc/qemu/start.S b/arch/ppc/qemu/start.S
> 	index 66df9a2..108fd9b 100644
> 	--- a/arch/ppc/qemu/start.S
> 	+++ b/arch/ppc/qemu/start.S
> 	@@ -206,7 +206,7 @@ VECTOR( 0x300, "DSI" ):
> 	        addi    r3,r3,LO(dsi_exception)
> 	        mtctr   r3
> 	        bctrl
> 	-       ba      exception_return
> 	+       b       exception_return
> 	
Because exception_return's address (now near 0x06808000) doesn't fit
into 26 bit sign extended AA field.
> 	 VECTOR( 0x400, "ISI" ):
> 	        EXCEPTION_PREAMBLE
> 	@@ -214,7 +214,7 @@ VECTOR( 0x400, "ISI" ):
> 	        addi    r3,r3,LO(isi_exception)
> 	        mtctr   r3
> 	        bctrl
> 	-       ba      exception_return
> 	+       b       exception_return
> 	
> 	        ILLEGAL_VECTOR( 0x500 )
> 	        ILLEGAL_VECTOR( 0x600 )
> 
> 
> >>
> >> The only issue with doing things this way is now to figure out what to
> >> change this to:
> >>
> >> #define FREE_BASE               0x00004000
> >>
> >> My first thought was to utilize all 8MB of the space that Apple says
> >> we can have, and use any space after the OpenBIOS image. My second
> >> thought was: how do we know where the OpenBIOS executable image ends?
> >>
> >> Any ideas?
> >>
> >
> 
> 
-- 
mailto:av1474@comtv.ru
next prev parent reply	other threads:[~2009-04-20  0:16 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f488382f0904111806i64421ff8t68e6d34aa2990f3a@mail.gmail.com>
     [not found] ` <1239525550.5516.3.camel@Quad>
     [not found]   ` <f488382f0904142246ga431e99obe666b7fb16adb02@mail.gmail.com>
     [not found]     ` <f488382f0904190050x1d6e9562sf000e9e9763735b7@mail.gmail.com>
2009-04-19  8:03       ` [Qemu-devel] Re: [OpenBIOS] QEMU OpenBIOS booting? Andreas Färber
2009-04-19  8:28         ` Steven Noonan
2009-04-19  9:44           ` Andreas Färber
2009-04-19 17:47           ` M. Warner Losh
2009-04-19 17:56             ` Steven Noonan
2009-04-19 18:44             ` Blue Swirl
2009-04-19 23:18               ` M. Warner Losh
2009-04-20 19:39                 ` Blue Swirl
2009-04-20 21:01                   ` François Revol
2009-04-20 22:15                   ` [OpenBIOS] [Qemu-devel] " Laurent Vivier
2009-04-19  8:31         ` [Qemu-devel] Re: [OpenBIOS] " Laurent Vivier
2009-05-20 13:51           ` Dave Willoughby
2009-05-20 14:14             ` Alexander Graf
     [not found]       ` <1240129450.5671.7.camel@Quad>
2009-04-19 18:59         ` [Qemu-devel] " Steven Noonan
2009-04-19 19:23           ` [Qemu-devel] Re: [OpenBIOS] " Blue Swirl
2009-04-19 20:00             ` Steven Noonan
2009-04-19 20:08               ` Laurent Vivier
2009-04-19 20:14                 ` Steven Noonan
2009-04-19 20:24                   ` Laurent Vivier
2009-04-19 20:33                     ` Steven Noonan
2009-04-19 20:48                       ` Laurent Vivier
2009-04-19 21:02                         ` Steven Noonan
2009-04-19 21:32                           ` Steven Noonan
2009-04-19 22:28                             ` Steven Noonan
2009-04-19 22:36                               ` Steven Noonan
2009-04-20  0:15                                 ` malc [this message]
2009-04-20  3:27                                 ` Steven Noonan
2009-04-20  3:50                                   ` Steven Noonan
2009-04-26  8:13                                     ` Alexander Graf
2009-04-19 19:47           ` Laurent Vivier
2009-04-19 19:53             ` Steven Noonan
2009-04-19 20:01             ` Steven Noonan
2009-04-19 20:21               ` Laurent Vivier
2009-04-19 20:23                 ` Steven Noonan
2009-04-19 20:29                   ` Laurent Vivier
2009-04-20  9:39 Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=Pine.LNX.4.64.0904200413360.2512@linmac.oyster.ru \
    --to=av1474@comtv.ru \
    --cc=alex@csgraf.de \
    --cc=laurent@lvivier.info \
    --cc=openbios@openbios.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).