acpi.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* acpi.c - get acpi tables. */
  2. /*
  3. * GRUB -- GRand Unified Bootloader
  4. * Copyright (C) 2009 Free Software Foundation, Inc.
  5. *
  6. * GRUB is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * GRUB is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #include <grub/acpi.h>
  20. #include <grub/efi/efi.h>
  21. struct grub_acpi_rsdp_v10 *
  22. grub_machine_acpi_get_rsdpv1 (void)
  23. {
  24. static grub_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
  25. return (struct grub_acpi_rsdp_v10 *) grub_efi_find_configuration_table (&acpi_guid);
  26. }
  27. struct grub_acpi_rsdp_v20 *
  28. grub_machine_acpi_get_rsdpv2 (void)
  29. {
  30. static grub_guid_t acpi20_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
  31. return (struct grub_acpi_rsdp_v20 *) grub_efi_find_configuration_table (&acpi20_guid);
  32. }