summaryrefslogtreecommitdiff
path: root/kernel/bump.c
diff options
context:
space:
mode:
authorNathan Lee <me@nwlee.tech>2026-07-12 12:42:31 -0500
committerNathan Lee <me@nwlee.tech>2026-07-12 12:45:05 -0500
commit24fdac29fb8a1c7766869b05e7a17b2c4cc98ce1 (patch)
tree6fddf53527e7ab52e089b620bcdbcba5fa67daa3 /kernel/bump.c
parent5d9942d70ca61af4d12cd2a531a190c98052c9c4 (diff)
create elf.h
The ELF parser needs more work, there are more structs to be added. memcpy was refactored from mem.h into common.h endianness conversions were standardized in types.h
Diffstat (limited to 'kernel/bump.c')
-rw-r--r--kernel/bump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/bump.c b/kernel/bump.c
index 369f92f..fd4f25d 100644
--- a/kernel/bump.c
+++ b/kernel/bump.c
@@ -19,8 +19,8 @@ struct mem_info *km_find_memory(struct dt_node *head) {
size_t len = 0;
uint32_t *reg = (uint32_t *)dt_get_prop(head, "reg", &len);
if (reg && len >= 8) {
- uint32_t base = be32_to_cpu(reg[0]);
- uint32_t size = be32_to_cpu(reg[1]);
+ uint32_t base = btohi(reg[0]);
+ uint32_t size = btohi(reg[1]);
struct mem_info *ret = kemalloc(sizeof(struct mem_info));
ret->start = (void*)base;
ret->size = (size_t)size;