Date: Sun, 16 Nov 2003 13:33:53 +0100 From: Adrian Steinmann <ast@marabu.ch> To: Soren Kristensen <soren@soekris.com> Cc: msmith@freebsd.org Subject: Re: BTX loader reboot on Soekris comBIOS1.22 fails (patches for btx.s and loader/main.c enclosed) Message-ID: <200311161233.NAA27227@marabu.marabu.ch> In-Reply-To: <3FB6EB4D.8050901@soekris.com> References: <32365.1068624044@critter.freebsd.dk> <3FB281B4.5060105@soekris.com> <200311160131.CAA21864@marabu.marabu.ch> <3FB6EB4D.8050901@soekris.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Soren We seem to have localized the loader reboot hang back to the first far jump happening in btx.s: <ast@marabu.ch> observed: > warm boot (writes 0x1234 to 0x472) and then jumps to the BIOS reboot > handler: > - ljmp $0xffff,$0x0 # reboot the machine > > however in various literature it is mentioned that $0xf000,$0xfff0 > is bound to work better on most platforms, so I tried > + ljmp $0xf000,$0xfff0 # reboot the machine > > which indeed works! (OpenBSD, for example, uses ljmp $0xf000,$0xfff0). <soren@soekris.com> replied: The reason is that on some hardware (t.ex the Geode) there need to be work done early on in the BIOS to enable access to the BIOS in low memory before that first far jump, and therefore the first jump is not a far jump as on the original PC, but a near jump. Having the segment set at FFFF can screw up that first near jump.... This is exactly what I have read in the book "The Undocumented PC" by Frank van Gilluwe, 1st ed., Addison Wesley 1994, ISBN 0-201-62277-7, p91ff. In there, he also says that using INT19 or jumping to BIOS boot f000:ffff are "misconceptions" and that software control (keyboard reset) should be used whenever possible (hence both of my patches). I will wait for feedback from some Cc: people and if required, submit PRs to fix btx.s and loader/main.c. <soren@soekris.com> then opined: So the ljmp $0xf000,$0xfff0 would be the best way, but since my BIOS patches F000:FFF0 after copying the BIOS from flash to ram, I could also change my near jump to a far jump to increase compatibility.... Both! FreeBSD should fix the jmp in btx.s and you could do an initial far jump for increased compatibility. Adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311161233.NAA27227>