-
Notifications
You must be signed in to change notification settings - Fork 91
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
Elfloader: NVIDIA Jetson Orin support #190
Open
andybui01
wants to merge
19
commits into
seL4:master
Choose a base branch
from
andybui01:andyb/orin-port
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 14 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9f2a8d0
elfloader: add support for Jetson Orin
276519b
elfloader: arm: flush dcache by va range instead
b9c6f44
elfloader: arm: stabilize secondary core booting
0cdf9c2
elfloader: arm: move kernel page table init code
0108b77
elfloader: arm: do not save FP and LR on stack
7b3c2f3
elfloader: arm: fix incorrect sp when restoring
1aa2fb0
elfloader: arm: fix function declaration
mro-github-12345 c329bef
elfloader: arm: fix alignment of AArch32
mro-github-12345 e8a15ec
elfloader: fix variable prototype and remove var
mro-github-12345 dea6924
elfloader: fix EFI image size
mro-github-12345 65b49ae
elfloader: move the data of ELFloader together
mro-github-12345 fa81fff
elfloader: arm: do not hard-code values
mro-github-12345 33f00c8
elfloader: arm: fix potential UB in right shift
mro-github-12345 4996de7
elfloader: setup pagetables as needed
mro-github-12345 5ebb1fc
elfloader: Exit UEFI boot services very early
mro-github-12345 80b8902
elfloader: Rewrite loop: Do not use goto
mro-github-12345 0e0a99d
elfloader: fix UEFI integration bug: descriptor
mro-github-12345 16ea8ef
elfloader: Set Exec-Never for Device Memory
mro-github-12345 84a55cd
elfloader: unconditionally set PTE shareability to
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Copyright 2023, NIO GmbH | ||
* | ||
* SPDX-License-Identifier: GPL-2.0-only | ||
*/ | ||
#pragma once | ||
|
||
/* This file contains useful defines for assembly and C code. */ | ||
|
||
#define PSR_F_BIT 0x00000040 | ||
#define PSR_I_BIT 0x00000080 | ||
#define PSR_A_BIT 0x00000100 | ||
#define PSR_D_BIT 0x00000200 | ||
|
||
#define PSR_MODE_EL0t 0x00000000 | ||
#define PSR_MODE_EL1t 0x00000004 | ||
#define PSR_MODE_EL1h 0x00000005 | ||
#define PSR_MODE_EL2t 0x00000008 | ||
#define PSR_MODE_EL2h 0x00000009 | ||
#define PSR_MODE_SVC_32 0x00000013 | ||
|
||
#define TCR_T0SZ(x) ((64 - (x))) | ||
#define TCR_T1SZ(x) ((64 - (x)) << 16) | ||
#define TCR_TxSZ(x) (TCR_T0SZ(x) | TCR_T1SZ(x)) | ||
|
||
#define TCR_IRGN0_WBWC (1 << 8) | ||
#define TCR_IRGN_NC ((0 << 8) | (0 << 24)) | ||
#define TCR_IRGN_WBWA ((1 << 8) | (1 << 24)) | ||
#define TCR_IRGN_WT ((2 << 8) | (2 << 24)) | ||
#define TCR_IRGN_WBnWA ((3 << 8) | (3 << 24)) | ||
#define TCR_IRGN_MASK ((3 << 8) | (3 << 24)) | ||
|
||
#define TCR_ORGN0_WBWC (1 << 10) | ||
#define TCR_ORGN_NC ((0 << 10) | (0 << 26)) | ||
#define TCR_ORGN_WBWA ((1 << 10) | (1 << 26)) | ||
#define TCR_ORGN_WT ((2 << 10) | (2 << 26)) | ||
#define TCR_ORGN_WBnWA ((3 << 10) | (3 << 26)) | ||
#define TCR_ORGN_MASK ((3 << 10) | (3 << 26)) | ||
|
||
#define TCR_SH0_ISH (3 << 12) | ||
#define TCR_SHARED ((3 << 12) | (3 << 28)) | ||
|
||
#define TCR_TG0_4K (0 << 14) | ||
#define TCR_TG0_64K (1 << 14) | ||
#define TCR_TG1_4K (2 << 30) | ||
#define TCR_TG1_64K (3 << 30) | ||
|
||
#define TCR_PS_4G (0 << 16) | ||
#define TCR_PS_64G (1 << 16) | ||
#define TCR_PS_1T (2 << 16) | ||
#define TCR_PS_4T (3 << 16) | ||
#define TCR_PS_16T (4 << 16) | ||
#define TCR_PS_256T (5 << 16) | ||
|
||
/* bits are reserved as 1 */ | ||
#define TCR_EL2_RES1 ((1 << 23) | (1 << 31)) | ||
#define TCR_ASID16 (1 << 36) | ||
|
||
#define MT_DEVICE_nGnRnE 0 | ||
#define MT_DEVICE_nGnRE 1 | ||
#define MT_DEVICE_GRE 2 | ||
#define MT_NORMAL_NC 3 | ||
#define MT_NORMAL 4 | ||
#define MT_NORMAL_WT 5 | ||
#define MAIR(_attr, _mt) ((_attr) << ((_mt) * 8)) |
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps call it
aarch64_switch_to_hyp_tables
if there is no 32-bit version of it.