VirtualBox

Changeset 1362 in vbox for trunk


Ignore:
Timestamp:
Mar 9, 2007 10:54:02 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
19353
Message:

Enable BIOS backdoor logging for info messages. Can be useful to debug
guest problems.

Location:
trunk/src/VBox/Devices/PC/BIOS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/Makefile

    r316 r1362  
    7575$(PATH_TARGET)/_rombios_.c: rombios.c logo.c apmbios.S
    7676        $(call MSG_L1,Precompiling $<,=> $@)
    77         $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -I$(PATH_TARGET) -I$(PATH_CURRENT)/.. -DBX_SMP_PROCESSORS=1 -DVBOX $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) -P $< > $@
     77        $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -I$(PATH_TARGET) -I$(PATH_CURRENT)/.. -I$(PATH_ROOT)/include -I$(PATH_OUT) -DBX_SMP_PROCESSORS=1 -DVBOX $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) -P $< > $@
    7878
    7979# 2. compile to intermediate asm file.
  • trunk/src/VBox/Devices/PC/BIOS/rombios.c

    r1342 r1362  
    125125#ifdef VBOX
    126126#include "DevPcBios.h"
     127#include <VBox/version.h>
    127128#endif
    128129
     
    212213#endif /* VBOX_SMP */
    213214
     215#ifndef VBOX
    214216#define PANIC_PORT  0x400
    215217#define PANIC_PORT2 0x401
    216218#define INFO_PORT   0x402
    217219#define DEBUG_PORT  0x403
     220#else /* VBOX */
     221/* Redirect INFO output to backdoor logging port. */
     222#define PANIC_PORT  0x400
     223#define PANIC_PORT2 0x401
     224#define INFO_PORT   0x504
     225#define DEBUG_PORT  0x403
     226#endif /* VBOX */
    218227
    219228// define this if you want to make PCIBIOS working on a specific bridge only
     
    954963#endif // BX_ELTORITO_BOOT
    955964
     965#ifdef VBOX
     966static char bios_cvs_version_string[] = "VirtualBox " VBOX_VERSION_STRING " built " __DATE__ " " __TIME__;
     967#define BIOS_COPYRIGHT_STRING "InnoTek VirtualBox BIOS"
     968#else /* !VBOX */
    956969static char bios_cvs_version_string[] = "$Revision: 1.176 $ $Date: 2006/12/30 17:13:17 $";
    957970
    958 #ifdef VBOX
    959 #define BIOS_COPYRIGHT_STRING "InnoTek VirtualBox BIOS"
    960 #else
    961971#define BIOS_COPYRIGHT_STRING "(c) 2002 MandrakeSoft S.A. Written by Kevin Lawton & the Bochs team."
    962 #endif
     972#endif /* !VBOX */
    963973
    964974#define BIOS_PRINTF_HALT     1
     
    979989#  define BX_DEBUG(format, p...)
    980990#endif
     991#ifdef VBOX
     992#define BX_INFO(format, p...)   bios_printf(BIOS_PRINTF_INFO, "BIOS: " format, ##p)
     993#else /* !VBOX */
    981994#define BX_INFO(format, p...)   bios_printf(BIOS_PRINTF_INFO, format, ##p)
     995#endif /* !VBOX */
    982996#define BX_PANIC(format, p...)  bios_printf(BIOS_PRINTF_DEBHALT, format, ##p)
    983997
     
    19491963  // lastdrive: 1 boot drive is the last one in boot sequence
    19501964
    1951 #ifdef VBOX
    1952   if (lastdrive == 1)
    1953   {
    1954     if (reason == 0)
    1955     {
    1956       BX_PANIC("No bootable medium found! System halted.\n");
    1957     }
    1958     else
    1959     {
    1960       BX_PANIC("Could not read from the boot medium! System halted.\n");
    1961     }
    1962   }
    1963 #else /* !VBOX */
    19641965  if (cdboot)
     1966#ifndef VBOX
    19651967    bios_printf(BIOS_PRINTF_INFO | BIOS_PRINTF_SCREEN, "Boot from %s failed\n",drivetypes[2]);
    1966 #ifdef VBOX
     1968#else /* VBOX */
     1969    BX_INFO("Boot from %s failed\n",drivetypes[2]);
    19671970  else if (lanboot)
    1968     bios_printf(BIOS_PRINTF_INFO | BIOS_PRINTF_SCREEN, "Boot from %s failed\n",drivetypes[3]);
     1971    BX_INFO("Boot from %s failed\n",drivetypes[3]);
    19691972#endif /* VBOX */
    19701973  else if (drive & 0x80)
     1974#ifndef VBOX
    19711975    bios_printf(BIOS_PRINTF_INFO | BIOS_PRINTF_SCREEN, "Boot from %s %d failed\n", drivetypes[1],drivenum);
     1976#else /* VBOX */
     1977    BX_INFO("Boot from %s %d failed\n", drivetypes[1],drivenum);
     1978#endif /* VBOX */
    19721979  else
     1980#ifndef VBOX
    19731981    bios_printf(BIOS_PRINTF_INFO | BIOS_PRINTF_SCREEN, "Boot from %s %d failed\n", drivetypes[0],drivenum);
     1982#else /* VBOX */
     1983    BX_INFO("Boot from %s %d failed\n", drivetypes[0],drivenum);
     1984#endif /* VBOX */
    19741985
    19751986  if (lastdrive==1) {
    19761987    if (reason==0)
     1988#ifndef VBOX
    19771989      BX_PANIC("Not a bootable disk\n");
     1990#else /* VBOX */
     1991      BX_PANIC("No bootable medium found! System halted.\n");
     1992#endif /* VBOX */
    19781993    else
     1994#ifndef VBOX
    19791995      BX_PANIC("Could not read the boot disk\n");
     1996#else /* VBOX */
     1997      BX_PANIC("Could not read from the boot medium! System halted.\n");
     1998#endif /* VBOX */
    19801999  }
    1981 #endif /* !VBOX */
    19822000}
    19832001
     
    19922010#ifndef VBOX
    19932011  bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "CDROM boot failure code : %04x\n",code);
    1994 #endif /* !VBOX */
     2012#else /* VBOX */
     2013  BX_INFO("CDROM boot failure code : %04x\n",code);
     2014#endif /* VBOX */
    19952015
    19962016  return;
     
    23922412      switch (translation) {
    23932413        case ATA_TRANSLATION_NONE:
     2414#ifndef VBOX
    23942415          BX_INFO("none");
     2416#else /* VBOX */
     2417          bios_printf(BIOS_PRINTF_INFO, "none");
     2418#endif /* VBOX */
    23952419          break;
    23962420        case ATA_TRANSLATION_LBA:
     2421#ifndef VBOX
    23972422          BX_INFO("lba");
     2423#else /* VBOX */
     2424          bios_printf(BIOS_PRINTF_INFO, "lba");
     2425#endif /* VBOX */
    23982426          break;
    23992427        case ATA_TRANSLATION_LARGE:
     2428#ifndef VBOX
    24002429          BX_INFO("large");
     2430#else /* VBOX */
     2431          bios_printf(BIOS_PRINTF_INFO, "large");
     2432#endif /* VBOX */
    24012433          break;
    24022434        case ATA_TRANSLATION_RECHS:
     2435#ifndef VBOX
    24032436          BX_INFO("r-echs");
     2437#else /* VBOX */
     2438          bios_printf(BIOS_PRINTF_INFO, "r-echs");
     2439#endif /* VBOX */
    24042440          break;
    24052441        }
     
    24382474      // clip to 1024 cylinders in lchs
    24392475      if (cylinders > 1024) cylinders=1024;
     2476#ifndef VBOX
    24402477      BX_INFO(" LCHS=%d/%d/%d\n", cylinders, heads, spt);
     2478#else /* VBOX */
     2479      bios_printf(BIOS_PRINTF_INFO, " LCHS=%d/%d/%d\n", cylinders, heads, spt);
     2480#endif /* VBOX */
    24412481
    24422482      write_word(ebda_seg,&EbdaData->ata.devices[device].lchs.heads, heads);
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