Last active
October 15, 2018 05:36
-
-
Save ilebedev/25ea80998f3ca40af07c60a71206ec97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OUTPUT_ARCH( "riscv" ) | |
ENTRY( reset_vector ) | |
SECTIONS | |
{ | |
/* Root of trust in a trusted ROM */ | |
. = 0x1000; | |
.rot : { | |
_start = .; | |
PROVIDE(reset_vector = .); | |
*(.bootloader.entry) | |
*(.bootloader) | |
/* Device tree string follows the boot ROM: */ | |
PROVIDE(dtb_ptr = .); | |
_end = .; | |
} | |
/* System memory */ | |
. = 0x80000000; | |
/* Expected locations for various keys and metadata */ | |
.bootloader_header (NOLOAD) : { | |
PROVIDE(pk_m = .); /* from untrusted boot image */ | |
. += 32; | |
PROVIDE(pk_d = .); /* from untrusted boot image */ | |
. += 32; | |
PROVIDE(cert_d = .); /* from untrusted boot image */ | |
. += 64; | |
PROVIDE(pk_s = .); /* computed by trusted bootloader */ | |
. += 64; | |
PROVIDE(sk_s = .); /* computed by trusted bootloader */ | |
. += 32; | |
PROVIDE(hash_s = .); /* computed by trusted bootloader */ | |
. += 64; | |
PROVIDE(cert_s = .); /* computed by trusted bootloader */ | |
. += 64; | |
PROVIDE(len_s = .); /* from untrusted boot image */ | |
. += 64; | |
} | |
/* Reserve some space for M-mode stacks */ | |
. = ALIGN(0x1000); | |
.m_stacks (NOLOAD) : { | |
*(.mstacks) /* Usually 1 page per core */ | |
} | |
/* Post-boot environment image (S) */ | |
. = ALIGN(0x1000); | |
.payload (NOLOAD) : { | |
PROVIDE(payload_ptr = .); | |
*(.payload) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment