[SeaBIOS] [PATCH 2/5] seabios: acpi: move out endian conversion helper function.
Isaku Yamahata
yamahata at valinux.co.jp
Tue Jul 20 09:37:16 CEST 2010
move out cpu_to_le{32, 16} from acpi.c to util.h.
Those will be used by other files later.
Signed-off-by: Isaku Yamahata <yamahata at valinux.co.jp>
---
src/acpi.c | 10 ----------
src/util.h | 10 ++++++++++
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/acpi.c b/src/acpi.c
index 0559443..8de2696 100644
--- a/src/acpi.c
+++ b/src/acpi.c
@@ -270,16 +270,6 @@ struct srat_memory_affinity
#include "acpi-dsdt.hex"
-static inline u16 cpu_to_le16(u16 x)
-{
- return x;
-}
-
-static inline u32 cpu_to_le32(u32 x)
-{
- return x;
-}
-
static void
build_header(struct acpi_table_header *h, u32 sig, int len, u8 rev)
{
diff --git a/src/util.h b/src/util.h
index 92b3e5c..6c08a3c 100644
--- a/src/util.h
+++ b/src/util.h
@@ -110,6 +110,16 @@ static inline u32 __htonl(u32 val) {
#define htons(x) __htons_constant(x)
#define ntohs(x) htons(x)
+static inline u16 cpu_to_le16(u16 x)
+{
+ return x;
+}
+
+static inline u32 cpu_to_le32(u32 x)
+{
+ return x;
+}
+
static inline u32 getesp(void) {
u32 esp;
asm("movl %%esp, %0" : "=rm"(esp));
--
1.7.1.1
More information about the SeaBIOS
mailing list