feat(build): add VADDR_KERNEL variable #1159
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JIRA: RTOS-908
Description
On all platform but ARM, program headers are placed in loadable segment before
_init
section. Resulting from this_init
section start address isn't start address of first loadable segment. Due to that in PLO we may not be able to find proper segment for kernel if an address of the section that the kernel is to be loaded to = VADDR_KERNEL_INIT. Because of this additional linker script was required for sparc in kernel.On ARM we headers weren't loaded most probably because of a bug(or very fortunated accident) in our binutils patch.
THe change introduced new file
armelf_phoenix.sh
but did't use it (ld/configure.tgt
), instead it used armelf by default which definesEMBEDDED
to true resulting in headers not being included.Additionally this change splits
VADDR_KERNEL_INIT
toADDR_KERNEL_INIT
andVADDR_KERNEL
. The latter is then passed to PLO and KERNEL thus avoiding redeclaration of it in kernel.On NOMMU previous behaviour is intact.
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment
feature(hal): rename VADDR_KERNEL_INIT to VADDR_KERNEL plo#343
feature(target): define VADDR_KERNEL phoenix-rtos-build#200
feature(pmap): define VADDR_KERN in makefile phoenix-rtos-kernel#585