Re: BTX loader reboot on Soekris comBIOS1.22 fails (patches forbtx.s and loader/main.c enclosed)

From: Soren Kristensen (soren_at_soekris.com)
Date: 11/16/03

  • Next message: Wes Peters: "Re: Observations on make release process?"
    Date: Sat, 15 Nov 2003 19:13:17 -0800
    To: Adrian Steinmann <ast@marabu.ch>
    
    

    Hi Adrian,

    Adrian Steinmann wrote:
    >
    > In the BTX loader, the reboot command simply exits the loader, and
    > end up in exit near line 252 in /usr/src/sys/boot/i386/btx/btx/btx.s
    > which disables paging, flushes TLB, switches to real mode, flags a
    > 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).

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

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

    Regards,

    Soren

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Wes Peters: "Re: Observations on make release process?"

    Relevant Pages

    • GRUB master boot record
      ... the Jump Instruction. ... BIOS parameter block is a description of the physical medium ... as for flexible/floppy and optic distal disk cartridges) also ... installed in the first track (Sectors 1 ff.) of an HDD; ...
      (comp.os.linux.hardware)
    • GRUB master boot record
      ... the Jump Instruction. ... BIOS parameter block is a description of the physical medium ... as for flexible/floppy and optic distal disk cartridges) also ... installed in the first track (Sectors 1 ff.) of an HDD; ...
      (comp.os.vms)
    • Re: Finding an x86 segment in a BIOS
      ... Extracted the BIOS from my Thinkpad T43. ... Diassemble ones I'm interested in with IDA. ... I assume the 5006h is the segment. ... It will either jump within F000, ...
      (comp.lang.asm.x86)
    • Re: Interesting BIOS offset problem
      ... Why was calling the bios bad? ... The jump table does have a specific format. ... that and the functionality is adaquately defined for each entry. ... FYI DU is a raw disk sector editor that works directly at the disk ...
      (comp.os.cpm)
    • Re: [parisc-linux] Comparing PROT_EXEC-only pages on different CPUs
      ... > HPPA code segments have the read flag set at the moment? ... The default flags for .text and other code sections are "AX" for both ... there isn't a problem reading the offsets in the jump tables. ... do jump table instructions do data reads or do they count as ...
      (Linux-Kernel)