linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* modifying boot loader
@ 1999-03-29 21:48 Dave Weis
  1999-03-29 23:36 ` David Edelsohn
  0 siblings, 1 reply; 13+ messages in thread
From: Dave Weis @ 1999-03-29 21:48 UTC (permalink / raw)
  To: linuxppc-dev



hello

i'm trying to modify the coffboot loader to produce an object file that
looks like the one below:

Disassembly of section .text:

00000000 <pin_obj_start>:
       0:       00 00 00 00     .long 0x0
       4:       ba df ca 11     lm      r22,-13807(r31)
        ...

00000024 <start>:
      24:       code here..............

What would the magic incantation be? I have modified LD_ARGS in the
makefile to be
LD_ARGS = -e _start -T ld.script -Ttext 0 -Tdata 10000 -Bstatic

which gives me this header

Disassembly of section .text:

00000000 <_start>:
       0:       00 00 00 0c     .long 0xc
        ...

0000000c <__start>:
       c:       3d 20 00 00     liu     r9,0
      10:       3d 00 00 00     liu     r8,0
      14:       39 08 5c a4     cal     r8,23716(r8)
      18:       7c 00 48 ac     .long 0x7c0048ac
      1c:       7c 00 4f ac     .long 0x7c004fac
      20:       39 29 00 20     cal     r9,32(r9)
      24:       28 09 00 08     cmpli   0,r9,8
      28:       41 80 ff f0     blt     18 <__start+0xc>
      2c:       48 00 00 04     b       30 <start>

00000030 <start>:
      30:       7c 2c 0b 78     mr      r12,r1
      34:       38 21 ff e0     cal     r1,-32(r1)


Also, does anyone know off-hand what the two constants at 0x18 and 0x1c
are?

Thanks for any help

djweis

-- 
David Weis                | 10520 New York Ave, Des Moines, IA 50322
djweis@plconline.com      | Voice 515-278-0133 Ext 231
http://www.plconline.com/ | "Great spirits will always encounter violent
                          | opposition from mediocre minds" - Einstein


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: modifying boot loader
  1999-03-29 21:48 modifying boot loader Dave Weis
@ 1999-03-29 23:36 ` David Edelsohn
  1999-03-29 23:38   ` Dave Weis
  0 siblings, 1 reply; 13+ messages in thread
From: David Edelsohn @ 1999-03-29 23:36 UTC (permalink / raw)
  To: Dave Weis; +Cc: linuxppc-dev


	What are you actually trying to accomplish?  The values at
pin_obj_start are not magic numbers or instructions but user-friendly
values mapped at address 0.  It is trying to map values 0x0 and 0XBADFCA11
(bad function call) so that dereferencing a data pointer or a PowerOpen
ABI function pointer at address zero (0) will produce a visual clue.  This
is produced by assembly like:

addr0:
       .long   0
       .long   0xBADFCA11

And you make the linker map label addr0 at physical address 0.

David

[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: modifying boot loader
  1999-03-29 23:36 ` David Edelsohn
@ 1999-03-29 23:38   ` Dave Weis
  1999-03-29 23:49     ` David Edelsohn
  0 siblings, 1 reply; 13+ messages in thread
From: Dave Weis @ 1999-03-29 23:38 UTC (permalink / raw)
  To: David Edelsohn; +Cc: linuxppc-dev



> 	What are you actually trying to accomplish?  The values at

linuxppc on a mca based rs6000. any pointers? :-) i have figured out that
when you hit start on the kernel, either r3 or r4 will point to an ipl_cb.
can you disclose if the boot loader looks for the symbol named start or
address 0x24?

> pin_obj_start are not magic numbers or instructions but user-friendly
> values mapped at address 0.  It is trying to map values 0x0 and 0XBADFCA11

duh. that code didn't really seem to make much sense. thanks for the
enlightenment.

> (bad function call) so that dereferencing a data pointer or a PowerOpen
> ABI function pointer at address zero (0) will produce a visual clue.  This
> is produced by assembly like:
> 
> addr0:
>        .long   0
>        .long   0xBADFCA11
> 
> And you make the linker map label addr0 at physical address 0.

Cool. Project #1 tomorrow.

Thanks

dave

