aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/efi
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2024-09-13 14:26:34 +0100
committerMichael Brown <mcb30@ipxe.org>2024-09-13 14:38:23 +0100
commitc85ad1246890cf3c0c5f2ac6de06ab046ddd0043 (patch)
tree38332dfe1a3bd21503d3f53f693b33fa0d5b49f7 /src/include/ipxe/efi
parent5de5d4626e192f5d0e6c97e14ce03b92a43622b3 (diff)
downloadipxe-c85ad1246890cf3c0c5f2ac6de06ab046ddd0043.tar.gz
[efi] Centralise definition of efi_cpu_nap()
Define a cpu_halt() function which is architecture-specific but platform-independent, and merge the multiple architecture-specific implementations of the EFI cpu_nap() function into a single central efi_cpu_nap() that uses cpu_halt() if applicable. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/efi')
-rw-r--r--src/include/ipxe/efi/efi_nap.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/include/ipxe/efi/efi_nap.h b/src/include/ipxe/efi/efi_nap.h
new file mode 100644
index 000000000..1ffb05569
--- /dev/null
+++ b/src/include/ipxe/efi/efi_nap.h
@@ -0,0 +1,18 @@
+#ifndef _IPXE_EFI_NAP_H
+#define _IPXE_EFI_NAP_H
+
+/** @file
+ *
+ * CPU sleeping
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#ifdef NAP_EFI
+#define NAP_PREFIX_efi
+#else
+#define NAP_PREFIX_efi __efi_
+#endif
+
+#endif /* _IPXE_EFI_NAP_H */