VirtualBox

Changeset 31 in vbox


Ignore:
Timestamp:
Jan 15, 2007 5:07:24 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
17460
Message:

Move etherboot BIOS from 0xc8000...0xcffff to 0xcb000...0xcffff as it does not need more than 20KB and the VGA BIOS needs more than 32KB in future versions.

Location:
trunk/src/VBox/Devices/PC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/rombios.c

    r1 r31  
    120120//
    121121//   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
    122126
    123127#define DEBUG_ROMBIOS      0
     
    78737877  // Check for boot from LAN first
    78747878  if (bootlan == 1) {
    7875     if (read_word(0xc800,0) == 0xaa55) {
     7879    if (read_word(VBOX_LANBOOT_SEG,0) == 0xaa55) {
    78767880      Bit16u pnpoff;
    78777881      // 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) {
    78807885        // Found PnP signature and Etherboot manufacturer string.
    78817886        print_boot_device(bootcd, bootlan, bootdrv);
     
    78847889    push es
    78857890    pusha
    7886     calli 0x0006,0xc800
     7891    calli 0x0006,VBOX_LANBOOT_SEG
    78877892    popa
    78887893    pop es
     
    1084110846
    1084210847#ifdef VBOX
    10843 #include "DevPcBios.h"
    1084410848// The DMI header
    1084510849.org 0xff40
     
    1084810852 ; calculate the DMI header checksum
    1084910853 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 \
    1085510859    )) & 0xff
    10856  dw DMI_TABLE_SIZE                    ; DMI tables length
    10857  dd DMI_TABLE_BASE                    ; DMI tables base
    10858  dw DMI_TABLE_ENTR                    ; DMI tables entries
    10859  db DMI_TABLE_VER                     ; DMI version
     10860 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
    1086010864 db 0x00                              ; Just for alignment
    1086110865#endif
  • trunk/src/VBox/Devices/PC/DevPcBios.cpp

    r1 r31  
    827827    *pszStr++                    = '\0';
    828828
    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));
    832832}
    833833
    834 AssertCompile(DMI_TABLE_ENTR == 2);
     834AssertCompile(VBOX_DMI_TABLE_ENTR == 2);
    835835
    836836
     
    918918    pcbiosPlantDMITable(pData->au8DMIPage);
    919919
    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");
    921921    if (VBOX_FAILURE(rc))
    922922        return rc;
     
    11721172     */
    11731173    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");
    11751175
    11761176    return rc;
  • trunk/src/VBox/Devices/PC/DevPcBios.h

    r1 r31  
    2424#define DEV_PCBIOS_H
    2525
    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
    3032
    3133#endif
  • trunk/src/VBox/Devices/PC/Etherboot-src/Makefile.kmk

    r1 r31  
    101101
    102102#
    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.
    104105#
    105106$(PATH_TARGET)/NetBiosBin.c: $(PATH_TARGET)/pcnet32.zrom $(VBOX_BIN2C)
    106107        $(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 $< $@
    108109
    109110#
  • trunk/src/VBox/Devices/PC/Etherboot-src/util/makerom.c

    r1 r31  
    290290        }
    291291        /* shrink it down to the smallest size that will do */
     292#ifndef VBOX
    292293        for (romsize = MAXROMSIZE; romsize > MINROMSIZE && romsize >= 2*fs; )
    293294                romsize /= 2L;
     295#else
     296        /* VBox can handle ROM BIOS at page boundaries */
     297        romsize = (fs + 4095) & ~0xfff;
     298#endif
    294299        rom[2] = romsize / 512L;
    295300        rom[5] = 0;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette