ia64/xen-unstable

changeset 18892:76099ad24cbd

rombios: support BCV

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Dec 09 12:41:12 2008 +0000 (2008-12-09)
parents cc82d54bedfd
children 628b3a76dbf4
files tools/firmware/rombios/rombios.c
line diff
     1.1 --- a/tools/firmware/rombios/rombios.c	Fri Dec 05 15:54:22 2008 +0000
     1.2 +++ b/tools/firmware/rombios/rombios.c	Tue Dec 09 12:41:12 2008 +0000
     1.3 @@ -9725,6 +9725,30 @@ fetch_bdf:
     1.4    mov  ax, 2[bx]
     1.5    cmp  ax, #0x506e 
     1.6    jne  no_bev
     1.7 +
     1.8 +  mov  ax, 0x16[bx] ;; 0x16 is the offset of Boot Connection Vector
     1.9 +  cmp  ax, #0x0000
    1.10 +  je   no_bcv
    1.11 +
    1.12 +  ;; Option ROM has BCV. Run it now.
    1.13 +  push cx       ;; Push seg
    1.14 +  push ax       ;; Push offset
    1.15 +
    1.16 +  ;; Point ES:DI at "$PnP", which tells the ROM that we are a PnP BIOS.
    1.17 +  mov  bx, #0xf000
    1.18 +  mov  es, bx
    1.19 +  lea  di, pnp_string
    1.20 +  /* jump to BCV function entry pointer */
    1.21 +  mov  bp, sp   ;; Call ROM BCV routine using seg:off on stack
    1.22 +  db   0xff     ;; call_far ss:[bp+0]
    1.23 +  db   0x5e
    1.24 +  db   0
    1.25 +  cli           ;; In case expansion ROM BIOS turns IF on
    1.26 +  add  sp, #2   ;; Pop offset value
    1.27 +  pop  cx       ;; Pop seg value (restore CX)
    1.28 +  ja   no_bev
    1.29 +
    1.30 +no_bcv:
    1.31    mov  ax, 0x1a[bx] ;; 0x1A is also the offset into the expansion header of...
    1.32    cmp  ax, #0x0000  ;; the Bootstrap Entry Vector, or zero if there is none.
    1.33    je   no_bev