]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Centralise dummy architecture-specific headers
authorMichael Brown <mcb30@ipxe.org>
Tue, 3 Sep 2024 13:56:07 +0000 (14:56 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 3 Sep 2024 16:32:26 +0000 (17:32 +0100)
Simplify the process of adding a new CPU architecture by providing
common implementations of typically empty architecture-specific header
files.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
45 files changed:
src/Makefile.housekeeping
src/arch/arm/Makefile
src/arch/arm/include/bits/acpi.h [deleted file]
src/arch/arm/include/bits/hyperv.h [deleted file]
src/arch/arm/include/bits/iomap.h [deleted file]
src/arch/arm/include/bits/mp.h [deleted file]
src/arch/arm/include/bits/pci_io.h [deleted file]
src/arch/arm/include/bits/reboot.h [deleted file]
src/arch/arm/include/bits/sanboot.h [deleted file]
src/arch/arm/include/bits/smbios.h [deleted file]
src/arch/arm/include/bits/time.h [deleted file]
src/arch/arm/include/bits/uaccess.h [deleted file]
src/arch/arm/include/bits/uart.h [deleted file]
src/arch/arm/include/bits/umalloc.h [deleted file]
src/arch/arm32/include/bits/tcpip.h [deleted file]
src/arch/loong64/Makefile
src/arch/loong64/include/bits/acpi.h [deleted file]
src/arch/loong64/include/bits/hyperv.h [deleted file]
src/arch/loong64/include/bits/iomap.h [deleted file]
src/arch/loong64/include/bits/mp.h [deleted file]
src/arch/loong64/include/bits/pci_io.h [deleted file]
src/arch/loong64/include/bits/reboot.h [deleted file]
src/arch/loong64/include/bits/sanboot.h [deleted file]
src/arch/loong64/include/bits/smbios.h [deleted file]
src/arch/loong64/include/bits/tcpip.h [deleted file]
src/arch/loong64/include/bits/time.h [deleted file]
src/arch/loong64/include/bits/uaccess.h [deleted file]
src/arch/loong64/include/bits/uart.h [deleted file]
src/arch/loong64/include/bits/umalloc.h [deleted file]
src/arch/x86/Makefile
src/include/bits/acpi.h [new file with mode: 0644]
src/include/bits/hyperv.h [new file with mode: 0644]
src/include/bits/iomap.h [new file with mode: 0644]
src/include/bits/mp.h [new file with mode: 0644]
src/include/bits/nap.h [new file with mode: 0644]
src/include/bits/pci_io.h [new file with mode: 0644]
src/include/bits/reboot.h [new file with mode: 0644]
src/include/bits/sanboot.h [new file with mode: 0644]
src/include/bits/smbios.h [new file with mode: 0644]
src/include/bits/tcpip.h [new file with mode: 0644]
src/include/bits/time.h [new file with mode: 0644]
src/include/bits/uaccess.h [new file with mode: 0644]
src/include/bits/uart.h [new file with mode: 0644]
src/include/bits/umalloc.h [new file with mode: 0644]
src/include/bits/xen.h [moved from src/arch/loong64/include/bits/xen.h with 50% similarity]

index d13cb3671ba0ca397a7e0fac3f1cb800888f686a..5d9c039308b2ca2bd15a2643c130044b3e682b62 100644 (file)
@@ -366,11 +366,6 @@ MAKEDEPS   += arch/$(ARCH)/Makefile
 include arch/$(ARCH)/Makefile
 endif
 
-# Include architecture-specific include path
-ifdef ARCH
-INCDIRS                += arch/$(ARCH)/include
-endif
-
 ###############################################################################
 #
 # Especially ugly workarounds
index b6509dda0c3f9d74650ed0a4687b38d4515fcb4d..f827ed42268fc0f653a6ccf2526210d945374294 100644 (file)
@@ -3,9 +3,9 @@
 ASM_TCHAR      := %
 ASM_TCHAR_OPS  := %%
 
-# Include common ARM headers
+# Include ARM-specific headers
 #
-INCDIRS                += arch/arm/include
+INCDIRS                := arch/$(ARCH)/include arch/arm/include $(INCDIRS)
 
 # ARM-specific directories containing source files
 #
diff --git a/src/arch/arm/include/bits/acpi.h b/src/arch/arm/include/bits/acpi.h
deleted file mode 100644 (file)
index f9f2f00..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_ACPI_H
-#define _BITS_ACPI_H
-
-/** @file
- *
- * ARM-specific ACPI API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_ACPI_H */
diff --git a/src/arch/arm/include/bits/hyperv.h b/src/arch/arm/include/bits/hyperv.h
deleted file mode 100644 (file)
index f0e0c87..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_HYPERV_H
-#define _BITS_HYPERV_H
-
-/** @file
- *
- * Hyper-V interface
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_HYPERV_H */
diff --git a/src/arch/arm/include/bits/iomap.h b/src/arch/arm/include/bits/iomap.h
deleted file mode 100644 (file)
index ae953c4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_IOMAP_H
-#define _BITS_IOMAP_H
-
-/** @file
- *
- * ARM-specific I/O mapping API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_IOMAP_H */
diff --git a/src/arch/arm/include/bits/mp.h b/src/arch/arm/include/bits/mp.h
deleted file mode 100644 (file)
index e7d4c0c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_MP_H
-#define _BITS_MP_H
-
-/** @file
- *
- * ARM-specific multiprocessor API implementation
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_MP_H */
diff --git a/src/arch/arm/include/bits/pci_io.h b/src/arch/arm/include/bits/pci_io.h
deleted file mode 100644 (file)
index 91f507a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_PCI_IO_H
-#define _BITS_PCI_IO_H
-
-/** @file
- *
- * ARM PCI I/O API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_PCI_IO_H */
diff --git a/src/arch/arm/include/bits/reboot.h b/src/arch/arm/include/bits/reboot.h
deleted file mode 100644 (file)
index 88c5025..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_REBOOT_H
-#define _BITS_REBOOT_H
-
-/** @file
- *
- * ARM-specific reboot API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_REBOOT_H */
diff --git a/src/arch/arm/include/bits/sanboot.h b/src/arch/arm/include/bits/sanboot.h
deleted file mode 100644 (file)
index abd4c79..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_SANBOOT_H
-#define _BITS_SANBOOT_H
-
-/** @file
- *
- * ARM-specific sanboot API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_SANBOOT_H */
diff --git a/src/arch/arm/include/bits/smbios.h b/src/arch/arm/include/bits/smbios.h
deleted file mode 100644 (file)
index d942181..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_SMBIOS_H
-#define _BITS_SMBIOS_H
-
-/** @file
- *
- * ARM-specific SMBIOS API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_SMBIOS_H */
diff --git a/src/arch/arm/include/bits/time.h b/src/arch/arm/include/bits/time.h
deleted file mode 100644 (file)
index 724d8b9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_TIME_H
-#define _BITS_TIME_H
-
-/** @file
- *
- * ARM-specific time API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_TIME_H */
diff --git a/src/arch/arm/include/bits/uaccess.h b/src/arch/arm/include/bits/uaccess.h
deleted file mode 100644 (file)
index 87f1150..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_UACCESS_H
-#define _BITS_UACCESS_H
-
-/** @file
- *
- * ARM-specific user access API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_UACCESS_H */
diff --git a/src/arch/arm/include/bits/uart.h b/src/arch/arm/include/bits/uart.h
deleted file mode 100644 (file)
index 6f85975..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_UART_H
-#define _BITS_UART_H
-
-/** @file
- *
- * 16550-compatible UART
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_UART_H */
diff --git a/src/arch/arm/include/bits/umalloc.h b/src/arch/arm/include/bits/umalloc.h
deleted file mode 100644 (file)
index 27970d7..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_UMALLOC_H
-#define _BITS_UMALLOC_H
-
-/** @file
- *
- * ARM-specific user memory allocation API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_UMALLOC_H */
diff --git a/src/arch/arm32/include/bits/tcpip.h b/src/arch/arm32/include/bits/tcpip.h
deleted file mode 100644 (file)
index fc3c5b3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _BITS_TCPIP_H
-#define _BITS_TCPIP_H
-
-/** @file
- *
- * Transport-network layer interface
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-static inline __attribute__ (( always_inline )) uint16_t
-tcpip_continue_chksum ( uint16_t partial, const void *data, size_t len ) {
-
-       /* Not yet optimised */
-       return generic_tcpip_continue_chksum ( partial, data, len );
-}
-
-#endif /* _BITS_TCPIP_H */
index fd0bf137fb435dcf07342d673d4dd9a5b5c18fe2..90d0ec8e1eb7f095c1812c9796058a553b97c973 100644 (file)
@@ -18,6 +18,9 @@ endif
 # EFI requires -fshort-wchar, and nothing else currently uses wchar_t
 CFLAGS         += -fshort-wchar
 
