From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andrew D. Ball" Subject: [PATCH] HVM SMBIOS 5/5 Date: Wed, 12 Jul 2006 17:29:22 -0400 Message-ID: <44B569B2.1030904@us.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060400070600090406030502" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------060400070600090406030502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This patch makes the ROMBIOS pick up the SMBIOS entry point for HVM domU's. This allows the SMBIOS tables to be generated outside of the ROMBIOS while still satisfying the requirement that the 31-bit entry point can be found on a 16-byte boundary between 0xf0000 and 0xfffff. --------------060400070600090406030502 Content-Type: text/plain; name="smbios_5-rombios.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="smbios_5-rombios.patch" [HVM] [firmware] Copy SMBIOS entry point into rombios. Signed-off-by: Andrew D. Ball diff -r a1c2cede77c7 tools/firmware/rombios/rombios.c --- a/tools/firmware/rombios/rombios.c Mon Jul 10 14:01:49 2006 +++ b/tools/firmware/rombios/rombios.c Wed Jul 12 11:49:19 2006 @@ -9443,6 +9443,43 @@ mov ds, ax ret +#ifdef HVMASSIST + +; Copy the SMBIOS entry point over from 0x9f000, where hvmloader left it. +; The entry point must be somewhere in 0xf0000-0xfffff on a 16-byte boundary, +; but the tables themeselves can be elsewhere. +smbios_init: + push ax + push cx + push es + push ds + push di + push si + + 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 + + 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 @@ -10538,6 +10576,13 @@ 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 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 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 + +.align 16 +smbios_entry_point: +db 0,0,0,0,0,0,0,0 ; 8 bytes +db 0,0,0,0,0,0,0,0 ; 16 bytes +db 0,0,0,0,0,0,0,0 ; 24 bytes +db 0,0,0,0,0,0,0 ; 31 bytes ASM_END #else // !HVMASSIST --------------060400070600090406030502 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060400070600090406030502--