eclair: obtain MAP_KERNEL_START from kernel image
Change-Id: I946c640ddb2e2b32362760254a86c611517becf3
This commit is contained in:
@@ -124,6 +124,16 @@ uintptr_t virt_to_phys(uintptr_t va)
|
||||
|
||||
int arch_setup_constants(void)
|
||||
{
|
||||
MAP_KERNEL_START = lookup_symbol("_head");
|
||||
if (MAP_KERNEL_START == NOSYMBOL) {
|
||||
fprintf(stderr, "error: obtaining MAP_KERNEL_START\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* One page extra head, see smp-x86.lds */
|
||||
MAP_KERNEL_START -= 0x1000;
|
||||
printf("x86 MAP_KERNEL_START 0x%lx\n", MAP_KERNEL_START);
|
||||
|
||||
if (read_symbol_64("linux_page_offset_base",
|
||||
&linux_page_offset) != 0) {
|
||||
fprintf(stderr, "error: obtaining Linux page offset\n");
|
||||
|
||||
Reference in New Issue
Block a user