+# Include LoongArch64-specific headers
+INCDIRS                := arch/$(ARCH)/include $(INCDIRS)
+
 # LoongArch64-specific directories containing source files
 SRCDIRS                += arch/loong64/core
 SRCDIRS                += arch/loong64/interface/efi
diff --git a/src/arch/loong64/include/bits/acpi.h b/src/arch/loong64/include/bits/acpi.h
deleted file mode 100644 (file)
index 83dd1df..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_ACPI_H
-#define _BITS_ACPI_H
-
-/** @file
- *
- * LoongArch64-specific ACPI API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_ACPI_H */
diff --git a/src/arch/loong64/include/bits/hyperv.h b/src/arch/loong64/include/bits/hyperv.h
deleted file mode 100644 (file)
index f0e0c87..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_HYPERV_H
-#define _BITS_HYPERV_H
-
-/** @file
- *
- * Hyper-V interface
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_HYPERV_H */
diff --git a/src/arch/loong64/include/bits/iomap.h b/src/arch/loong64/include/bits/iomap.h
deleted file mode 100644 (file)
index 041171d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_IOMAP_H
-#define _BITS_IOMAP_H
-
-/** @file
- *
- * LoongArch64-specific I/O mapping API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_IOMAP_H */
diff --git a/src/arch/loong64/include/bits/mp.h b/src/arch/loong64/include/bits/mp.h
deleted file mode 100644 (file)
index fef2fd5..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_MP_H
-#define _BITS_MP_H
-
-/** @file
- *
- * LoongArch64-specific multiprocessor API implementation
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_MP_H */
diff --git a/src/arch/loong64/include/bits/pci_io.h b/src/arch/loong64/include/bits/pci_io.h
deleted file mode 100644 (file)
index fdc5141..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_PCI_IO_H
-#define _BITS_PCI_IO_H
-
-/** @file
- *
- * LoongArch64-specific PCI I/O API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_PCI_IO_H */
diff --git a/src/arch/loong64/include/bits/reboot.h b/src/arch/loong64/include/bits/reboot.h
deleted file mode 100644 (file)
index 96a1eb1..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_REBOOT_H
-#define _BITS_REBOOT_H
-
-/** @file
- *
- * LoongArch64-specific reboot API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_REBOOT_H */
diff --git a/src/arch/loong64/include/bits/sanboot.h b/src/arch/loong64/include/bits/sanboot.h
deleted file mode 100644 (file)
index f9205e2..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_SANBOOT_H
-#define _BITS_SANBOOT_H
-
-/** @file
- *
- * LoongArch64-specific sanboot API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_SANBOOT_H */
diff --git a/src/arch/loong64/include/bits/smbios.h b/src/arch/loong64/include/bits/smbios.h
deleted file mode 100644 (file)
index 6c87db4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_SMBIOS_H
-#define _BITS_SMBIOS_H
-
-/** @file
- *
- * LoongArch64-specific SMBIOS API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_SMBIOS_H */
diff --git a/src/arch/loong64/include/bits/tcpip.h b/src/arch/loong64/include/bits/tcpip.h
deleted file mode 100644 (file)
index fc3c5b3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _BITS_TCPIP_H
-#define _BITS_TCPIP_H
-
-/** @file
- *
- * Transport-network layer interface
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-static inline __attribute__ (( always_inline )) uint16_t
-tcpip_continue_chksum ( uint16_t partial, const void *data, size_t len ) {
-
-       /* Not yet optimised */
-       return generic_tcpip_continue_chksum ( partial, data, len );
-}
-
-#endif /* _BITS_TCPIP_H */
diff --git a/src/arch/loong64/include/bits/time.h b/src/arch/loong64/include/bits/time.h
deleted file mode 100644 (file)
index 4cd7485..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_TIME_H
-#define _BITS_TIME_H
-
-/** @file
- *
- * LoongArch64-specific time API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_TIME_H */
diff --git a/src/arch/loong64/include/bits/uaccess.h b/src/arch/loong64/include/bits/uaccess.h
deleted file mode 100644 (file)
index dddd9be..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_UACCESS_H
-#define _BITS_UACCESS_H
-
-/** @file
- *
- * LoongArch64-specific user access API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_UACCESS_H */
diff --git a/src/arch/loong64/include/bits/uart.h b/src/arch/loong64/include/bits/uart.h
deleted file mode 100644 (file)
index 6f85975..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_UART_H
-#define _BITS_UART_H
-
-/** @file
- *
- * 16550-compatible UART
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_UART_H */
diff --git a/src/arch/loong64/include/bits/umalloc.h b/src/arch/loong64/include/bits/umalloc.h
deleted file mode 100644 (file)
index f6978b8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_UMALLOC_H
-#define _BITS_UMALLOC_H
-
-/** @file
- *
- * LoongArch64-specific user memory allocation API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_UMALLOC_H */
index ef801365e531f6b93ad8eafab4031d8a10ba1963..4a4d8ee913775292124143f4fa785f76a217326a 100644 (file)
@@ -3,9 +3,9 @@
 ASM_TCHAR      := @
 ASM_TCHAR_OPS  := @
 
