direct-io.hg

changeset 11095:7ba73e24c5a5

Pick up SMBIOS entry point in the ROMBIOS.
Signed-off-by: Andrew D. Ball <aball@us.ibm.com>
author kfraser@localhost.localdomain
date Mon Aug 14 17:38:23 2006 +0100 (2006-08-14)
parents 0b176f84c3bf
children acacf7f1191d
files tools/firmware/rombios/rombios.c
line diff
     1.1 --- a/tools/firmware/rombios/rombios.c	Mon Aug 14 17:37:07 2006 +0100
     1.2 +++ b/tools/firmware/rombios/rombios.c	Mon Aug 14 17:38:23 2006 +0100
     1.3 @@ -9443,6 +9443,43 @@ rom_scan_increment:
     1.4    mov  ds, ax
     1.5    ret
     1.6  
     1.7 +#ifdef HVMASSIST
     1.8 +
     1.9 +; Copy the SMBIOS entry point over from 0x9f000, where hvmloader left it.
    1.10 +; The entry point must be somewhere in 0xf0000-0xfffff on a 16-byte boundary,
    1.11 +; but the tables themeselves can be elsewhere.
    1.12 +smbios_init:
    1.13 +  push ax
    1.14 +  push cx
    1.15 +  push es
    1.16 +  push ds
    1.17 +  push di
    1.18 +  push si
    1.19 +
    1.20 +  mov cx, #0x001f ; 0x1f bytes to copy
    1.21 +  mov ax, #0xf000
    1.22 +  mov es, ax      ; destination segment is 0xf0000
    1.23 +  mov di, smbios_entry_point ; destination offset
    1.24 +  mov ax, #0x9f00
    1.25 +  mov ds, ax      ; source segment is 0x9f000
    1.26 +  mov si, #0x0000 ; source offset is 0
    1.27 +  cld
    1.28 +  rep
    1.29 +    movsb
    1.30 +
    1.31 +  pop si
    1.32 +  pop di
    1.33 +  pop ds
    1.34 +  pop es
    1.35 +  pop cx
    1.36 +  pop ax
    1.37 +
    1.38 +  ret
    1.39 +
    1.40 +#endif
    1.41 +
    1.42 +
    1.43 +
    1.44  ;; for 'C' strings and other data, insert them here with
    1.45  ;; a the following hack:
    1.46  ;; DATA_SEG_DEFS_HERE
    1.47 @@ -9724,6 +9761,7 @@ post_default_ints:
    1.48  
    1.49  #ifdef HVMASSIST
    1.50    call _copy_e820_table
    1.51 +  call smbios_init
    1.52  #endif
    1.53  
    1.54    call rom_scan
    1.55 @@ -10538,6 +10576,13 @@ dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    1.56  dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;; 768 bytes
    1.57  dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;; 832 bytes
    1.58  dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;; 896 bytes
    1.59 +
    1.60 +.align 16
    1.61 +smbios_entry_point:
    1.62 +db 0,0,0,0,0,0,0,0 ; 8 bytes
    1.63 +db 0,0,0,0,0,0,0,0 ; 16 bytes
    1.64 +db 0,0,0,0,0,0,0,0 ; 24 bytes
    1.65 +db 0,0,0,0,0,0,0   ; 31 bytes
    1.66  ASM_END
    1.67  
    1.68  #else // !HVMASSIST