AcpiPlatform.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /** @file
  2. bhyve ACPI Platform Driver
  3. Copyright (c) 2020, Rebecca Cran <rebecca@bsdio.com>
  4. Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #ifndef _ACPI_PLATFORM_H_INCLUDED_
  8. #define _ACPI_PLATFORM_H_INCLUDED_
  9. #include <PiDxe.h>
  10. #include <Protocol/AcpiTable.h>
  11. #include <Protocol/FirmwareVolume2.h>
  12. #include <Protocol/PciIo.h>
  13. #include <Library/BaseLib.h>
  14. #include <Library/DebugLib.h>
  15. #include <Library/PcdLib.h>
  16. #include <Library/UefiBootServicesTableLib.h>
  17. #include <Library/XenPlatformLib.h>
  18. #include <IndustryStandard/Acpi.h>
  19. typedef struct {
  20. EFI_PCI_IO_PROTOCOL *PciIo;
  21. UINT64 PciAttributes;
  22. } ORIGINAL_ATTRIBUTES;
  23. typedef struct S3_CONTEXT S3_CONTEXT;
  24. EFI_STATUS
  25. EFIAPI
  26. InstallAcpiTable (
  27. IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
  28. IN VOID *AcpiTableBuffer,
  29. IN UINTN AcpiTableBufferSize,
  30. OUT UINTN *TableKey
  31. );
  32. EFI_STATUS
  33. EFIAPI
  34. BhyveInstallAcpiTable (
  35. IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
  36. IN VOID *AcpiTableBuffer,
  37. IN UINTN AcpiTableBufferSize,
  38. OUT UINTN *TableKey
  39. );
  40. EFI_STATUS
  41. EFIAPI
  42. InstallXenTables (
  43. IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
  44. );
  45. EFI_STATUS
  46. EFIAPI
  47. InstallAcpiTables (
  48. IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
  49. );
  50. VOID
  51. EnablePciDecoding (
  52. OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,
  53. OUT UINTN *Count
  54. );
  55. VOID
  56. RestorePciDecoding (
  57. IN ORIGINAL_ATTRIBUTES *OriginalAttributes,
  58. IN UINTN Count
  59. );
  60. #endif /* _ACPI_PLATFORM_H_INCLUDED_ */