Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): add VADDR_KERNEL variable #1159

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

badochov
Copy link
Contributor

@badochov badochov commented Sep 9, 2024

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 defines EMBEDDED to true resulting in headers not being included.

Additionally this change splits VADDR_KERNEL_INIT to ADDR_KERNEL_INIT and VADDR_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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: (list targets here).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant