Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Jul 1997 17:50:32 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        current@freebsd.org
Subject:   GPF calling BIOS from kernel...
Message-ID:  <199707190820.RAA13233@genesis.atrad.adelaide.edu.au>

next in thread | raw e-mail | index | archive | help

Hmm.  Tinkering with the BIOS32 stuff, I suspect I am falling foul of
something basic in the 386 architecture that I don't properly
understand.

...
Stopped at      _bios32_SDlookup+0x15:  movl    0(%esi),%eax
Stopped at      _bios32_SDlookup+0x17:  xorl    %ebx,%ebx
Stopped at      _bios32_SDlookup+0x19:  movl    _bios32_SDCI,%ecx
Stopped at      _bios32_SDlookup+0x1f:  calll   *%ecx
Stopped at      0xf00fdb80:     cmpl    $0x49435024,%eax
Stopped at      0xf00fdb85:     movb    $0x80,%al
Stopped at      0xf00fdb87:     jnz     0xf00fdba0
Stopped at      0xf00fdb89:     movb    $0x81,%al
Stopped at      0xf00fdb8b:     orb     %bl,%bl
Stopped at      0xf00fdb8d:     jnz     0xf00fdba0
Stopped at      0xf00fdb8f:     movl    $0xf0000,%ebx
Stopped at      0xf00fdb94:     movl    $0x10000,%ecx
Stopped at      0xf00fdb99:     movl    $0xdba1,%edx
Stopped at      0xf00fdb9e:     movb    $0,%al
Stopped at      0xf00fdba0:     lret

Fatal trap 9: general protection fault while in kernel mode
instruction pointer     = 0x8:0xf00fdba0
stack pointer           = 0x10:0xf021df48
frame pointer           = 0x10:0xf021df64
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = trace trap, resume, IOPL = 0
current process         = 0 ()
interrupt mask          = net tty bio 
kernel: type 9 trap, code=0
Stopped at      0xf00fdba0:     lret

Why am I getting a GPF here?  Is it because the code segment type is
inadequately privileged?  The spec for the calling interface says :

"The segment type must be 0x100b (code, execute only) or 0x101b (code, 
 execute/read)."

However my inference from that is that is that the 0x1000 bit is
either the execute or code bit, and thus that things would have broken
before this.

It's also depressing to note that the only BIOS32 service on this
board is "IC5$", whatever that is.  It looks like the BIOS32 idea was
stillborn, given that the spec is dated 1993.  And on top of that they
(AMI) don't even return the correct value if you request an unknown
service. 8(

-- 
]] Mike Smith, Software Engineer        msmith@gsoft.com.au             [[
]] Genesis Software                     genesis@gsoft.com.au            [[
]] High-speed data acquisition and      (GSM mobile)     0411-222-496   [[
]] realtime instrument control.         (ph)          +61-8-8267-3493   [[
]] Unix hardware collector.             "Where are your PEZ?" The Tick  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707190820.RAA13233>