-- 
David Weis                | 10520 New York Ave, Des Moines, IA 50322
djweis@plconline.com      | Voice 515-278-0133 Ext 231
http://www.plconline.com/ | "Great spirits will always encounter violent
                          | opposition from mediocre minds" - Einstein


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: modifying boot loader
  1999-03-29 23:38   ` Dave Weis
@ 1999-03-29 23:49     ` David Edelsohn
  1999-03-30  3:05       ` Dave Weis
  0 siblings, 1 reply; 13+ messages in thread
From: David Edelsohn @ 1999-03-29 23:49 UTC (permalink / raw)
  To: Dave Weis; +Cc: linuxppc-dev


>>>>> Dave Weis writes:

Dave> linuxppc on a mca based rs6000. any pointers? :-) i have figured out that
Dave> when you hit start on the kernel, either r3 or r4 will point to an ipl_cb.
Dave> can you disclose if the boot loader looks for the symbol named start or
Dave> address 0x24?

	Are you sure the machine in question actually is a PowerPC system
as opposed to a POWER architecture RS/6000.  LinuxPPC will not run on
POWER architecture as LinuxPPC uses PowerPC instructions and memory
management is different.

	The pre-PREP / pre-CHRP RS/6000 loaders are extremely simplistic,
but I do not know the details.  If it understands XCOFF, then it might
look at the entry point for the "application" in the header to know the
starting address.

David


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: modifying boot loader
  1999-03-29 23:49     ` David Edelsohn
@ 1999-03-30  3:05       ` Dave Weis
  1999-03-30  4:05         ` David Edelsohn
  0 siblings, 1 reply; 13+ messages in thread
From: Dave Weis @ 1999-03-30  3:05 UTC (permalink / raw)
  To: David Edelsohn; +Cc: linuxppc-dev



On Mon, 29 Mar 1999, David Edelsohn wrote:
> >>>>> Dave Weis writes:
> Dave> linuxppc on a mca based rs6000. any pointers? :-) i have figured out that
> Dave> when you hit start on the kernel, either r3 or r4 will point to an ipl_cb.
> Dave> can you disclose if the boot loader looks for the symbol named start or
> Dave> address 0x24?
> 	Are you sure the machine in question actually is a PowerPC system
> as opposed to a POWER architecture RS/6000.  LinuxPPC will not run on
> POWER architecture as LinuxPPC uses PowerPC instructions and memory
> management is different.

It's a 7011-250, the first 601 machine. Actually I found a copy of AIXpert
online that had the announcement for the machine. 

> 	The pre-PREP / pre-CHRP RS/6000 loaders are extremely simplistic,
> but I do not know the details.  If it understands XCOFF, then it might
> look at the entry point for the "application" in the header to know the
> starting address.

I'll make it match on both counts then, 0x24 for start.
Is there some other disk based loader that does the BIST or is it totally
rom based? Also, is there any kind of command-line structure? Today I
figured out how to make a bootable floppy with my own kernel on it. I was
so happy to see the flashing 888's that showed it was mine :-)

dave

-- 
David Weis                | 10520 New York Ave, Des Moines, IA 50322
djweis@plconline.com      | Voice 515-278-0133 Ext 231
http://www.plconline.com/ | "Great spirits will always encounter violent
                          | opposition from mediocre minds" - Einstein


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: modifying boot loader
  1999-03-30  3:05       ` Dave Weis
@ 1999-03-30  4:05         ` David Edelsohn
  1999-03-30  4:25           ` Dave Weis
  1999-03-30  9:38           ` Gary Thomas
  0 siblings, 2 replies; 13+ messages in thread
From: David Edelsohn @ 1999-03-30  4:05 UTC (permalink / raw)
  To: Dave Weis; +Cc: linuxppc-dev


>>>>> Dave Weis writes:

Dave> It's a 7011-250, the first 601 machine. Actually I found a copy of AIXpert
Dave> online that had the announcement for the machine. 

      I doubt LinuxPPC will work on a 601-based machine.  The PPC601 was a
POWER architecture chip with PowerPC user instructions added. 

David

