summaryrefslogtreecommitdiff
path: root/source/include/platform/acefiex.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/include/platform/acefiex.h')
-rw-r--r--source/include/platform/acefiex.h103
1 files changed, 93 insertions, 10 deletions
diff --git a/source/include/platform/acefiex.h b/source/include/platform/acefiex.h
index 2afde26b4698..a392fd269f50 100644
--- a/source/include/platform/acefiex.h
+++ b/source/include/platform/acefiex.h
@@ -597,6 +597,11 @@ ACPI_EFI_STATUS
typedef
ACPI_EFI_STATUS
+(ACPI_EFI_API *ACPI_EFI_STALL) (
+ UINTN Microseconds);
+
+typedef
+ACPI_EFI_STATUS
(ACPI_EFI_API *ACPI_EFI_SET_WATCHDOG_TIMER) (
UINTN Timeout,
UINT64 WatchdogCode,
@@ -665,6 +670,27 @@ ACPI_EFI_STATUS
/*
+ * EFI Time
+ */
+typedef struct {
+ UINT32 Resolution;
+ UINT32 Accuracy;
+ BOOLEAN SetsToZero;
+} ACPI_EFI_TIME_CAPABILITIES;
+
+typedef
+ACPI_EFI_STATUS
+(ACPI_EFI_API *ACPI_EFI_GET_TIME) (
+ ACPI_EFI_TIME *Time,
+ ACPI_EFI_TIME_CAPABILITIES *Capabilities);
+
+typedef
+ACPI_EFI_STATUS
+(ACPI_EFI_API *ACPI_EFI_SET_TIME) (
+ ACPI_EFI_TIME *Time);
+
+
+/*
* Protocol handler functions
*/
typedef enum {
@@ -890,12 +916,11 @@ typedef struct _ACPI_EFI_BOOT_SERVICES {
#if 0
ACPI_EFI_EXIT_BOOT_SERVICES ExitBootServices;
ACPI_EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
- ACPI_EFI_STALL Stall;
#else
ACPI_EFI_UNKNOWN_INTERFACE ExitBootServices;
ACPI_EFI_UNKNOWN_INTERFACE GetNextMonotonicCount;
- ACPI_EFI_UNKNOWN_INTERFACE Stall;
#endif
+ ACPI_EFI_STALL Stall;
ACPI_EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;
#if 0
@@ -929,6 +954,54 @@ typedef struct _ACPI_EFI_BOOT_SERVICES {
/*
+ * EFI Runtime Services Table
+ */
+#define ACPI_EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552
+#define ACPI_EFI_RUNTIME_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)
+
+typedef struct _ACPI_EFI_RUNTIME_SERVICES {
+ ACPI_EFI_TABLE_HEADER Hdr;
+
+ ACPI_EFI_GET_TIME GetTime;
+ ACPI_EFI_SET_TIME SetTime;
+#if 0
+ ACPI_EFI_GET_WAKEUP_TIME GetWakeupTime;
+ ACPI_EFI_SET_WAKEUP_TIME SetWakeupTime;
+#else
+ ACPI_EFI_UNKNOWN_INTERFACE GetWakeupTime;
+ ACPI_EFI_UNKNOWN_INTERFACE SetWakeupTime;
+#endif
+
+#if 0
+ ACPI_EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
+ ACPI_EFI_CONVERT_POINTER ConvertPointer;
+#else
+ ACPI_EFI_UNKNOWN_INTERFACE SetVirtualAddressMap;
+ ACPI_EFI_UNKNOWN_INTERFACE ConvertPointer;
+#endif
+
+#if 0
+ ACPI_EFI_GET_VARIABLE GetVariable;
+ ACPI_EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
+ ACPI_EFI_SET_VARIABLE SetVariable;
+#else
+ ACPI_EFI_UNKNOWN_INTERFACE GetVariable;
+ ACPI_EFI_UNKNOWN_INTERFACE GetNextVariableName;
+ ACPI_EFI_UNKNOWN_INTERFACE SetVariable;
+#endif
+
+#if 0
+ ACPI_EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
+ ACPI_EFI_RESET_SYSTEM ResetSystem;
+#else
+ ACPI_EFI_UNKNOWN_INTERFACE GetNextHighMonotonicCount;
+ ACPI_EFI_UNKNOWN_INTERFACE ResetSystem;
+#endif
+
+} ACPI_EFI_RUNTIME_SERVICES;
+
+
+/*
* EFI System Table
*/
@@ -964,11 +1037,7 @@ typedef struct _ACPI_EFI_SYSTEM_TABLE {
ACPI_EFI_HANDLE StandardErrorHandle;
ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE *StdErr;
-#if 0
ACPI_EFI_RUNTIME_SERVICES *RuntimeServices;
-#else
- ACPI_EFI_HANDLE *RuntimeServices;
-#endif
ACPI_EFI_BOOT_SERVICES *BootServices;
UINTN NumberOfTableEntries;
@@ -1051,19 +1120,34 @@ union acpi_efi_file {
};
-/* GNU EFI definitions */
+/* EFI definitions */
-#if defined(_GNU_EFI)
+#if defined(_GNU_EFI) || defined(_EDK2_EFI)
/*
* This is needed to hide platform specific code from ACPICA
*/
-UINT64
+UINT64 ACPI_EFI_API
DivU64x32 (
UINT64 Dividend,
UINTN Divisor,
UINTN *Remainder);
+UINT64 ACPI_EFI_API
+MultU64x32 (
+ UINT64 Multiplicand,
+ UINTN Multiplier);
+
+UINT64 ACPI_EFI_API
+LShiftU64 (
+ UINT64 Operand,
+ UINTN Count);
+
+UINT64 ACPI_EFI_API
+RShiftU64 (
+ UINT64 Operand,
+ UINTN Count);
+
/*
* EFI specific prototypes
*/
@@ -1077,7 +1161,6 @@ acpi_main (
int argc,
char *argv[]);
-
#endif
extern ACPI_EFI_GUID AcpiGbl_LoadedImageProtocol;