mpacpi.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * ACPI definitions
  3. *
  4. * A System Descriptor Table starts with a header of 4 bytes of signature
  5. * followed by 4 bytes of total table length then 28 bytes of ID information
  6. * (including the table checksum).
  7. */
  8. typedef struct Dsdt Dsdt;
  9. typedef struct Facp Facp;
  10. typedef struct Hpet Hpet;
  11. typedef struct Madt Madt;
  12. typedef struct Mcfg Mcfg;
  13. typedef struct Mcfgd Mcfgd;
  14. typedef struct Rsd Rsd;
  15. struct Dsdt { /* Differentiated System DT */
  16. uchar sdthdr[36]; /* "DSDT" + length[4] + [28] */
  17. uchar db[]; /* Definition Block */
  18. };
  19. struct Facp { /* Fixed ACPI DT */
  20. uchar sdthdr[36]; /* "FACP" + length[4] + [28] */
  21. uchar faddr[4]; /* Firmware Control Address */
  22. uchar dsdt[4]; /* DSDT Address */
  23. uchar pad[200]; /* total table is 244 */
  24. };
  25. struct Hpet { /* High-Precision Event Timer DT */
  26. uchar sdthdr[36]; /* "HPET" + length[4] + [28] */
  27. uchar id[4]; /* Event Timer Block ID */
  28. uchar addr[12]; /* ACPI Format Address */
  29. uchar seqno; /* Sequence Number */
  30. uchar minticks[2]; /* Minimum Clock Tick */
  31. uchar attr; /* Page Protection */
  32. };
  33. struct Madt { /* Multiple APIC DT */
  34. uchar sdthdr[36]; /* "MADT" + length[4] + [28] */
  35. uchar addr[4]; /* Local APIC Address */
  36. uchar flags[4];
  37. uchar structures[];
  38. };
  39. typedef struct Mcfg { /* PCI Memory Mapped Config */
  40. uchar sdthdr[36]; /* "MCFG" + length[4] + [28] */
  41. uchar pad[8]; /* reserved */
  42. Mcfgd mcfgd[]; /* descriptors */
  43. } Mcfg;
  44. struct Mcfgd { /* MCFG Descriptor */
  45. uchar addr[8]; /* base address */
  46. uchar segno[2]; /* segment group number */
  47. uchar sbno; /* start bus number */
  48. uchar ebno; /* end bus number */
  49. uchar pad[4]; /* reserved */
  50. };
  51. struct Rsd { /* Root System Description * */
  52. uchar signature[8]; /* "RSD PTR " */
  53. uchar rchecksum;
  54. uchar oemid[6];
  55. uchar revision;
  56. uchar raddr[4]; /* RSDT */
  57. uchar length[4];
  58. uchar xaddr[8]; /* XSDT */
  59. uchar xchecksum; /* XSDT */
  60. uchar pad[3]; /* reserved */
  61. };