diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2010-07-20 16:37:16 +0900 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-07-24 13:30:03 -0400 |
commit | 2f54bb4d75dcef095766877e9264c15fa916d165 (patch) | |
tree | 8694a127c0b24d4f1c4932f0c9e57f6a370af02d /src/util.h | |
parent | 23173ac5d77f8087e0aab05cd7fc4700951de48b (diff) | |
download | seabios-2f54bb4d75dcef095766877e9264c15fa916d165.tar.gz |
seabios: acpi: move out endian conversion helper function.
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@valinux.co.jp>
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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)); |