|
36 | 36 |
|
37 | 37 | #include "efi-header.S" |
38 | 38 |
|
39 | | -#define __PHYS_OFFSET (KERNEL_START - TEXT_OFFSET) |
| 39 | +#define __PHYS_OFFSET KERNEL_START |
40 | 40 |
|
41 | | -#if (TEXT_OFFSET & 0xfff) != 0 |
42 | | -#error TEXT_OFFSET must be at least 4KB aligned |
43 | | -#elif (PAGE_OFFSET & 0x1fffff) != 0 |
| 41 | +#if (PAGE_OFFSET & 0x1fffff) != 0 |
44 | 42 | #error PAGE_OFFSET must be at least 2MB aligned |
45 | | -#elif TEXT_OFFSET > 0x1fffff |
46 | | -#error TEXT_OFFSET must be less than 2MB |
47 | 43 | #endif |
48 | 44 |
|
49 | 45 | /* |
|
55 | 51 | * x0 = physical address to the FDT blob. |
56 | 52 | * |
57 | 53 | * This code is mostly position independent so you call this at |
58 | | - * __pa(PAGE_OFFSET + TEXT_OFFSET). |
| 54 | + * __pa(PAGE_OFFSET). |
59 | 55 | * |
60 | 56 | * Note that the callee-saved registers are used for storing variables |
61 | 57 | * that are useful before the MMU is enabled. The allocations are described |
|
77 | 73 | b primary_entry // branch to kernel start, magic |
78 | 74 | .long 0 // reserved |
79 | 75 | #endif |
80 | | - le64sym _kernel_offset_le // Image load offset from start of RAM, little-endian |
| 76 | + .quad 0 // Image load offset from start of RAM, little-endian |
81 | 77 | le64sym _kernel_size_le // Effective size of kernel image, little-endian |
82 | 78 | le64sym _kernel_flags_le // Informative flags, little-endian |
83 | 79 | .quad 0 // reserved |
@@ -382,7 +378,7 @@ SYM_FUNC_START_LOCAL(__create_page_tables) |
382 | 378 | * Map the kernel image (starting with PHYS_OFFSET). |
383 | 379 | */ |
384 | 380 | adrp x0, init_pg_dir |
385 | | - mov_q x5, KIMAGE_VADDR + TEXT_OFFSET // compile time __va(_text) |
| 381 | + mov_q x5, KIMAGE_VADDR // compile time __va(_text) |
386 | 382 | add x5, x5, x23 // add KASLR displacement |
387 | 383 | mov x4, PTRS_PER_PGD |
388 | 384 | adrp x6, _end // runtime __pa(_end) |
@@ -474,7 +470,7 @@ SYM_FUNC_END(__primary_switched) |
474 | 470 |
|
475 | 471 | .pushsection ".rodata", "a" |
476 | 472 | SYM_DATA_START(kimage_vaddr) |
477 | | - .quad _text - TEXT_OFFSET |
| 473 | + .quad _text |
478 | 474 | SYM_DATA_END(kimage_vaddr) |
479 | 475 | EXPORT_SYMBOL(kimage_vaddr) |
480 | 476 | .popsection |
|
0 commit comments