All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryuichi Oikawa <roikawa@rr.iij4u.or.jp>
To: bh40@calva.net
Cc: linuxppc-dev@lists.linuxppc.org, paulus@cs.anu.edu.au
Subject: Re: Blue G3 and machine check
Date: Tue, 16 Mar 1999 01:42:37 +0900	[thread overview]
Message-ID: <19990316014237Y.roikawa@rr.iij4u.or.jp> (raw)
In-Reply-To: Your message of "Sun, 14 Mar 1999 14:35:58 +0100" <19990314143558.014768@mail.mipsys.com>


> While reading of macbsd mailing list, I've seen that the Blue G3 causes a
> machine check exception while probing a non-existing PCI slot. I don't
> have time to look into this and I don't have one of those machines, but
> if anyone want to give a try at fixing this...
> 
> (With luck, the second PCI bridge will have been properly setup by OF or
> BootX and this fix could be enough to get the machine to boot further
> that It's doing now).
 As far as I tested(kernel source 2.2.1 from samba and BootX 1.0.2b),
the kernel freezes within head.S before jumping to start_kernel. It seems
to completely freeze after the following instructions:

/*
 * Go back to running unmapped so we can load up new values
 * for SDR1 (hash table pointer) and the segment registers
 * and change to using our exception vectors.
 * On the 8xx, all we have to do is invalidate the TLB to clear
 * the old 8M byte TLB mappings and load the page table base register.
 */
#ifndef CONFIG_8xx
	lis	r6,_SDR1@ha
	lwz	r6,_SDR1@l(r6)
#else
	/* The right way to do this would be to track it down through
	 * init's TSS like the context switch code does, but this is
	 * easier......until someone changes init's static structures.
	 */
	lis	r6, swapper_pg_dir@h
	tophys(r6,r6,0)
	ori	r6, r6, swapper_pg_dir@l
	mtspr	M_TWB, r6
#endif
	lis	r4,2f@h
	ori	r4,r4,2f@l
	tophys(r4,r4,r3)
	li	r3,MSR_KERNEL & ~(MSR_IR|MSR_DR)
	mtspr	SRR0,r4
	mtspr	SRR1,r3
	rfi


Next, I looked into MacOS ROM file if there's a hint or somthing
and found an OF boot script:

<CHRP-BOOT>
<COMPATIBLE>
iMac,1 PowerMac1,1 PowerBook1,1
</COMPATIBLE>
<DESCRIPTION>
MacROM for NewWorld.
</DESCRIPTION>
<BOOT-SCRIPT>
here &gt;r
dev /
" model" active-package get-package-property abort" can't find MODEL"
decode-string 2swap 2drop " iMac,1" $= ?dup 0= if
 " compatible" active-package get-package-property abort" can't find COMPATIBLE"
 false &gt;r
 begin
  dup while
  decode-string here over 2swap bounds ?do
   i c@ dup [char] A [char] Z between if h# 20 xor then c,
   loop
  2dup " powermac1,1" $= r&gt; or &gt;r
  2dup " powerbook1,1" $= r&gt; or &gt;r
  2drop
  repeat
 2drop r&gt;
  then
r&gt; here - allot
0= abort" this image is not for this platform"
dev /openprom
0 0 " supports-bootinfo" property
device-end
" /chosen" find-package 0= abort" can't find '/chosen'" constant /chosen
" memory" /chosen get-package-property abort" memory??" decode-int constant xmem 2drop
" mmu" /chosen get-package-property abort" mmu??" decode-int constant xmmu 2drop
" AAPL,debug" " /" find-package 0= abort" can't find '/'" get-package-property if
   false
  else
 2drop true
  then
( debug? ) constant debug?
debug? if cr ." checking for RELEASE-LOAD-AREA" then
" release-load-area" $find 0= if 2drop false then ( xt|0 ) constant 'release-load-area
debug? if 'release-load-area if ." , found it" else ." , not found" then then
: do-translate " translate" xmmu $call-method ;
: do-map  " map" xmmu $call-method ;
: do-unmap " unmap" xmmu $call-method ;
: claim-mem  " claim" xmem $call-method ;
: release-mem " release" xmem $call-method ;
: claim-virt " claim" xmmu $call-method ;
: release-virt " release" xmmu $call-method ;
1000 constant pagesz
pagesz 1- constant pagesz-1
-1000 constant pagemask
h# 004000 constant elf-offset
h# 00CCE8 constant elf-size
elf-size pagesz-1 + pagemask and constant elf-pages
h# 010CE8 constant lzss-offset
h# 1CB7A2 constant lzss-size
lzss-size pagesz-1 + pagemask and constant lzss-pages
h# 1DC48A constant info-size
info-size pagesz-1 + pagemask and constant info-pages
0 value load-base-claim
0 value info-base
'release-load-area if
    load-base to info-base
  else
    load-base info-pages 0 ['] claim-mem catch if 3drop 0 then to load-base-claim
    info-pages 1000 claim-virt to info-base
    load-base info-base info-pages 10 do-map
  then
lzss-pages 400000 claim-mem constant rom-phys
lzss-pages 1000 claim-virt constant rom-virt
rom-phys rom-virt lzss-pages 10 do-map
elf-pages 1000 claim-mem constant elf-phys
elf-pages 1000 claim-virt constant elf-virt
elf-phys elf-virt elf-pages 10 do-map
info-base elf-offset + elf-virt elf-size move
debug? if cr ." elf-phys,elf-virt,elf-pages: " elf-phys u. ." , " elf-virt u. ." , " elf-pages u. then
debug? if cr ." copying compressed ROM image" then
rom-virt lzss-pages 0 fill
info-base lzss-offset + rom-virt lzss-size move
'release-load-area 0= if
    info-base info-pages do-unmap
    load-base-claim ?dup if info-pages release-mem then
  then
debug? if cr ." MacOS-ROM phys,virt,size: " rom-phys u. ." , " rom-virt u. ." , " lzss-size u. then
debug? if cr ." finding/creating '/rom/macos' package" then
device-end 0 to my-self
" /rom" find-device
" macos" ['] find-device catch if 2drop new-device " macos" device-name finish-device then
" /rom/macos" find-device
debug? if cr ." creating 'AAPL,toolbox-image,lzss' property" then
rom-virt encode-int lzss-size encode-int encode+ " AAPL,toolbox-image,lzss" property
device-end
debug? if cr ." copying MacOS.elf to load-base" then
'release-load-area if
    load-base elf-pages + 'release-load-area execute
  else
    load-base elf-pages 0 claim-mem
    load-base dup elf-pages 0 do-map
  then
elf-virt load-base elf-size move
elf-virt elf-pages do-unmap
elf-virt elf-pages release-virt
elf-phys elf-pages release-mem
debug? if cr ." init-program" then
init-program
debug? if cr ." .registers" .registers then
debug? if cr ." go" cr then
go
cr ." end of BOOT-SCRIPT"
</BOOT-SCRIPT>
</CHRP-BOOT>...MacOS icon bitmap and ELF header follows...

BlueG3's OF contains ELF loader package and is this the loading script?
Though I don't understand OF/Forth very well, this may be useful for
prom_init or somewhere.
 
Still can't reach the entry point. What should I do next?


Thanks in advance,

Ryuichi Oikawa
roikawa@rr.iij4u.or.jp
http://www.rr.iij4u.or.jp/~roikawa

[[ 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.   ]]

  reply	other threads:[~1999-03-15 16:42 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-14 13:35 Blue G3 and machine check Benjamin Herrenschmidt
1999-03-15 16:42 ` Ryuichi Oikawa [this message]
1999-03-15 17:09   ` Geert Uytterhoeven
1999-03-24  9:30 ` Gabriel Paubert
1999-03-24 23:12   ` Paul Mackerras
1999-03-25 11:20     ` Gabriel Paubert
1999-03-25 16:46       ` Apple Job Posting and Good News for LinuxPPC developers Kevin B. Hendricks
1999-03-25 19:12         ` David Edelsohn
1999-03-26 11:31           ` Gabriel Paubert
1999-03-26 16:13             ` David Edelsohn
1999-03-27  6:27               ` Guy Sotomayor
1999-03-27 20:44                 ` David Edelsohn
1999-04-02 12:11             ` Holger Bettag
1999-04-02 17:11               ` David Edelsohn
1999-04-02 22:19                 ` Douglas Godfrey
1999-04-03 17:42                 ` Holger Bettag
1999-04-05 16:11                   ` Gabriel Paubert
1999-04-05 16:06               ` Gabriel Paubert
1999-04-06  5:53                 ` Douglas Godfrey
1999-03-26  6:08         ` Nathan Hurst
1999-03-26 13:51           ` sean o'malley
1999-03-28  5:08             ` Cort Dougan
1999-03-26 20:33           ` N.G. Temme
1999-03-29 23:44       ` Blue G3 and machine check Paul Mackerras
1999-03-30 11:41         ` Gabriel Paubert
1999-03-31 16:20           ` Ryuichi Oikawa
1999-03-31 18:39             ` Gabriel Paubert
1999-04-05 16:36               ` Ryuichi Oikawa
1999-04-05 17:11                 ` Gabriel Paubert
1999-04-04  1:17             ` Joel Klecker
1999-04-09  5:58               ` Joel Klecker
1999-04-09 16:12                 ` Ryuichi Oikawa
1999-03-25 12:10     ` Benjamin Herrenschmidt

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=19990316014237Y.roikawa@rr.iij4u.or.jp \
    --to=roikawa@rr.iij4u.or.jp \
    --cc=bh40@calva.net \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=paulus@cs.anu.edu.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.