Changeset 31 in vbox
- Timestamp:
- Jan 15, 2007 5:07:24 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 17460
- Location:
- trunk/src/VBox/Devices/PC
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/rombios.c
r1 r31 120 120 // 121 121 // BCC Bug: find a generic way to handle the bug of #asm after an "if" (fixed in 0.16.7) 122 123 #ifdef VBOX 124 #include "DevPcBios.h" 125 #endif 122 126 123 127 #define DEBUG_ROMBIOS 0 … … 7873 7877 // Check for boot from LAN first 7874 7878 if (bootlan == 1) { 7875 if (read_word( 0xc800,0) == 0xaa55) {7879 if (read_word(VBOX_LANBOOT_SEG,0) == 0xaa55) { 7876 7880 Bit16u pnpoff; 7877 7881 // This is NOT a generic PnP implementation, but an Etherboot-specific hack. 7878 pnpoff = read_word(0xc800,0x1a); 7879 if (read_dword(0xc800,pnpoff) == 0x506e5024 && read_dword(0xc800,read_word(0xc800,pnpoff+0xe)) == 0x65687445) { 7882 pnpoff = read_word(VBOX_LANBOOT_SEG,0x1a); 7883 if (read_dword(VBOX_LANBOOT_SEG,pnpoff) == 0x506e5024 && 7884 read_dword(VBOX_LANBOOT_SEG,read_word(VBOX_LANBOOT_SEG,pnpoff+0xe)) == 0x65687445) { 7880 7885 // Found PnP signature and Etherboot manufacturer string. 7881 7886 print_boot_device(bootcd, bootlan, bootdrv); … … 7884 7889 push es 7885 7890 pusha 7886 calli 0x0006, 0xc8007891 calli 0x0006,VBOX_LANBOOT_SEG 7887 7892 popa 7888 7893 pop es … … 10841 10846 10842 10847 #ifdef VBOX 10843 #include "DevPcBios.h"10844 10848 // The DMI header 10845 10849 .org 0xff40 … … 10848 10852 ; calculate the DMI header checksum 10849 10853 db ( - ( 0x5f + 0x44 + 0x4d + 0x49 + 0x5f \ 10850 + (( DMI_TABLE_BASE ) & 0xff) + ((DMI_TABLE_BASE >> 8) & 0xff) \10851 + (( DMI_TABLE_BASE >> 16) & 0xff) + ((DMI_TABLE_BASE >> 24) & 0xff) \10852 + (( DMI_TABLE_SIZE ) & 0xff) + ((DMI_TABLE_SIZE >> 8) & 0xff) \10853 + (( DMI_TABLE_ENTR ) & 0xff) + ((DMI_TABLE_ENTR >> 8) & 0xff) \10854 + DMI_TABLE_VER \10854 + ((VBOX_DMI_TABLE_BASE ) & 0xff) + ((VBOX_DMI_TABLE_BASE >> 8) & 0xff) \ 10855 + ((VBOX_DMI_TABLE_BASE >> 16) & 0xff) + ((VBOX_DMI_TABLE_BASE >> 24) & 0xff) \ 10856 + ((VBOX_DMI_TABLE_SIZE ) & 0xff) + ((VBOX_DMI_TABLE_SIZE >> 8) & 0xff) \ 10857 + ((VBOX_DMI_TABLE_ENTR ) & 0xff) + ((VBOX_DMI_TABLE_ENTR >> 8) & 0xff) \ 10858 + VBOX_DMI_TABLE_VER \ 10855 10859 )) & 0xff 10856 dw DMI_TABLE_SIZE; DMI tables length10857 dd DMI_TABLE_BASE; DMI tables base10858 dw DMI_TABLE_ENTR; DMI tables entries10859 db DMI_TABLE_VER; DMI version10860 dw VBOX_DMI_TABLE_SIZE ; DMI tables length 10861 dd VBOX_DMI_TABLE_BASE ; DMI tables base 10862 dw VBOX_DMI_TABLE_ENTR ; DMI tables entries 10863 db VBOX_DMI_TABLE_VER ; DMI version 10860 10864 db 0x00 ; Just for alignment 10861 10865 #endif -
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r1 r31 827 827 *pszStr++ = '\0'; 828 828 829 AssertMsg(pszStr - (char*)table == DMI_TABLE_SIZE,830 (" DMI_TABLE_SIZE=%d, actual DMI table size is %d",831 DMI_TABLE_SIZE, pszStr - (char*)table));829 AssertMsg(pszStr - (char*)table == VBOX_DMI_TABLE_SIZE, 830 ("VBOX_DMI_TABLE_SIZE=%d, actual DMI table size is %d", 831 VBOX_DMI_TABLE_SIZE, pszStr - (char*)table)); 832 832 } 833 833 834 AssertCompile( DMI_TABLE_ENTR == 2);834 AssertCompile(VBOX_DMI_TABLE_ENTR == 2); 835 835 836 836 … … 918 918 pcbiosPlantDMITable(pData->au8DMIPage); 919 919 920 rc = PDMDevHlpROMRegister(pDevIns, DMI_TABLE_BASE, 0x1000, pData->au8DMIPage, "DMI tables");920 rc = PDMDevHlpROMRegister(pDevIns, VBOX_DMI_TABLE_BASE, 0x1000, pData->au8DMIPage, "DMI tables"); 921 921 if (VBOX_FAILURE(rc)) 922 922 return rc; … … 1172 1172 */ 1173 1173 if (pu8LanBoot) 1174 rc = PDMDevHlpROMRegister(pDevIns, 0x000c8000, cbFileLanBoot, pu8LanBoot, "Net Boot ROM");1174 rc = PDMDevHlpROMRegister(pDevIns, VBOX_LANBOOT_SEG << 4, cbFileLanBoot, pu8LanBoot, "Net Boot ROM"); 1175 1175 1176 1176 return rc; -
trunk/src/VBox/Devices/PC/DevPcBios.h
r1 r31 24 24 #define DEV_PCBIOS_H 25 25 26 #define DMI_TABLE_ENTR 2 27 #define DMI_TABLE_SIZE 160 28 #define DMI_TABLE_BASE 0xe1000 29 #define DMI_TABLE_VER 0x23 26 #define VBOX_DMI_TABLE_ENTR 2 27 #define VBOX_DMI_TABLE_SIZE 160 28 #define VBOX_DMI_TABLE_BASE 0xe1000 29 #define VBOX_DMI_TABLE_VER 0x23 30 31 #define VBOX_LANBOOT_SEG 0xcb00 30 32 31 33 #endif -
trunk/src/VBox/Devices/PC/Etherboot-src/Makefile.kmk
r1 r31 101 101 102 102 # 103 # Rule for making the bios. 103 # Rule for making the bios 104 # Note: The BIOS image occupies 0xCB000...0xCFFFF, therefore its size is limited to 20KB. 104 105 # 105 106 $(PATH_TARGET)/NetBiosBin.c: $(PATH_TARGET)/pcnet32.zrom $(VBOX_BIN2C) 106 107 $(call MSG_L1,bin2c $< => $@) 107 $(QUIET)$(VBOX_BIN2C) -min 32 -max 64-mask 0xfff -export NetBiosBinary $< $@108 $(QUIET)$(VBOX_BIN2C) -min 16 -max 20 -mask 0xfff -export NetBiosBinary $< $@ 108 109 109 110 # -
trunk/src/VBox/Devices/PC/Etherboot-src/util/makerom.c
r1 r31 290 290 } 291 291 /* shrink it down to the smallest size that will do */ 292 #ifndef VBOX 292 293 for (romsize = MAXROMSIZE; romsize > MINROMSIZE && romsize >= 2*fs; ) 293 294 romsize /= 2L; 295 #else 296 /* VBox can handle ROM BIOS at page boundaries */ 297 romsize = (fs + 4095) & ~0xfff; 298 #endif 294 299 rom[2] = romsize / 512L; 295 300 rom[5] = 0;
Note:
See TracChangeset
for help on using the changeset viewer.