-# Include common x86 headers
+# Include x86-specific headers
 #
-INCDIRS                += arch/x86/include
+INCDIRS                := arch/$(ARCH)/include arch/x86/include $(INCDIRS)
 
 # x86-specific directories containing source files
 #
diff --git a/src/include/bits/acpi.h b/src/include/bits/acpi.h
new file mode 100644 (file)
index 0000000..d984205
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_ACPI_H
+#define _BITS_ACPI_H
+
+/** @file
+ *
+ * Dummy architecture-specific ACPI API implementations
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_ACPI_H */
diff --git a/src/include/bits/hyperv.h b/src/include/bits/hyperv.h
new file mode 100644 (file)
index 0000000..fd7ceee
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_HYPERV_H
+#define _BITS_HYPERV_H
+
+/** @file
+ *
+ * Dummy architecture-specific Hyper-V interface
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_HYPERV_H */
diff --git a/src/include/bits/iomap.h b/src/include/bits/iomap.h
new file mode 100644 (file)
index 0000000..b3d8d0c
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_IOMAP_H
+#define _BITS_IOMAP_H
+
+/** @file
+ *
+ * Dummy architecture-specific I/O mapping API implementations
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_IOMAP_H */
diff --git a/src/include/bits/mp.h b/src/include/bits/mp.h
new file mode 100644 (file)
index 0000000..d7d2cdc
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_MP_H
+#define _BITS_MP_H
+
+/** @file
+ *
+ * Dummy architecture-specific multiprocessor API implementations
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_MP_H */
diff --git a/src/include/bits/nap.h b/src/include/bits/nap.h
new file mode 100644 (file)
index 0000000..7b01f94
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_NAP_H
+#define _BITS_NAP_H
+
+/** @file
+ *
+ * Dummy architecture-specific CPU sleeping API implementations
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_NAP_H */
diff --git a/src/include/bits/pci_io.h b/src/include/bits/pci_io.h
new file mode 100644 (file)
index 0000000..711449f
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_PCI_IO_H
+#define _BITS_PCI_IO_H
+
+/** @file
+ *
+ * Dummy architecture-specific PCI I/O API implementations
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_PCI_IO_H */
diff --git a/src/include/bits/reboot.h b/src/include/bits/reboot.h
new file mode 100644 (file)
index 0000000..023647f
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_REBOOT_H
+#define _BITS_REBOOT_H
+
+/** @file
+ *
+ * Dummy architecture-specific reboot API implementations
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_REBOOT_H */
diff --git a/src/include/bits/sanboot.h b/src/include/bits/sanboot.h
new file mode 100644 (file)
index 0000000..addbb5b
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_SANBOOT_H
+#define _BITS_SANBOOT_H
+
+/** @file
+ *
+ * Dummy architecture-specific sanboot API implementations
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_SANBOOT_H */
diff --git a/src/include/bits/smbios.h b/src/include/bits/smbios.h
new file mode 100644 (file)
index 0000000..3e06aad
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_SMBIOS_H
+#define _BITS_SMBIOS_H
+
+/** @file
+ *
+ * Dummy architecture-specific SMBIOS API implementations
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_SMBIOS_H */
diff --git a/src/include/bits/tcpip.h b/src/include/bits/tcpip.h
new file mode 100644 (file)
index 0000000..9cb54d4
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef _BITS_TCPIP_H
+#define _BITS_TCPIP_H
+
+/** @file
+ *
+ * Generic architecture-specific transport-network layer interface
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#include <stdint.h>
+
+/**
+ * Calculate continued TCP/IP checkum
+ *
+ * @v partial          Checksum of already-summed data, in network byte order
+ * @v data             Data buffer
+ * @v len              Length of data buffer
+ * @ret cksum          Updated checksum, in network byte order
+ */
+static inline __attribute__ (( always_inline )) uint16_t
+tcpip_continue_chksum ( uint16_t partial, const void *data, size_t len ) {
+
+       /* Not yet optimised */
+       return generic_tcpip_continue_chksum ( partial, data, len );
+}
+
+#endif /* _BITS_TCPIP_H */
diff --git a/src/include/bits/time.h b/src/include/bits/time.h
new file mode 100644 (file)
index 0000000..aec9c2f
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_TIME_H
+#define _BITS_TIME_H
+
+/** @file
+ *
+ * Dummy architecture-specific time API implementations
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_TIME_H */
diff --git a/src/include/bits/uaccess.h b/src/include/bits/uaccess.h
new file mode 100644 (file)
index 0000000..09f5f46
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_UACCESS_H
+#define _BITS_UACCESS_H
+
+/** @file
+ *
+ * Dummy architecture-specific user access API implementations
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_UACCESS_H */
diff --git a/src/include/bits/uart.h b/src/include/bits/uart.h
new file mode 100644 (file)
index 0000000..e132d5c
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_UART_H
+#define _BITS_UART_H
+
+/** @file
+ *
+ * Dummy architecture-specific UART
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_UART_H */
diff --git a/src/include/bits/umalloc.h b/src/include/bits/umalloc.h
new file mode 100644 (file)
index 0000000..4927f0d
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _BITS_UMALLOC_H
+#define _BITS_UMALLOC_H
+
+/** @file
+ *
+ * Dummy architecture-specific user memory allocation API implementations
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_UMALLOC_H */
similarity index 50%
rename from src/arch/loong64/include/bits/xen.h
rename to src/include/bits/xen.h
index 2a3d7741cb2bac107e24c43dd62992995df1d034..7d0036bc0324fcf9ba10bcd2140bfe23ad5dda38 100644 (file)
@@ -3,7 +3,10 @@
 
 /** @file
  *
- * Xen interface
+ * Dummy architecture-specific Xen interface
+ *
+ * This file is included only if the architecture does not provide its
+ * own version of this file.
  *
  */
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );