[HVM] [Firmware] Pick up SMBIOS entry point from 0x9f000 in ROMBIOS. This is needed so that the entry point can be found on a 16-byte boundary in 0xf0000-0xfffff. Signed-off-by: Andrew D. Ball diff -r f91cc71173c5 tools/firmware/rombios/rombios.c --- a/tools/firmware/rombios/rombios.c Thu Jun 22 20:37:33 2006 +++ b/tools/firmware/rombios/rombios.c Fri Jul 7 13:48:13 2006 @@ -9443,6 +9443,43 @@ mov ds, ax ret +#ifdef HVMASSIST + +smbios_init: + push ax + push cx + push es + push ds + push di + push si + + ; If we have SMBIOS data, it will be at address 0x9f000, and this + ; will copy it to the entry point address (smbios_entry_point). + ; This will still copy the memory over if we don't, but that shouldn't + ; hurt anything, as that memory won't have the '_SM_' signature. + mov cx, #0x001f ; 0x1f bytes to copy + mov ax, #0xf000 + mov es, ax ; destination segment is 0xf0000 + mov di, smbios_entry_point ; destination offset + mov ax, #0x9f00 + mov ds, ax ; source segment is 0x9f000 + mov si, #0x0000 ; source offset is 0 + cld + rep + movsb + +smbios_out: + pop si + pop di + pop ds + pop es + pop cx + pop ax + + ret + +#endif + ;; for 'C' strings and other data, insert them here with ;; a the following hack: ;; DATA_SEG_DEFS_HERE @@ -9724,6 +9761,7 @@ #ifdef HVMASSIST call _copy_e820_table + call smbios_init #endif call rom_scan @@ -10834,4 +10872,11 @@ db 0,0,0,0 ;; MP feature bytes 2-5. #endif +; space for SMBIOS entry point (31 bytes) +.align 16 +smbios_entry_point: +db 0,0,0,0,0,0,0,0,0,0 +db 0,0,0,0,0,0,0,0,0,0 +db 0,0,0,0,0,0,0,0,0,0,0 + ASM_END