Changeset cfdeedc in mainline for boot/arch/sparc64/src/main.c


Ignore:
Timestamp:
2018-10-21T23:12:23Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bf05c74
Parents:
d59718e
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-10-21 22:53:48)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-10-21 23:12:23)
Message:

Keep kernel in ELF format

By keeping kernel in an ELF file (instead of converting it to
a flat binary), we can use the information it contains, like
symbol table and debug info.

We can also later implement more advanced functionality, like
loading kernel at multiple discontiguous blocks, or loading
a position-independent kernel at a randomized address.

Currently the functionality is quite restricted, to keep changes
to a minimum. Code in boot/generic/src/kernel.c validates that
the kernel image was built with the same addresses as the boot
loader uses, giving an extra level of sanity checking compared
to a flat binary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/sparc64/src/main.c

    rd59718e rcfdeedc  
    4343#include <errno.h>
    4444#include <payload.h>
     45#include <kernel.h>
    4546
    4647/* The lowest ID (read from the VER register) of some US3 CPU model */
     
    257258                sun4u_smp();
    258259
     260        uintptr_t entry = check_kernel((void *) KERNEL_ADDRESS);
     261
    259262        printf("Booting the kernel ...\n");
    260         jump_to_kernel(bootinfo.physmem_start | BSP_PROCESSOR, &bootinfo, subarch,
    261             (void *) KERNEL_ADDRESS);
    262 }
     263        jump_to_kernel(bootinfo.physmem_start | BSP_PROCESSOR, &bootinfo,
     264            subarch, (void *) entry);
     265}
Note: See TracChangeset for help on using the changeset viewer.