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.

acpi.h 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef _IPXE_ACPI_H
  2. #define _IPXE_ACPI_H
  3. /** @file
  4. *
  5. * ACPI data structures
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  9. #include <stdint.h>
  10. #include <ipxe/interface.h>
  11. /**
  12. * An ACPI description header
  13. *
  14. * This is the structure common to the start of all ACPI system
  15. * description tables.
  16. */
  17. struct acpi_description_header {
  18. /** ACPI signature (4 ASCII characters) */
  19. uint32_t signature;
  20. /** Length of table, in bytes, including header */
  21. uint32_t length;
  22. /** ACPI Specification minor version number */
  23. uint8_t revision;
  24. /** To make sum of entire table == 0 */
  25. uint8_t checksum;
  26. /** OEM identification */
  27. char oem_id[6];
  28. /** OEM table identification */
  29. char oem_table_id[8];
  30. /** OEM revision number */
  31. uint32_t oem_revision;
  32. /** ASL compiler vendor ID */
  33. char asl_compiler_id[4];
  34. /** ASL compiler revision number */
  35. uint32_t asl_compiler_revision;
  36. } __attribute__ (( packed ));
  37. /**
  38. * Build ACPI signature
  39. *
  40. * @v a First character of ACPI signature
  41. * @v b Second character of ACPI signature
  42. * @v c Third character of ACPI signature
  43. * @v d Fourth character of ACPI signature
  44. * @ret signature ACPI signature
  45. */
  46. #define ACPI_SIGNATURE( a, b, c, d ) \
  47. ( ( (a) << 0 ) | ( (b) << 8 ) | ( (c) << 16 ) | ( (d) << 24 ) )
  48. extern int acpi_describe ( struct interface *interface,
  49. struct acpi_description_header *acpi, size_t len );
  50. #define acpi_describe_TYPE( object_type ) \
  51. typeof ( int ( object_type, \
  52. struct acpi_description_header *acpi, \
  53. size_t len ) )
  54. extern void acpi_fix_checksum ( struct acpi_description_header *acpi );
  55. #endif /* _IPXE_ACPI_H */