NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-i386/40752: x86 bootloader panic()/exit() loop



The following reply was made to PR port-i386/40752; it has been noted by GNATS.

From: Matthias Drochner <M.Drochner%fz-juelich.de@localhost>
To: Andrew Doran <ad%NetBSD.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, port-i386-maintainer%NetBSD.org@localhost,
        gnats-admin%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Subject: Re: port-i386/40752: x86 bootloader panic()/exit() loop 
Date: Wed, 25 Feb 2009 17:33:47 +0100

 This is a multipart MIME message.
 
 --==_Exmh_52932271007360
 Content-Type: text/plain; charset=us-ascii
 
 
 ad%NetBSD.org@localhost said:
 > >    for (;;) __asm volatile("hlt");
 > 'int 0x19' isn't enough? 
 
 int 0x18! It is almost there -- formerly, the biosboot start
 code did define an "exit" entry point. This got lost when
 it was split into "bootxx" and "boot".
 The appended patch should fix things and even make the
 code a couple of bytes smaller.
 best regards
 Matthias
 
 
 
 
 
 -------------------------------------------------------------------
 -------------------------------------------------------------------
 Forschungszentrum Juelich GmbH
 52425 Juelich
 
 Sitz der Gesellschaft: Juelich
 Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
 Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
 Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
 Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
 Dr. Sebastian M. Schmidt
 -------------------------------------------------------------------
 -------------------------------------------------------------------
 
 --==_Exmh_52932271007360
 Content-Type: text/plain ; name="boot.txt"; charset=us-ascii
 Content-Description: boot.txt
 Content-Disposition: attachment; filename="boot.txt"
 
 #
 # old_revision [47c1df0d4767cb616c1f79cf6ce07dc5ed4f0714]
 #
 # patch "sys/arch/i386/stand/boot/Makefile.boot"
 #  from [d704724387418e1716e63943da1904f181aeb235]
 #    to [0b13bad190bc7441f15db09633bae419a5f0a2e1]
 # 
 # patch "sys/arch/i386/stand/boot/biosboot.S"
 #  from [01ce4fdd4987286ee7204ee0829b23322c104c22]
 #    to [7cc60a58ac155152ebf21bf705fc97d37d2bdd54]
 # 
 # patch "sys/arch/i386/stand/bootxx/Makefile.bootxx"
 #  from [b8395519a1fecd7a04efbb75771ecb10f2037d95]
 #    to [2d797d0ad8b873ee65a397615baae191e99cf289]
 # 
 # patch "sys/arch/i386/stand/bootxx/bootxx.S"
 #  from [ddd72d6658a6d76ef40032620ae8e86bd9193ff3]
 #    to [b539f3c0c113923705fcddb9dea1eca274edc9ce]
 # 
 # patch "sys/arch/i386/stand/bootxx/bootxx_ustarfs/Makefile"
 #  from [e1564bf8f91ef5f592532f32a87e403240921123]
 #    to [16bc843fd72ba897193528b6fca738f3e87f4c6f]
 #
 ============================================================
 --- sys/arch/i386/stand/boot/Makefile.boot     
d704724387418e1716e63943da1904f181aeb235
 +++ sys/arch/i386/stand/boot/Makefile.boot     
0b13bad190bc7441f15db09633bae419a5f0a2e1
 @@ -9,7 +9,7 @@ VERSIONFILE?= ${.CURDIR}/../version
  NEWVERSWHAT?= "BIOS Boot"
  VERSIONFILE?= ${.CURDIR}/../version
  
 -SOURCES?= biosboot.S boot2.c conf.c devopen.c exec.c
 +SOURCES?= biosboot.S boot2.c conf.c devopen.c exec.c panic.c
  SRCS= ${SOURCES}
  .if !make(depend)
  SRCS+= vers.c
 ============================================================
 --- sys/arch/i386/stand/boot/biosboot.S        
01ce4fdd4987286ee7204ee0829b23322c104c22
 +++ sys/arch/i386/stand/boot/biosboot.S        
7cc60a58ac155152ebf21bf705fc97d37d2bdd54
 @@ -127,7 +127,7 @@ 1: .asciz  "Boot2 failed: "
        jmp     loopstop
  1:    .asciz  "Boot2 failed: "
  
 -ENTRY(_rtt)
 +ENTRY(exit)
        .code32
        call    prot_to_real
        .code16
 ============================================================
 --- sys/arch/i386/stand/bootxx/Makefile.bootxx 
b8395519a1fecd7a04efbb75771ecb10f2037d95
 +++ sys/arch/i386/stand/bootxx/Makefile.bootxx 
2d797d0ad8b873ee65a397615baae191e99cf289
 @@ -18,7 +18,7 @@ BOOTXX_MAXSIZE?= $$(( ${BOOTXX_SECTORS} 
  BOOTXX_SECTORS?=15
  BOOTXX_MAXSIZE?= $$(( ${BOOTXX_SECTORS} * 512 ))
  
 -SRCS= pbr.S label.S bootxx.S boot1.c
 +SRCS= pbr.S label.S bootxx.S boot1.c ${EXTRASRCS}
  
  .include <bsd.own.mk>
  
 ============================================================
 --- sys/arch/i386/stand/bootxx/bootxx.S        
ddd72d6658a6d76ef40032620ae8e86bd9193ff3
 +++ sys/arch/i386/stand/bootxx/bootxx.S        
b539f3c0c113923705fcddb9dea1eca274edc9ce
 @@ -105,7 +105,7 @@ 12:        .asciz  "xx): "
  11:   .ascii  "Boot failed (errno "
  12:   .asciz  "xx): "
  
 -ENTRY(_rtt)
 +ENTRY(exit)
        .code32
        call    prot_to_real
        .code16
 ============================================================
 --- sys/arch/i386/stand/bootxx/bootxx_ustarfs/Makefile 
e1564bf8f91ef5f592532f32a87e403240921123
 +++ sys/arch/i386/stand/bootxx/bootxx_ustarfs/Makefile 
16bc843fd72ba897193528b6fca738f3e87f4c6f
 @@ -4,5 +4,6 @@ CPPFLAGS+=     -DSHOW_BANNER
  
  BOOTXX_SECTORS=16
  CPPFLAGS+=    -DSHOW_BANNER
 +EXTRASRCS=    panic.c
  
  .include <../Makefile.bootxx>
 
 --==_Exmh_52932271007360--
 


Home | Main Index | Thread Index | Old Index