Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
3.4 KiB

  1. extern "C" {
  2. #include <nt.h>
  3. typedef PVOID PPM_DISPATCH_TABLE;
  4. #include <ntacpi.h>
  5. #include <acpitabl.h>
  6. #include <stdio.h>
  7. }
  8. void
  9. PrintACPITable(
  10. PVOID AcpiTable
  11. )
  12. {
  13. PWATCHDOG_TIMER_RESOURCE_TABLE WdTable = (PWATCHDOG_TIMER_RESOURCE_TABLE)AcpiTable;
  14. wprintf( L"\n" );
  15. wprintf( L"Signature [%08x]\n", WdTable->Header.Signature );
  16. wprintf( L"Length [%08x]\n", WdTable->Header.Length );
  17. wprintf( L"Revision [%02x]\n", WdTable->Header.Revision );
  18. wprintf( L"Checksum [%02x]\n", WdTable->Header.Checksum );
  19. wprintf( L"OEMID [%c%c%c%c%c%c]\n", WdTable->Header.OEMID[0],
  20. WdTable->Header.OEMID[1],
  21. WdTable->Header.OEMID[2],
  22. WdTable->Header.OEMID[3],
  23. WdTable->Header.OEMID[4],
  24. WdTable->Header.OEMID[5] );
  25. wprintf( L"OEMTableID [%c%c%c%c%c%c%c%c]\n", WdTable->Header.OEMTableID[0],
  26. WdTable->Header.OEMTableID[1],
  27. WdTable->Header.OEMTableID[2],
  28. WdTable->Header.OEMTableID[3],
  29. WdTable->Header.OEMTableID[4],
  30. WdTable->Header.OEMTableID[5],
  31. WdTable->Header.OEMTableID[6],
  32. WdTable->Header.OEMTableID[7] );
  33. wprintf( L"OEMRevision [%08x]\n", WdTable->Header.OEMRevision );
  34. wprintf( L"CreatorID [%c%c%c%c]\n", WdTable->Header.CreatorID[0],
  35. WdTable->Header.CreatorID[1],
  36. WdTable->Header.CreatorID[2],
  37. WdTable->Header.CreatorID[3] );
  38. wprintf( L"CreatorRev [%08x]\n", WdTable->Header.CreatorRev );
  39. wprintf( L"ControlRegisterAddress [%08x]\n", WdTable->ControlRegisterAddress.Address.u.LowPart );
  40. wprintf( L"CountRegisterAddress [%08x]\n", WdTable->CountRegisterAddress.Address.u.LowPart );
  41. wprintf( L"PciDeviceId [%04x]\n", WdTable->PciDeviceId );
  42. wprintf( L"PciVendorId [%04x]\n", WdTable->PciVendorId );
  43. wprintf( L"PciBusNumber [%02x]\n", WdTable->PciBusNumber );
  44. wprintf( L"PciSlotNumber [%02x]\n", WdTable->PciSlotNumber );
  45. wprintf( L"PciFunctionNumber [%02x]\n", WdTable->PciFunctionNumber );
  46. wprintf( L"PciSegment [%02x]\n", WdTable->PciSegment );
  47. wprintf( L"MaxCount [%04x]\n", WdTable->MaxCount );
  48. wprintf( L"Units [%02x]\n", WdTable->Units );
  49. }