aboutsummaryrefslogtreecommitdiff
path: root/i386/i386at/model_dep.c
diff options
context:
space:
mode:
authorLuca Dariz <luca.dariz@gmail.com>2022-02-05 18:51:25 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-27 20:32:01 +0200
commit6c3c3c7a2e633e4dedd1701e6e2134f223b38574 (patch)
tree26096c259ae6de6c6bdd2b003cd7f97f67f8104b /i386/i386at/model_dep.c
parentc442d1a656e16d12cefe2d3e9b57f764ca4bc755 (diff)
downloadgnumach-6c3c3c7a2e633e4dedd1701e6e2134f223b38574.tar.gz
gnumach-6c3c3c7a2e633e4dedd1701e6e2134f223b38574.tar.bz2
gnumach-6c3c3c7a2e633e4dedd1701e6e2134f223b38574.zip
cleanup multiboot
* use _raw_ structs where we refer to the bootloader-provided data * remove unused structures * fix 64 bit boot Signed-off-by: Luca Dariz <luca@orpolo.org> Message-Id: <20220205175129.309469-3-luca@orpolo.org>
Diffstat (limited to 'i386/i386at/model_dep.c')
-rw-r--r--i386/i386at/model_dep.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index e3a56dba..105aedb2 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -122,7 +122,7 @@ unsigned long *pfn_list = (void*) PFN_LIST;
unsigned long la_shift = VM_MIN_KERNEL_ADDRESS;
#endif
#else /* MACH_XEN */
-struct multiboot_info boot_info;
+struct multiboot_raw_info boot_info;
#endif /* MACH_XEN */
/* Command line supplied to kernel. */
@@ -403,7 +403,7 @@ i386at_init(void)
}
if (boot_info.flags & MULTIBOOT_MODS && boot_info.mods_count) {
- struct multiboot_module *m;
+ struct multiboot_raw_module *m;
int i;
if (! init_alloc_aligned(
@@ -591,13 +591,14 @@ void c_boot_entry(vm_offset_t bi)
* so that the symbol table's memory won't be stomped on.
*/
if ((boot_info.flags & MULTIBOOT_AOUT_SYMS)
- && boot_info.syms.a.addr)
+ && boot_info.shdr_addr)
{
vm_size_t symtab_size, strtab_size;
- kern_sym_start = (vm_offset_t)phystokv(boot_info.syms.a.addr);
- symtab_size = (vm_offset_t)phystokv(boot_info.syms.a.tabsize);
- strtab_size = (vm_offset_t)phystokv(boot_info.syms.a.strsize);
+ /* For simplicity we just use a simple boot_info_raw structure for elf */
+ kern_sym_start = (vm_offset_t)phystokv(boot_info.shdr_addr);
+ symtab_size = (vm_offset_t)phystokv(boot_info.shdr_num);
+ strtab_size = (vm_offset_t)phystokv(boot_info.shdr_size);
kern_sym_end = kern_sym_start + 4 + symtab_size + strtab_size;
printf("kernel symbol table at %08lx-%08lx (%ld,%ld)\n",
@@ -606,12 +607,12 @@ void c_boot_entry(vm_offset_t bi)
}
if ((boot_info.flags & MULTIBOOT_ELF_SHDR)
- && boot_info.syms.e.num)
+ && boot_info.shdr_num)
{
- elf_shdr_num = boot_info.syms.e.num;
- elf_shdr_size = boot_info.syms.e.size;
- elf_shdr_addr = (vm_offset_t)phystokv(boot_info.syms.e.addr);
- elf_shdr_shndx = boot_info.syms.e.shndx;
+ elf_shdr_num = boot_info.shdr_num;
+ elf_shdr_size = boot_info.shdr_size;
+ elf_shdr_addr = (vm_offset_t)phystokv(boot_info.shdr_addr);
+ elf_shdr_shndx = boot_info.shdr_strndx;
printf("ELF section header table at %08lx\n", elf_shdr_addr);
}