diff options
author | vetch <vetch97@gmail.com> | 2020-01-02 17:54:31 +0100 |
---|---|---|
committer | vetch <vetch97@gmail.com> | 2020-01-02 17:54:31 +0100 |
commit | ab7b754bb32022336527c1a2d5d710b95a589d0e (patch) | |
tree | 19f508f06c72efcbdd2cfad46949ed6f1ae45a3c /kernel_stage2.ld | |
parent | 5e1e6796109c892c4300c3da17c35e7874a40107 (diff) | |
parent | 6bf5a3b8c6e8a5d1cb3fb4880a5d9688ab094c62 (diff) | |
download | rpi-MMU-example-ab7b754bb32022336527c1a2d5d710b95a589d0e.tar.gz rpi-MMU-example-ab7b754bb32022336527c1a2d5d710b95a589d0e.zip |
Merge branch 'bob' of https://repo.or.cz/RPi-MMU-example into alice
# Conflicts:
# .gitignore
# PL0_test.ld
# demo_functionality.c
# interrupt_vector.S
# interrupts.c
# kernel.c
# memory.h
Diffstat (limited to 'kernel_stage2.ld')
-rw-r--r-- | kernel_stage2.ld | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/kernel_stage2.ld b/kernel_stage2.ld new file mode 100644 index 0000000..15b61ec --- /dev/null +++ b/kernel_stage2.ld @@ -0,0 +1,79 @@ +/* This sesond stage of the kernel is run from address 0x0 */ + +TRANSLATION_TABLE_SIZE = 4096 * 4; +SECTIONS_LIST_SIZE = 4096 * 8; +MMU_SECTION_SIZE = 1 << 20; + +SECTIONS +{ + + . = 0x0; + + __start = .; + .interrupt_vector : + { + KEEP(interrupt_vector.o) + } + . = ALIGN(4); + .embedded_ramfs : + { + ramfs_embeddable.o + } + .rest_of_kernel : + { + *(.text) + *(.data) + *(.rodata) + *(.bss) + *(/COMMON/) + } + __end = .; + + . = ALIGN(1 << 14); + + .translation_table (NOLOAD) : + { + _translation_table_start = .; + + . = . + TRANSLATION_TABLE_SIZE; + + _translation_table_end = .; + } + + .sections_list (NOLOAD) : + { + _sections_list_start = .; + + . = . + SECTIONS_LIST_SIZE; + + _sections_list_end = .; + } + + . = ALIGN(1 << 20); + . = . + MMU_SECTION_SIZE; + + .stack (NOLOAD) : + { + _stack_start = .; + + _fiq_stack_start = .; + + . = . + (1 << 18); + + _fiq_stack_top = .; + + _irq_stack_start = .; + + . = . + (1 << 18); + + _irq_stack_top = .; + + _supervisor_stack_start = .; + + . = . + (1 << 19); + + _supervisor_stack_top = .; + + _stack_end = .; + } +} |