diff --git a/arch/init.c b/arch/init.c index 1ea9356..422b812 100644 --- a/arch/init.c +++ b/arch/init.c @@ -13,7 +13,7 @@ extern char _kernel_stack_top; static struct KernelMQ_Info kinfo; -const struct KernelMQ_Info *init(unsigned long multiboot_magic, unsigned long multiboot_info_addr) +const struct KernelMQ_Info *init(unsigned long multiboot_magic, unsigned long multiboot_info_base) { if (multiboot_magic != MULTIBOOT_MAGIC) { return 0; @@ -21,7 +21,7 @@ const struct KernelMQ_Info *init(unsigned long multiboot_magic, unsigned long mu kmemset(&kinfo, 0, sizeof(struct KernelMQ_Info)); - if (!multiboot_parse(&kinfo, multiboot_info_addr)) { + if (!multiboot_parse(&kinfo, multiboot_info_base)) { return 0; } diff --git a/arch/multiboot.c b/arch/multiboot.c index 91998f7..9791d97 100644 --- a/arch/multiboot.c +++ b/arch/multiboot.c @@ -14,8 +14,8 @@ struct multiboot_mmap_entry { - unsigned long long addr; - unsigned long long len; + unsigned long long base; + unsigned long long size; unsigned int type; unsigned int zero; }; @@ -59,19 +59,19 @@ static unsigned char print_multiboot_tag_cmdline(struct KernelMQ_Info *kinfo, co static unsigned char print_multiboot_tag_module (struct KernelMQ_Info *kinfo, const struct multiboot_tag_module *tag); static unsigned char print_multiboot_tag_mmap (struct KernelMQ_Info *kinfo, const struct multiboot_tag_mmap *tag); -unsigned char multiboot_parse(struct KernelMQ_Info *kinfo, unsigned long addr) +unsigned char multiboot_parse(struct KernelMQ_Info *kinfo, unsigned long base) { if (!kinfo) { return 0; } // Unaligned address - if (addr & 7) { + if (base & 7) { return 0; } for ( - struct multiboot_tag *tag = (struct multiboot_tag*)(addr + 8); + struct multiboot_tag *tag = (struct multiboot_tag*)(base + 8); tag->type != MULTIBOOT_TAG_TYPE_END; tag = (struct multiboot_tag*)((unsigned char*)tag + ((tag->size + 7) & ~7)) ) { @@ -153,8 +153,8 @@ unsigned char print_multiboot_tag_mmap(struct KernelMQ_Info *kinfo, const struct struct KernelMQ_Info_Area *area = &kinfo->areas[kinfo->areas_count]; - area->base = mmap->addr; - area->size = mmap->len; + area->base = mmap->base; + area->size = mmap->size; area->limit = area->base + area->size - 1; area->is_available = mmap->type == MULTIBOOT_MEMORY_AVAILABLE; diff --git a/arch/multiboot.h b/arch/multiboot.h index 6ee20f0..e36b3ca 100644 --- a/arch/multiboot.h +++ b/arch/multiboot.h @@ -5,6 +5,6 @@ #define MULTIBOOT_MAGIC 0x36d76289 -unsigned char multiboot_parse(struct KernelMQ_Info *kinfo, unsigned long addr); +unsigned char multiboot_parse(struct KernelMQ_Info *kinfo, unsigned long base); #endif