[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: modifying boot loader
  1999-03-30  4:05         ` David Edelsohn
@ 1999-03-30  4:25           ` Dave Weis
  1999-03-30  8:13             ` Gabriel Paubert
  1999-03-30  9:38           ` Gary Thomas
  1 sibling, 1 reply; 13+ messages in thread
From: Dave Weis @ 1999-03-30  4:25 UTC (permalink / raw)
  To: David Edelsohn; +Cc: linuxppc-dev



On Mon, 29 Mar 1999, David Edelsohn wrote:
>       I doubt LinuxPPC will work on a 601-based machine.  The PPC601 was a
> POWER architecture chip with PowerPC user instructions added. 

Based on what I read in the source, they are supported. I guess I'll find
out in a bit.

dave

-- 
David Weis                | 10520 New York Ave, Des Moines, IA 50322
djweis@plconline.com      | Voice 515-278-0133 Ext 231
http://www.plconline.com/ | "Great spirits will always encounter violent
                          | opposition from mediocre minds" - Einstein


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: modifying boot loader
  1999-03-30  4:25           ` Dave Weis
@ 1999-03-30  8:13             ` Gabriel Paubert
  1999-03-30 14:51               ` David A. Gatwood
  0 siblings, 1 reply; 13+ messages in thread
From: Gabriel Paubert @ 1999-03-30  8:13 UTC (permalink / raw)
  To: Dave Weis; +Cc: David Edelsohn, linuxppc-dev




On Mon, 29 Mar 1999, Dave Weis wrote:

> 
> 
> On Mon, 29 Mar 1999, David Edelsohn wrote:
> >       I doubt LinuxPPC will work on a 601-based machine.  The PPC601 was a
> > POWER architecture chip with PowerPC user instructions added. 

But with a PowerPC MMU, which is the important point.

> Based on what I read in the source, they are supported. I guess I'll find
> out in a bit.

Watch out for instructions that try to access HID0, like flushing the
caches, which is very different on 601. I remember seeing various places
(and suggesting some fixes) where accesses to HID0 were not protected with
a check of the processor type. But it was several months ago and I don't
know if all such problems have been fixed now. 

This was my $0.02 tip of the day.

	Gabriel.


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: modifying boot loader
  1999-03-30  4:05         ` David Edelsohn
  1999-03-30  4:25           ` Dave Weis
@ 1999-03-30  9:38           ` Gary Thomas
  1 sibling, 0 replies; 13+ messages in thread
From: Gary Thomas @ 1999-03-30  9:38 UTC (permalink / raw)
  To: David Edelsohn; +Cc: linuxppc-dev, Dave Weis



On 30-Mar-99 David Edelsohn wrote:
> 
>>>>>> Dave Weis writes:
> 
> Dave> It's a 7011-250, the first 601 machine. Actually I found a copy of AIXpert
> Dave> online that had the announcement for the machine. 
> 
>       I doubt LinuxPPC will work on a 601-based machine.  The PPC601 was a
> POWER architecture chip with PowerPC user instructions added. 
> 

It absolutely does work on 601 based machines!  At least this one (that I know of):
  IBM - Nobis (Sandalfoot)


------------------------------------------------------------------------
Gary Thomas                              |
email: gdt@linuxppc.org                  | "Fine wine is a necessity of
   ... opinions expressed here are mine  |        life for me"
       and no one else would claim them! |
                                         |      Thomas Jefferson
------------------------------------------------------------------------



[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: modifying boot loader
@ 1999-03-30  9:52 Andrew J Benie
  1999-03-30 14:12 ` Norman R Weathers
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew J Benie @ 1999-03-30  9:52 UTC (permalink / raw)
  To: David Edelsohn, Dave Weis; +Cc: linuxppc-dev


Hi
I would have thought that linuxPPC would work on the PowerPC 601 chip as 
that is the chip that was in the first generation PCI based powermacs 
such as the 7200. LinuxPCC definately works on the 7200 as I am currently 
running release 4 on one.

yours
Andy

Laboratory of Structural Biochemistry,
Molecular and Cellular Biology,
Division of Biomedical Sciences,
Queen Mary and Westfield College,
Mile End Road
London E1 4NS

Tel:(44) 171 982 6976
Fax:(44) 181 983 0531
Messages&Paging: 04325 397544
http://newton.biochem.bms.qmw.ac.uk/wwwfolder/people/ab.html


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: modifying boot loader
  1999-03-30  9:52 Andrew J Benie
@ 1999-03-30 14:12 ` Norman R Weathers
  0 siblings, 0 replies; 13+ messages in thread
From: Norman R Weathers @ 1999-03-30 14:12 UTC (permalink / raw)
  To: Andrew J Benie; +Cc: David Edelsohn, Dave Weis, linuxppc-dev




On Tue, 30 Mar 1999, Andrew J Benie wrote:

> 
> Hi
> I would have thought that linuxPPC would work on the PowerPC 601 chip as 
> that is the chip that was in the first generation PCI based powermacs 
> such as the 7200. LinuxPCC definately works on the 7200 as I am currently 
> running release 4 on one.

Indeed, we too have used the R4 release(kernel 2.0.30) with our Nobis
based IBM
PowerPC's.  The only problem we ever had was with the new kernels, which
at the time that we had a spare moment to try them, there were problems
with the BATs if I remember correctly (Cort, remember us from University
of Arkansas and the ****ed 601 we had?).   We haven't had time to try
recent releases of the kernel.

Norman Weathers
Technology Coordinator ETS
University of Arkansas

> 
> yours
> Andy
> 
> Laboratory of Structural Biochemistry,
> Molecular and Cellular Biology,
> Division of Biomedical Sciences,
> Queen Mary and Westfield College,
> Mile End Road
> London E1 4NS
> 
> Tel:(44) 171 982 6976
> Fax:(44) 181 983 0531
> Messages&Paging: 04325 397544
> http://newton.biochem.bms.qmw.ac.uk/wwwfolder/people/ab.html
> 
> 


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: modifying boot loader
  1999-03-30  8:13             ` Gabriel Paubert
@ 1999-03-30 14:51               ` David A. Gatwood
  1999-03-31  7:12                 ` Erik Karlberg
  0 siblings, 1 reply; 13+ messages in thread
From: David A. Gatwood @ 1999-03-30 14:51 UTC (permalink / raw)
  To: Gabriel Paubert; +Cc: Dave Weis, David Edelsohn, linuxppc-dev


On Tue, 30 Mar 1999, Gabriel Paubert wrote:

> On Mon, 29 Mar 1999, Dave Weis wrote:
> 
> > On Mon, 29 Mar 1999, David Edelsohn wrote:
> > >       I doubt LinuxPPC will work on a 601-based machine.  The PPC601 was a
> > > POWER architecture chip with PowerPC user instructions added. 

I'm not sure about the non-Mac parts of the code, but keep in mind that
the PowerMac 7500, and I think the 7200 (not sure about the 7300...) use
a PPC 601.  I haven't studied the LinuxPPC arch to see how that's
organized or how much overlap there is between the pmac-specific and the
non-pmac code, so I can't say much more than that. 


Later,
David

David A. Gatwood                         Visit globegate's internet
dgatwood@globegate.utm.edu                  talker, Deep Space 36
http://globegate.utm.edu                telnet globegate.utm.edu:9624


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: modifying boot loader
  1999-03-30 14:51               ` David A. Gatwood
@ 1999-03-31  7:12                 ` Erik Karlberg
  0 siblings, 0 replies; 13+ messages in thread
From: Erik Karlberg @ 1999-03-31  7:12 UTC (permalink / raw)
  To: David A. Gatwood; +Cc: Gabriel Paubert, Dave Weis, David Edelsohn, linuxppc-dev


On Tue, 30 Mar 1999, David A. Gatwood wrote:
> I'm not sure about the non-Mac parts of the code, but keep in mind that
> the PowerMac 7500, and I think the 7200 (not sure about the 7300...) use
> a PPC 601.  I haven't studied the LinuxPPC arch to see how that's
> organized or how much overlap there is between the pmac-specific and the
> non-pmac code, so I can't say much more than that. 

The PowerMac 7300 uses a PPC 604e...
The PowerMac 7200 uses a PPC 601 and can not be upgraded.
The PowerMac 7500 uses a PPC 601 and can be upgraded to a 604/604e.

Regards,

Erik 

-------------
flash@sdf.nu
http://sdf.nu/flash/
-------------


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~1999-03-31  7:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-03-29 21:48 modifying boot loader Dave Weis
1999-03-29 23:36 ` David Edelsohn
1999-03-29 23:38   ` Dave Weis
1999-03-29 23:49     ` David Edelsohn
1999-03-30  3:05       ` Dave Weis
1999-03-30  4:05         ` David Edelsohn
1999-03-30  4:25           ` Dave Weis
1999-03-30  8:13             ` Gabriel Paubert
1999-03-30 14:51               ` David A. Gatwood
1999-03-31  7:12                 ` Erik Karlberg
1999-03-30  9:38           ` Gary Thomas
  -- strict thread matches above, loose matches on Subject: below --
1999-03-30  9:52 Andrew J Benie
1999-03-30 14:12 ` Norman R Weathers

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).