minix/kernel/arch/earm/kernel.lds
Jan Kobler 29fe671680 arm: clear highly mapped kernel bss
. added bss range values for the high (paged) kernel and
	  clear it in pre_init
	. this changes the meaning of the current _edata end _end in the
	  pre_init phase to mean: highly mapped bss; and the new symbols
	  _kern_unpaged_edata ... _kern_unpaged_edata to mean directly
	  mapped (pre_init) bss. This was previously _edata and _end.
	. added a sanity check in kmain (ben@)

The values can be verified by:

${CROSS_TOOLS}/arm-elf32-minix-objdump -xD ${OBJ}/kernel/kernel

Signed-off-by: Jan Kobler <eng1@koblersystems.de>
2014-07-28 17:05:55 +02:00

51 lines
1.5 KiB
Text

OUTPUT_ARCH("arm")
ENTRY(__k_unpaged_MINIX)
_kern_phys_base = 0x80200000; /* phys 4MB aligned for convenient remapping */
_kern_vir_base = 0xF0400000; /* map kernel high for max. user vir space */
_kern_offset = (_kern_vir_base - _kern_phys_base);
__k_unpaged__kern_offset = _kern_offset;
__k_unpaged__kern_vir_base = _kern_vir_base;
__k_unpaged__kern_phys_base = _kern_phys_base;
SECTIONS
{
. = _kern_phys_base;
__k_unpaged__kern_unpaged_start = .;
.unpaged_text ALIGN(4096) : { unpaged_*.o(.text) }
.unpaged_data ALIGN(4096) : { unpaged_*.o(.data .rodata*) }
__k_unpaged__kern_unpaged_edata = .;
.unpaged_bss ALIGN(4096) : { unpaged_*.o(.bss COMMON) }
__k_unpaged__kern_unpaged_end = .;
. += _kern_offset;
. = ALIGN(4096); usermapped_start = .;
.usermapped_glo : AT(ADDR(.usermapped_glo) - _kern_offset) { usermapped_glo*.o(*) }
. = ALIGN(4096); usermapped_nonglo_start = .;
.usermapped : AT(ADDR(.usermapped) - _kern_offset) { usermapped_*.o(*) }
. = ALIGN(4096); usermapped_end = .;
.text : AT(ADDR(.text) - _kern_offset) { *(.text*) }
_etext = .;
.data ALIGN(4096) : AT(ADDR(.data) - _kern_offset) { *(.data .rodata* ) }
. = ALIGN(4096);
_edata = .;
__k_unpaged__edata = . - _kern_offset;
.bss ALIGN(4096) : AT(ADDR(.bss) - _kern_offset) { *(.bss* COMMON)
__k_unpaged__kern_size = . - _kern_vir_base;
_kern_size = __k_unpaged__kern_size;
. += 4096;
}
_end = .;
__k_unpaged__end = . - _kern_offset;
/DISCARD/ :
{
*(.ARM.exidx*)
}
}