[HVM] Pick up SMBIOS entry point in the ROMBIOS. Signed-off-by: Andrew D. Ball <aball@us.ibm.com> diff -r 1d817bfc5ed9 tools/firmware/rombios/rombios.c --- a/tools/firmware/rombios/rombios.c Fri Aug 11 14:22:54 2006 +0100 +++ b/tools/firmware/rombios/rombios.c Fri Aug 11 14:55:22 2006 -0400 @@ -9443,6 +9443,43 @@ rom_scan_increment: 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 @@ post_default_ints: #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 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
This patch breaks VMX boot from CDROM, I''m not familiar with the BIOS code, can someone help to fix it? BTW, it''s changeset 11095. -Xin>-----Original Message----- >From: xen-devel-bounces@lists.xensource.com >[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of >Andrew D. Ball >Sent: 2006年8月15日 1:45 >To: xen-devel@lists.xensource.com >Subject: [Xen-devel] [PATCH] HVM SMBIOS v3 [5/5] > >[HVM] Pick up SMBIOS entry point in the ROMBIOS. > >Signed-off-by: Andrew D. Ball <aball@us.ibm.com> > >diff -r 1d817bfc5ed9 tools/firmware/rombios/rombios.c >--- a/tools/firmware/rombios/rombios.c Fri Aug 11 14:22:54 2006 +0100 >+++ b/tools/firmware/rombios/rombios.c Fri Aug 11 14:55:22 2006 -0400 >@@ -9443,6 +9443,43 @@ rom_scan_increment: > 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 @@ post_default_ints: > > #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 > 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 > > > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
>This patch breaks VMX boot from CDROM, I''m not familiar with the BIOScode, can>someone help to fix it? >BTW, it''s changeset 11095. >-XinThe previous patch has a careless mistake: diff -r 04e5e80be909 tools/firmware/rombios/rombios.c --- a/tools/firmware/rombios/rombios.c Mon Aug 14 17:38:28 2006 +++ b/tools/firmware/rombios/rombios.c Fri Aug 18 13:13:24 2006 @@ -9459,7 +9459,7 @@ 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 di, #smbios_entry_point ; destination offset mov ax, #0x9f00 mov ds, ax ; source segment is 0x9f000 mov si, #0x0000 ; source offset is Thanks, Xiaowei _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 18/8/06 7:16 am, "Yang, Xiaowei" <xiaowei.yang@intel.com> wrote:>> This patch breaks VMX boot from CDROM, I''m not familiar with the BIOS > code, can >> someone help to fix it? >> BTW, it''s changeset 11095. >> -Xin > > The previous patch has a careless mistake:Good to know the patches were tested! ;-) Thanks, -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yes, thank you so much for finding this. Peace. Andrew Keir Fraser wrote:> > > On 18/8/06 7:16 am, "Yang, Xiaowei" <xiaowei.yang@intel.com> wrote: > > >>>This patch breaks VMX boot from CDROM, I''m not familiar with the BIOS >> >>code, can >> >>>someone help to fix it? >>>BTW, it''s changeset 11095. >>>-Xin >> >>The previous patch has a careless mistake: > > > Good to know the patches were tested! ;-) > > Thanks, > > -- Keir > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel