Changeset 41580 in vbox
- Timestamp:
- Jun 5, 2012 2:26:59 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r41490 r41580 42 42 #define NET_BOOT_DEVS 4 43 43 44 #define CMOS_BANK_LOWER_LIMIT 0x0E 45 #define CMOS_BANK_UPPER_LIMIT 0x7F 46 #define CMOS_BANK2_LOWER_LIMIT 0x80 47 #define CMOS_BANK2_UPPER_LIMIT 0xFF 44 48 45 49 /** @page pg_devbios_cmos_assign CMOS Assignments (BIOS) … … 257 261 } 258 262 263 /** 264 * @callback_method_impl{FNDBGFHANDLERDEV, 265 * Dumps the cmos Bank Info.} 266 */ 267 static DECLCALLBACK(void) CMOSBankInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs) 268 { 269 const char *PChCMOSBank = "CMOS Bank Info 0x0E - 0x7F"; 270 uint16_t u16ByteCount = 0; 271 uint8_t u8CMOSByte; 272 pHlp->pfnPrintf(pHlp, "%s\n" ,PChCMOSBank); 273 for (u16ByteCount = CMOS_BANK_LOWER_LIMIT; u16ByteCount < CMOS_BANK_UPPER_LIMIT; u16ByteCount++) 274 { 275 u8CMOSByte = pcbiosCmosRead(pDevIns, u16ByteCount); 276 pHlp->pfnPrintf(pHlp, "Off: 0x%02x Val: 0x%02x\n",u16ByteCount, u8CMOSByte); 277 } 278 } 279 280 /** 281 * @callback_method_impl{FNDBGFHANDLERDEV, 282 * Dumps the cmos Bank2 Info.} 283 */ 284 static DECLCALLBACK(void) CMOSBank2Info(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs) 285 { 286 const char *PChCMOSBank = "CMOS Bank2 Info 0x80 - 0xFF"; 287 uint16_t u16ByteCount = 0; 288 uint8_t u8CMOSByte; 289 pHlp->pfnPrintf(pHlp, "%s\n" ,PChCMOSBank); 290 for (u16ByteCount = CMOS_BANK2_LOWER_LIMIT; u16ByteCount < CMOS_BANK2_UPPER_LIMIT; u16ByteCount++) 291 { 292 u8CMOSByte = pcbiosCmosRead(pDevIns, u16ByteCount); 293 pHlp->pfnPrintf(pHlp, "Off: 0x%02x Val: 0x%02x\n",u16ByteCount, u8CMOSByte); 294 } 295 296 } 259 297 /* -=-=-=-=-=-=- based on code from pc.c -=-=-=-=-=-=- */ 260 298 … … 1430 1468 if (pThis->uBootDelay > 15) 1431 1469 pThis->uBootDelay = 15; 1470 1471 /* 1472 * Register debugger info callback. 1473 */ 1474 PDMDevHlpDBGFInfoRegister(pDevIns, "cmos", "Display CMOS Bank 1 Info.. " 1475 "'cmos'. No argument.", CMOSBankInfo); 1476 PDMDevHlpDBGFInfoRegister(pDevIns, "cmos2", "Display CMOS Bank 2 Info.. " 1477 "'cmos2'. No argument", CMOSBank2Info); 1432 1478 1433 1479 /*
Note:
See TracChangeset
for help on using the changeset viewer.