Compare commits
234 Commits
v3.0.0
...
v2.7-audit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07c3d4529a | ||
|
|
f77c7bb2fe | ||
|
|
7b6cdcbed7 | ||
|
|
878d4338bb | ||
|
|
9043b65acf | ||
|
|
071def1bf1 | ||
|
|
922cde06dc | ||
|
|
7229c12721 | ||
|
|
88608b2e78 | ||
|
|
77efdc73ca | ||
|
|
f30ce73f67 | ||
|
|
bdc5f2c7da | ||
|
|
29155bdd6c | ||
|
|
5b627ad8b3 | ||
|
|
839fa857c8 | ||
|
|
64336f467c | ||
|
|
37f1423213 | ||
|
|
4071c6143c | ||
|
|
64816d53c0 | ||
|
|
ac487cf5a4 | ||
|
|
08619905cd | ||
|
|
aba70ce903 | ||
|
|
671153b94d | ||
|
|
f953e929d8 | ||
|
|
829f63f93f | ||
|
|
d03fa8d8e9 | ||
|
|
40cf447b5a | ||
|
|
3d6f386cca | ||
|
|
747db471bb | ||
|
|
ec69bda0d4 | ||
|
|
04379cbe09 | ||
|
|
019e0d9573 | ||
|
|
da3a04a17b | ||
|
|
bbc6f78c7c | ||
|
|
259c805c3c | ||
|
|
c3d715c6ee | ||
|
|
f5884c7db4 | ||
|
|
672934d206 | ||
|
|
9c0f9e6214 | ||
|
|
844843ce47 | ||
|
|
cf873c6eae | ||
|
|
5b6fef09da | ||
|
|
0075f17e1f | ||
|
|
3c1d1a11e9 | ||
|
|
63afaf742a | ||
|
|
7eadb9c5eb | ||
|
|
8e6e745c76 | ||
|
|
bea9a92819 | ||
|
|
dceab47f74 | ||
|
|
5d02614e34 | ||
|
|
5b7cc3bffa | ||
|
|
4c26541842 | ||
|
|
0a15b510f4 | ||
|
|
d21b0e8ffe | ||
|
|
11dddc5364 | ||
|
|
a984ca8b70 | ||
|
|
4a8da1624d | ||
|
|
18b6921b1b | ||
|
|
efa7239352 | ||
|
|
3e68e6b550 | ||
|
|
16dc0c550f | ||
|
|
7a3ca740e7 | ||
|
|
f0488b4956 | ||
|
|
3472b3b212 | ||
|
|
093a9ea724 | ||
|
|
820aa10ac9 | ||
|
|
711f44a1fc | ||
|
|
d09cb7f1da | ||
|
|
06e25ea826 | ||
|
|
3ff5e8b7ce | ||
|
|
22fdbf18d5 | ||
|
|
b652faeb91 | ||
|
|
c87097cad4 | ||
|
|
f3c9c0ae19 | ||
|
|
835451e36f | ||
|
|
f6ce289342 | ||
|
|
f5d4fb40b5 | ||
|
|
c90e0c1197 | ||
|
|
53d9e942cf | ||
|
|
dd435b011f | ||
|
|
6a851f1f48 | ||
|
|
68a6a3e5c3 | ||
|
|
dff331a40c | ||
|
|
96a7b32e85 | ||
|
|
6f11b2d7f2 | ||
|
|
5166ff9fb1 | ||
|
|
16e3655739 | ||
|
|
b757110019 | ||
|
|
61730131c7 | ||
|
|
5455bf4ba7 | ||
|
|
c65645cc39 | ||
|
|
cef9cbeb60 | ||
|
|
ac0477f17c | ||
|
|
cb4ed62d98 | ||
|
|
df0c972787 | ||
|
|
3f826560aa | ||
|
|
21008182be | ||
|
|
5e578e5967 | ||
|
|
88487a2dee | ||
|
|
f2cae5145d | ||
|
|
9366238a33 | ||
|
|
33f30745a5 | ||
|
|
275dc8275f | ||
|
|
ae757fb704 | ||
|
|
5e1dc921b0 | ||
|
|
5ccffff5b0 | ||
|
|
dd460a9410 | ||
|
|
7e5ac1bfe6 | ||
|
|
f215361e1c | ||
|
|
7e7d71ebda | ||
|
|
6939183a58 | ||
|
|
6f045c1166 | ||
|
|
d9eb21aa1e | ||
|
|
2b8079aa38 | ||
|
|
81136cbc79 | ||
|
|
42276f5bbd | ||
|
|
36bec3599d | ||
|
|
587ad45686 | ||
|
|
169b85c1e3 | ||
|
|
a9aba82522 | ||
|
|
e7df33e8b7 | ||
|
|
29b52a81c9 | ||
|
|
af4c3bc983 | ||
|
|
257df9a236 | ||
|
|
b60b5b97a2 | ||
|
|
8a97c83040 | ||
|
|
42144217be | ||
|
|
4ba168dc4d | ||
|
|
d760c5e322 | ||
|
|
7b880f11f8 | ||
|
|
592c6b1db2 | ||
|
|
f52dce1ee3 | ||
|
|
7f3562bfe4 | ||
|
|
fcc69bf015 | ||
|
|
c140604510 | ||
|
|
d229d45ddd | ||
|
|
8790789c5f | ||
|
|
7bc1deeeae | ||
|
|
6c4fc0226d | ||
|
|
31dbdca2ab | ||
|
|
3bceb73861 | ||
|
|
79bf23c5ac | ||
|
|
7fec8b280d | ||
|
|
706104bdf8 | ||
|
|
a39340a1f8 | ||
|
|
7a2b9586fa | ||
|
|
708ba30959 | ||
|
|
903b5d78d8 | ||
|
|
2df7257bec | ||
|
|
9f903eeb50 | ||
|
|
886d04860f | ||
|
|
311aeef4d5 | ||
|
|
8dacd0f873 | ||
|
|
2d0d093627 | ||
|
|
0689e106c6 | ||
|
|
0d81d97bb0 | ||
|
|
cb2ea25e14 | ||
|
|
50d357d77e | ||
|
|
9877834c95 | ||
|
|
ea2bbb8b9e | ||
|
|
b0667a80b1 | ||
|
|
e2ae4ec78c | ||
|
|
1f09c9269d | ||
|
|
aa8c3fa22e | ||
|
|
5a5eaa3c58 | ||
|
|
efd77e0958 | ||
|
|
b3affe6b94 | ||
|
|
5969c3b941 | ||
|
|
6db7778c81 | ||
|
|
bd6523195c | ||
|
|
701c560901 | ||
|
|
b24bbad815 | ||
|
|
a7baa3628d | ||
|
|
7aee51ea82 | ||
|
|
7c62429a75 | ||
|
|
82f3165b79 | ||
|
|
e858321f83 | ||
|
|
d2c5f05b1b | ||
|
|
708951ecd2 | ||
|
|
ad2b77e7f8 | ||
|
|
eb85f9a47e | ||
|
|
9ad64e8809 | ||
|
|
cf112e2a06 | ||
|
|
0ad4b4438a | ||
|
|
f7d0ae5e6c | ||
|
|
a084ec5483 | ||
|
|
c3fac651ee | ||
|
|
30eadf758a | ||
|
|
1a42926317 | ||
|
|
30b24920e8 | ||
|
|
41654b0dba | ||
|
|
17c5a7c89e | ||
|
|
0d4db6b952 | ||
|
|
e24df5272a | ||
|
|
a3e8f83e6b | ||
|
|
e8929c3360 | ||
|
|
7597eef8b3 | ||
|
|
9ff7cb60fc | ||
|
|
71420c6b76 | ||
|
|
519f412ce8 | ||
|
|
c0e44d9462 | ||
|
|
47f4ddafdd | ||
|
|
1a15d367e2 | ||
|
|
7ac8c2f51b | ||
|
|
4c52fb9fd1 | ||
|
|
cb657057b3 | ||
|
|
69996900c8 | ||
|
|
70979b9047 | ||
|
|
e601ca8e11 | ||
|
|
369d5d038f | ||
|
|
27a2271093 | ||
|
|
f4a03dfa32 | ||
|
|
192cad6cda | ||
|
|
1e2c698e95 | ||
|
|
0c0a990c4b | ||
|
|
dbf08a18c3 | ||
|
|
6c4d190493 | ||
|
|
5d0100e12c | ||
|
|
b11983d71a | ||
|
|
8691e3e0d2 | ||
|
|
c1fa585917 | ||
|
|
8a9c1e7721 | ||
|
|
8a0dc430b2 | ||
|
|
e6638715d9 | ||
|
|
5b78f62138 | ||
|
|
01be872f01 | ||
|
|
317749e1e8 | ||
|
|
7d3606a74a | ||
|
|
08917e0708 | ||
|
|
b868419ac7 | ||
|
|
16efab0493 | ||
|
|
916dbab23a | ||
|
|
62680344a6 | ||
|
|
d8ee47459c |
@@ -28,5 +28,4 @@
|
||||
--ignore COMPLEX_MACRO
|
||||
--ignore MULTISTATEMENT_MACRO_USE_DO_WHILE
|
||||
--ignore ENOSYS
|
||||
--ignore IS_ENABLED_CONFIG
|
||||
--exclude ext
|
||||
|
||||
6
.gitattributes
vendored
6
.gitattributes
vendored
@@ -4,10 +4,6 @@
|
||||
.gitignore export-ignore
|
||||
.mailmap export-ignore
|
||||
|
||||
# Tell git to not diff certain files
|
||||
*.svg -diff
|
||||
|
||||
# Tell linguist that generated test pattern files should not be included in the
|
||||
# language statistics.
|
||||
*.pat linguist-generated
|
||||
*.svg linguist-generated
|
||||
*.pat linguist-generated=true
|
||||
|
||||
11
.github/ISSUE_TEMPLATE/bug_report.md
vendored
11
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -9,12 +9,7 @@ assignees: ''
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
Please also mention any information which could help others to understand
|
||||
the problem you're facing:
|
||||
- What target platform are you using?
|
||||
- What have you tried to diagnose or workaround this issue?
|
||||
- ...
|
||||
What have you tried to diagnose or workaround this issue?
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
@@ -40,6 +35,6 @@ explain the issue. (if unable to obtain text log, add a screenshot)
|
||||
- Toolchain (e.g Zephyr SDK, ...)
|
||||
- Commit SHA or Version used
|
||||
|
||||
|
||||
**Additional context**
|
||||
Add any other context that could be relevant to your issue, such as pin setting,
|
||||
target configuration, ...
|
||||
Add any other context about the problem here.
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -2,7 +2,7 @@
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: Feature Request
|
||||
labels: feature request
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
41
.github/ISSUE_TEMPLATE/nomination.md
vendored
41
.github/ISSUE_TEMPLATE/nomination.md
vendored
@@ -1,41 +0,0 @@
|
||||
---
|
||||
name: Contributor Nomination
|
||||
about: Nominate a GitHub user for additional rights on the Zephyr Project
|
||||
title: ''
|
||||
labels: Role Nomination
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Background
|
||||
|
||||
The [TSC Project Roles] defines the main roles for the Zephyr Project, including
|
||||
Maintainer, Collaborator, and Contributor.
|
||||
|
||||
By default anyone that contributes code or documentation is a Contributor, but
|
||||
with the lowest [GitHub Permission Level] of Read. For example, Contributors
|
||||
with Read permission do not have the permission to add reviewers to a pull
|
||||
request.
|
||||
|
||||
Use this template to nominate a GitHub user for an elevated permission level in
|
||||
the Contributor role.
|
||||
|
||||
# Nomination
|
||||
|
||||
## GitHub User
|
||||
|
||||
Provide the following information about the GitHub user:
|
||||
|
||||
1. Full Name
|
||||
1. GitHub username
|
||||
1. Organization (optional)
|
||||
|
||||
## Supporting Documents
|
||||
|
||||
Add links to 3-5 GitHub pull requests, in the Zephyr project, authored or
|
||||
reviewed by the GitHub user that demonstrate the user's dedication to the
|
||||
Zephyr project.
|
||||
|
||||
|
||||
[TSC Project Roles]: <https://docs.zephyrproject.org/latest/development_process/project_roles.html#tsc-project-roles>
|
||||
[GitHub Permission Level]: <https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization>
|
||||
8
.github/SECURITY.md
vendored
8
.github/SECURITY.md
vendored
@@ -8,12 +8,12 @@ updates:
|
||||
- The most recent release, and the release prior to that.
|
||||
- Active LTS releases.
|
||||
|
||||
At this time, with the latest release of v3.0.0, the supported
|
||||
At this time, with the latest release of v2.5.0, the supported
|
||||
versions are:
|
||||
|
||||
- v2.7.0: Current LTS
|
||||
- v2.7.0: Prior release
|
||||
- v3.0.0: Current release
|
||||
- 1.14.2: Current LTS
|
||||
- v2.5.0: Prior release
|
||||
- v2.6.0: Current release
|
||||
|
||||
## Reporting process
|
||||
|
||||
|
||||
3
.github/labeler.yml
vendored
3
.github/labeler.yml
vendored
@@ -60,9 +60,6 @@
|
||||
"area: ARM64":
|
||||
- "arch/arm64/**/*"
|
||||
- "include/arch/arm64/**/*"
|
||||
"area: MIPS":
|
||||
- "arch/mips/**/*"
|
||||
- "include/arch/mips/**/*"
|
||||
"area: NIOS2":
|
||||
- "arch/nios2/**/*"
|
||||
- "include/arch/nios2/**/*"
|
||||
|
||||
29
.github/workflows/bluetooth-tests-publish.yaml
vendored
Normal file
29
.github/workflows/bluetooth-tests-publish.yaml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Publish Bluetooth Tests Results
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Bluetooth Tests"]
|
||||
types:
|
||||
- completed
|
||||
jobs:
|
||||
bluetooth-test-results:
|
||||
name: "Publish Bluetooth Test Results"
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.workflow_run.conclusion != 'skipped'
|
||||
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
workflow: bluetooth-tests.yaml
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
|
||||
- name: Publish Bluetooth Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v1
|
||||
with:
|
||||
check_name: Bluetooth Test Results
|
||||
comment_mode: off
|
||||
commit: ${{ github.event.workflow_run.head_sha }}
|
||||
event_file: event/event.json
|
||||
event_name: ${{ github.event.workflow_run.event }}
|
||||
files: "bluetooth-test-results/**/bsim_results.xml"
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Bluetooth Tests
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
paths:
|
||||
- "west.yml"
|
||||
- "subsys/bluetooth/**"
|
||||
@@ -22,11 +22,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: bluetooth-test-prep
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.21.0
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
options: '--entrypoint /bin/bash'
|
||||
env:
|
||||
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.2
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||
BSIM_OUT_PATH: /opt/bsim/
|
||||
BSIM_COMPONENTS_PATH: /opt/bsim/components
|
||||
@@ -39,9 +39,6 @@ jobs:
|
||||
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: west setup
|
||||
run: |
|
||||
@@ -60,26 +57,15 @@ jobs:
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Bluetooth Test Results
|
||||
path: ./bsim_bt_out/bsim_results.xml
|
||||
name: bluetooth-test-results
|
||||
path: |
|
||||
./bsim_bt_out/bsim_results.xml
|
||||
${{ github.event_path }}
|
||||
|
||||
bluetooth-test-results:
|
||||
name: "Publish Bluetooth Test Results"
|
||||
needs: bluetooth-test-build
|
||||
runs-on: ubuntu-20.04
|
||||
# the build-and-test job might be skipped, we don't need to run this job then
|
||||
if: success() || failure()
|
||||
|
||||
steps:
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
- name: Upload Event Details
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Publish Bluetooth Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v1
|
||||
with:
|
||||
check_name: Bluetooth Test Results
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: "**/bsim_results.xml"
|
||||
comment_mode: off
|
||||
name: event
|
||||
path: |
|
||||
${{ github.event_path }}
|
||||
77
.github/workflows/clang.yaml
vendored
77
.github/workflows/clang.yaml
vendored
@@ -14,49 +14,43 @@ jobs:
|
||||
runs-on: zephyr_runner
|
||||
needs: clang-build-prep
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.21.0
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
options: '--entrypoint /bin/bash'
|
||||
volumes:
|
||||
- /home/runners/zephyrproject:/github/cache/zephyrproject
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: ["native_posix"]
|
||||
env:
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.2
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
outputs:
|
||||
report_needed: ${{ steps.twister.outputs.report_needed }}
|
||||
steps:
|
||||
- name: Cleanup
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.6.0
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
- name: Update PATH for west
|
||||
run: |
|
||||
# hotfix, until we have a better way to deal with existing data
|
||||
rm -rf zephyr zephyr-testing
|
||||
- name: Checkout
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: Environment Setup
|
||||
- name: west setup
|
||||
run: |
|
||||
pip3 install GitPython
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
git config --global user.email "bot@zephyrproject.org"
|
||||
git config --global user.name "Zephyr Bot"
|
||||
rm -fr ".git/rebase-apply"
|
||||
git rebase origin/${BASE_REF}
|
||||
git log --pretty=oneline | head -n 10
|
||||
west init -l . || true
|
||||
west config --global update.narrow true
|
||||
# In some cases modules are left in a state where they can't be
|
||||
# updated (i.e. when we cancel a job and the builder is killed),
|
||||
# So first retry to update, if that does not work, remove all modules
|
||||
# and start over. (Workaround until we implement more robust module
|
||||
# west caching).
|
||||
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west2.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
|
||||
west update 2>&1 1> west.log || west update 2>&1 1> west2.log || ( rm -rf ../modules && west update)
|
||||
|
||||
- name: Check Environment
|
||||
run: |
|
||||
@@ -64,7 +58,6 @@ jobs:
|
||||
${CLANG_ROOT_DIR}/bin/clang --version
|
||||
gcc --version
|
||||
ls -la
|
||||
|
||||
- name: Prepare ccache timestamp/data
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
@@ -86,26 +79,36 @@ jobs:
|
||||
|
||||
- name: ccache stats initial
|
||||
run: |
|
||||
test -d github/home/.ccache && rm -rf /github/home/.ccache && mv github/home/.ccache /github/home/.ccache
|
||||
test -d github/home/.ccache && mv github/home/.ccache /github/home/.ccache
|
||||
ccache -M 10G -s
|
||||
|
||||
- name: Run Tests with Twister
|
||||
id: twister
|
||||
run: |
|
||||
git config --global user.email "bot@zephyrproject.org"
|
||||
git config --global user.name "Zephyr Builder"
|
||||
export ZEPHYR_BASE=${PWD}
|
||||
export ZEPHYR_TOOLCHAIN_VARIANT=llvm
|
||||
|
||||
# check if we need to run a full twister or not based on files changed
|
||||
python3 ./scripts/ci/test_plan.py --platform ${{ matrix.platform }} -c origin/${BASE_REF}..
|
||||
|
||||
# We can limit scope to just what has changed
|
||||
if [ -s testplan.csv ]; then
|
||||
SC=$(./scripts/ci/what_changed.py --commits ${COMMIT_RANGE})
|
||||
# Get twister arguments based on the files changed
|
||||
./scripts/ci/get_twister_opt.py --commits ${COMMIT_RANGE}
|
||||
if [ "$SC" = "full" ]; then
|
||||
# Full twister
|
||||
echo "::set-output name=report_needed::1";
|
||||
# Full twister but with options based on changes
|
||||
./scripts/twister --inline-logs -M -N -v --load-tests testplan.csv --retry-failed 2
|
||||
./scripts/twister --inline-logs -M -N -v -p ${{ matrix.platform }} --retry-failed 2
|
||||
else
|
||||
# if nothing is run, skip reporting step
|
||||
echo "::set-output name=report_needed::0";
|
||||
# We can limit scope to just what has changed
|
||||
if [ -s modified_tests.args ]; then
|
||||
# we are working with one platform at a time
|
||||
sed -i '/--all/d' modified_tests.args
|
||||
echo "::set-output name=report_needed::1";
|
||||
# Full twister but with options based on changes
|
||||
./scripts/twister --inline-logs -M -N -v -p ${{ matrix.platform }} +modified_tests.args --retry-failed 2
|
||||
else
|
||||
# if nothing is run, skip reporting step
|
||||
echo "::set-output name=report_needed::0";
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: ccache stats post
|
||||
@@ -129,20 +132,6 @@ jobs:
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: artifacts
|
||||
- name: Merge Test Results
|
||||
run: |
|
||||
pip3 install junitparser junit2html
|
||||
junitparser merge artifacts/*/twister.xml junit.xml
|
||||
junit2html junit.xml junit-clang.html
|
||||
|
||||
- name: Upload Unit Test Results in HTML
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: HTML Unit Test Results
|
||||
if-no-files-found: ignore
|
||||
path: |
|
||||
junit-clang.html
|
||||
|
||||
- name: Publish Unit Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v1
|
||||
|
||||
5
.github/workflows/codecov.yaml
vendored
5
.github/workflows/codecov.yaml
vendored
@@ -18,14 +18,14 @@ jobs:
|
||||
runs-on: zephyr_runner
|
||||
needs: codecov-prep
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.21.0
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
options: '--entrypoint /bin/bash'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: ["native_posix", "qemu_x86", "unit_testing"]
|
||||
env:
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.2
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||
steps:
|
||||
- name: Update PATH for west
|
||||
@@ -149,7 +149,6 @@ jobs:
|
||||
|
||||
- name: Merge coverage files
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y lcov
|
||||
cd ./coverage/reports
|
||||
lcov ${{ steps.get-coverage-files.outputs.mergefiles }} -o merged.info --rc lcov_branch_coverage=1
|
||||
|
||||
1
.github/workflows/coding_guidelines.yml
vendored
1
.github/workflows/coding_guidelines.yml
vendored
@@ -27,7 +27,6 @@ jobs:
|
||||
|
||||
- name: Install Packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ocaml-base-nox
|
||||
wget https://launchpad.net/~npalix/+archive/ubuntu/coccinelle/+files/coccinelle_1.0.8~20.04npalix1_amd64.deb
|
||||
sudo dpkg -i coccinelle_1.0.8~20.04npalix1_amd64.deb
|
||||
|
||||
2
.github/workflows/compliance.yml
vendored
2
.github/workflows/compliance.yml
vendored
@@ -95,6 +95,6 @@ jobs:
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "${exit}" == "1" ]; then
|
||||
if [ ${exit} == 1 ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
14
.github/workflows/conflict.yml
vendored
14
.github/workflows/conflict.yml
vendored
@@ -1,14 +0,0 @@
|
||||
name: Conflict Finder
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- '**'
|
||||
jobs:
|
||||
conflict:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: mschilde/auto-label-merge-conflicts@v2
|
||||
with:
|
||||
CONFLICT_LABEL_NAME: "has conflicts"
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
38
.github/workflows/daily_test_version.yml
vendored
38
.github/workflows/daily_test_version.yml
vendored
@@ -1,38 +0,0 @@
|
||||
# Copyright (c) 2020 Intel Corp.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
name: Publish commit for daily testing
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '50 22 * * *'
|
||||
push:
|
||||
branches:
|
||||
- refs/tags/*
|
||||
|
||||
jobs:
|
||||
get_version:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'zephyrproject-rtos/zephyr'
|
||||
|
||||
steps:
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_TESTING }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_TESTING }}
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: install-pip
|
||||
run: |
|
||||
pip3 install gitpython
|
||||
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Upload to AWS S3
|
||||
run: |
|
||||
python3 scripts/ci/version_mgr.py --update .
|
||||
aws s3 cp versions.json s3://testing.zephyrproject.org/daily_tests/versions.json
|
||||
2
.github/workflows/devicetree_checks.yml
vendored
2
.github/workflows/devicetree_checks.yml
vendored
@@ -25,8 +25,6 @@ jobs:
|
||||
exclude:
|
||||
- os: macos-latest
|
||||
python-version: 3.6
|
||||
- os: windows-latest
|
||||
python-version: 3.6
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
25
.github/workflows/doc-build.yml
vendored
25
.github/workflows/doc-build.yml
vendored
@@ -26,20 +26,15 @@ on:
|
||||
|
||||
env:
|
||||
# NOTE: west docstrings will be extracted from the version listed here
|
||||
WEST_VERSION: 0.12.0
|
||||
WEST_VERSION: 0.11.1
|
||||
# The latest CMake available directly with apt is 3.18, but we need >=3.20
|
||||
# so we fetch that through pip.
|
||||
CMAKE_VERSION: 3.20.5
|
||||
DOXYGEN_VERSION: 1.9.2
|
||||
|
||||
jobs:
|
||||
doc-build-html:
|
||||
name: "Documentation Build (HTML)"
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
concurrency:
|
||||
group: doc-build-html-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -47,11 +42,7 @@ jobs:
|
||||
|
||||
- name: install-pkgs
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ninja-build graphviz libclang1-9 libclang-cpp9
|
||||
wget --no-verbose https://www.doxygen.nl/files/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
|
||||
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
|
||||
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
|
||||
sudo apt-get install -y ninja-build doxygen graphviz
|
||||
|
||||
- name: cache-pip
|
||||
uses: actions/cache@v1
|
||||
@@ -78,13 +69,7 @@ jobs:
|
||||
DOC_TAG="development"
|
||||
fi
|
||||
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
DOC_TARGET="html-fast"
|
||||
else
|
||||
DOC_TARGET="html"
|
||||
fi
|
||||
|
||||
DOC_TAG=${DOC_TAG} SPHINXOPTS="-q -W -t publish" make -C doc ${DOC_TARGET}
|
||||
DOC_TAG=${DOC_TAG} SPHINXOPTS="-q -W -j auto" make -C doc html
|
||||
|
||||
- name: compress-docs
|
||||
run: |
|
||||
@@ -100,10 +85,6 @@ jobs:
|
||||
name: "Documentation Build (PDF)"
|
||||
runs-on: ubuntu-latest
|
||||
container: texlive/texlive:latest
|
||||
timeout-minutes: 30
|
||||
concurrency:
|
||||
group: doc-build-pdf-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
|
||||
5
.github/workflows/doc-publish.yml
vendored
5
.github/workflows/doc-publish.yml
vendored
@@ -19,16 +19,13 @@ jobs:
|
||||
doc-publish:
|
||||
name: Publish Documentation
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
github.event.workflow_run.conclusion == 'success' &&
|
||||
github.repository == 'zephyrproject-rtos/zephyr'
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
workflow: doc-build.yml
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
|
||||
- name: Uncompress HTML docs
|
||||
run: |
|
||||
|
||||
2
.github/workflows/errno.yml
vendored
2
.github/workflows/errno.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
check-errno:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.21.0
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
|
||||
4
.github/workflows/footprint-tracking.yml
vendored
4
.github/workflows/footprint-tracking.yml
vendored
@@ -27,12 +27,12 @@ jobs:
|
||||
if: github.repository == 'zephyrproject-rtos/zephyr'
|
||||
needs: footprint-tracking-cancel
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.21.0
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
options: '--entrypoint /bin/bash'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
env:
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.2
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
|
||||
steps:
|
||||
|
||||
4
.github/workflows/footprint.yml
vendored
4
.github/workflows/footprint.yml
vendored
@@ -16,12 +16,12 @@ jobs:
|
||||
if: github.repository == 'zephyrproject-rtos/zephyr'
|
||||
needs: footprint-cancel
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.21.0
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
options: '--entrypoint /bin/bash'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
env:
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.2
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
|
||||
steps:
|
||||
|
||||
54
.github/workflows/issue_count.yml
vendored
54
.github/workflows/issue_count.yml
vendored
@@ -1,54 +0,0 @@
|
||||
name: Issue Tracker
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '*/10 * * * *'
|
||||
|
||||
env:
|
||||
OUTPUT_FILE_NAME: IssuesReport.md
|
||||
COMMITTER_EMAIL: actions@github.com
|
||||
COMMITTER_NAME: github-actions
|
||||
COMMITTER_USERNAME: github-actions
|
||||
|
||||
|
||||
jobs:
|
||||
track-issues:
|
||||
name: "Collect Issue Stats"
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'zephyrproject-rtos/zephyr'
|
||||
|
||||
steps:
|
||||
- name: Download configuration file
|
||||
run: |
|
||||
wget -q https://raw.githubusercontent.com/$GITHUB_REPOSITORY/master/.github/workflows/issues-report-config.json
|
||||
|
||||
- name: install-packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install discount
|
||||
|
||||
- uses: brcrista/summarize-issues@v3
|
||||
with:
|
||||
title: 'Issues Report for ${{ github.repository }}'
|
||||
configPath: 'issues-report-config.json'
|
||||
outputPath: ${{ env.OUTPUT_FILE_NAME }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: upload-stats
|
||||
uses: actions/upload-artifact@master
|
||||
continue-on-error: True
|
||||
with:
|
||||
name: ${{ env.OUTPUT_FILE_NAME }}
|
||||
path: ${{ env.OUTPUT_FILE_NAME }}
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_TESTING }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_TESTING }}
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: Post Results
|
||||
run: |
|
||||
mkd2html IssuesReport.md IssuesReport.html
|
||||
aws s3 cp --quiet IssuesReport.html s3://testing.zephyrproject.org/issues/$GITHUB_REPOSITORY/index.html
|
||||
37
.github/workflows/issues-report-config.json
vendored
37
.github/workflows/issues-report-config.json
vendored
@@ -1,37 +0,0 @@
|
||||
[
|
||||
{
|
||||
"section": "High Priority Bugs",
|
||||
"labels": ["bug", "priority: high"],
|
||||
"threshold": 0
|
||||
},
|
||||
{
|
||||
"section": "Medium Priority Bugs",
|
||||
"labels": ["bug", "priority: medium"],
|
||||
"threshold": 20
|
||||
},
|
||||
{
|
||||
"section": "Low Priority Bugs",
|
||||
"labels": ["bug", "priority: low"],
|
||||
"threshold": 100
|
||||
},
|
||||
{
|
||||
"section": "Enhancements",
|
||||
"labels": ["Enhancement"],
|
||||
"threshold": 500
|
||||
},
|
||||
{
|
||||
"section": "Features",
|
||||
"labels": ["Feature"],
|
||||
"threshold": 100
|
||||
},
|
||||
{
|
||||
"section": "Questions",
|
||||
"labels": ["question"],
|
||||
"threshold": 100
|
||||
},
|
||||
{
|
||||
"section": "Static Analysis",
|
||||
"labels": ["Coverity"],
|
||||
"threshold": 100
|
||||
}
|
||||
]
|
||||
1
.github/workflows/manifest.yml
vendored
1
.github/workflows/manifest.yml
vendored
@@ -15,6 +15,7 @@ jobs:
|
||||
path: zephyrproject/zephyr
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: Manifest
|
||||
uses: zephyrproject-rtos/action-manifest@2f1ad2908599d4fe747f886f9d733dd7eebae4ef
|
||||
|
||||
23
.github/workflows/stale_issue.yml
vendored
23
.github/workflows/stale_issue.yml
vendored
@@ -1,23 +0,0 @@
|
||||
name: "Close stale pull requests/issues"
|
||||
on:
|
||||
schedule:
|
||||
- cron: "16 00 * * *"
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
name: Find Stale issues and PRs
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'zephyrproject-rtos/zephyr'
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-pr-message: 'This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.'
|
||||
stale-issue-message: 'This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.'
|
||||
days-before-stale: 60
|
||||
days-before-close: 14
|
||||
stale-issue-label: 'Stale'
|
||||
stale-pr-label: 'Stale'
|
||||
exempt-pr-labels: 'Blocked,In progress'
|
||||
exempt-issue-labels: 'In progress,Enhancement,Feature,Feature Request,RFC,Meta,Process'
|
||||
operations-per-run: 400
|
||||
197
.github/workflows/twister.yaml
vendored
197
.github/workflows/twister.yaml
vendored
@@ -3,156 +3,138 @@ name: Run tests with twister
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- v2.7-auditable-branch
|
||||
pull_request_target:
|
||||
branches:
|
||||
- main
|
||||
- v2.7-auditable-branch
|
||||
schedule:
|
||||
# Run at 00:00 on Wednesday and Saturday
|
||||
- cron: '0 0 * * 3,6'
|
||||
# Run at 00:00 on Saturday
|
||||
- cron: '0 8 * * 6'
|
||||
|
||||
jobs:
|
||||
twister-build-cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
twister-build-prep:
|
||||
runs-on: zephyr_runner
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
options: '--entrypoint /bin/bash'
|
||||
outputs:
|
||||
subset: ${{ steps.output-services.outputs.subset }}
|
||||
size: ${{ steps.output-services.outputs.size }}
|
||||
env:
|
||||
MATRIX_SIZE: 10
|
||||
DAILY_MATRIX_SIZE: 120
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||
TESTS_PER_BUILDER: 700
|
||||
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||
steps:
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.6.0
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
twister-build-prep:
|
||||
|
||||
runs-on: zephyr_runner
|
||||
needs: twister-build-cleanup
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.21.0
|
||||
options: '--entrypoint /bin/bash'
|
||||
volumes:
|
||||
- /home/runners/zephyrproject:/github/cache/zephyrproject
|
||||
outputs:
|
||||
subset: ${{ steps.output-services.outputs.subset }}
|
||||
size: ${{ steps.output-services.outputs.size }}
|
||||
fullrun: ${{ steps.output-services.outputs.fullrun }}
|
||||
env:
|
||||
MATRIX_SIZE: 10
|
||||
PUSH_MATRIX_SIZE: 15
|
||||
DAILY_MATRIX_SIZE: 80
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.2
|
||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||
TESTS_PER_BUILDER: 700
|
||||
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
steps:
|
||||
- name: Cleanup
|
||||
run: |
|
||||
# hotfix, until we have a better way to deal with existing data
|
||||
rm -rf zephyr zephyr-testing
|
||||
|
||||
- name: Checkout
|
||||
- name: checkout
|
||||
if: github.event_name == 'pull_request_target'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: Environment Setup
|
||||
- name: west setup
|
||||
if: github.event_name == 'pull_request_target'
|
||||
run: |
|
||||
pip3 install GitPython
|
||||
git config --global user.email "bot@zephyrproject.org"
|
||||
git config --global user.name "Zephyr Bot"
|
||||
rm -fr ".git/rebase-apply"
|
||||
git rebase origin/${BASE_REF}
|
||||
git log --pretty=oneline | head -n 10
|
||||
west init -l . || true
|
||||
# no need for west update here
|
||||
west config --global update.narrow true
|
||||
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update.log
|
||||
west forall -c 'git reset --hard HEAD'
|
||||
|
||||
- name: Generate Test Plan with Twister
|
||||
if: github.event_name == 'pull_request_target'
|
||||
id: test-plan
|
||||
run: |
|
||||
sudo apt-get install -y bc
|
||||
git config --global user.email "bot@zephyrproject.org"
|
||||
git config --global user.name "Zephyr Bot"
|
||||
export ZEPHYR_BASE=${PWD}
|
||||
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
|
||||
python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request -t $TESTS_PER_BUILDER
|
||||
if [ -s .testplan ]; then
|
||||
cat .testplan >> $GITHUB_ENV
|
||||
git log -n 500 --oneline | grep -q "run twister using github action" || (
|
||||
echo "Your branch is not up to date, you need to rebase on top of latest HEAD of main branch"
|
||||
exit 1
|
||||
)
|
||||
./scripts/ci/run_ci.sh -S -c -b ${{github.base_ref}} -r origin \
|
||||
-p ${{github.event.pull_request.number}} -R ${COMMIT_RANGE}
|
||||
# remove all tests to be skipped
|
||||
grep -v skipped test_file.txt > no_skipped.txt
|
||||
# get number of tests
|
||||
lines=$(wc -l < no_skipped.txt)
|
||||
if [ "$lines" = 1 ]; then
|
||||
# no tests, so we need 0 nodes
|
||||
nodes=0
|
||||
else
|
||||
echo "TWISTER_NODES=${MATRIX_SIZE}" >> $GITHUB_ENV
|
||||
nodes=$(echo "${lines} / ${TESTS_PER_BUILDER}" | bc)
|
||||
if [ "${nodes}" = 0 ]; then
|
||||
# for less than TESTS_PER_BUILDER, we take at least 1 node
|
||||
nodes=1
|
||||
fi
|
||||
fi
|
||||
rm -f testplan.csv .testplan
|
||||
echo "::set-output name=calculated_matrix_size::${nodes}";
|
||||
rm test_file.txt no_skipped.txt
|
||||
|
||||
- name: Determine matrix size
|
||||
id: output-services
|
||||
run: |
|
||||
if [ "${{github.event_name}}" = "pull_request_target" ]; then
|
||||
if [ -n "${TWISTER_NODES}" ]; then
|
||||
subset="[$(seq -s',' 1 ${TWISTER_NODES})]"
|
||||
if [ -n "${{steps.test-plan.outputs.calculated_matrix_size}}" ]; then
|
||||
subset="[$(seq -s',' 1 ${{steps.test-plan.outputs.calculated_matrix_size}})]"
|
||||
else
|
||||
subset="[$(seq -s',' 1 ${MATRIX_SIZE})]"
|
||||
fi
|
||||
size=${TWISTER_NODES}
|
||||
size=${{ steps.test-plan.outputs.calculated_matrix_size }}
|
||||
elif [ "${{github.event_name}}" = "push" ]; then
|
||||
subset="[$(seq -s',' 1 ${PUSH_MATRIX_SIZE})]"
|
||||
subset="[$(seq -s',' 1 ${MATRIX_SIZE})]"
|
||||
size=${MATRIX_SIZE}
|
||||
elif [ "${{github.event_name}}" = "schedule" -a "${{github.repository}}" = "zephyrproject-rtos/zephyr" ]; then
|
||||
else
|
||||
subset="[$(seq -s',' 1 ${DAILY_MATRIX_SIZE})]"
|
||||
size=${DAILY_MATRIX_SIZE}
|
||||
else
|
||||
size=0
|
||||
fi
|
||||
echo "::set-output name=subset::${subset}";
|
||||
echo "::set-output name=size::${size}";
|
||||
echo "::set-output name=fullrun::${TWISTER_FULL}";
|
||||
|
||||
|
||||
twister-build:
|
||||
runs-on: zephyr_runner
|
||||
needs: twister-build-prep
|
||||
if: needs.twister-build-prep.outputs.size != 0
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.21.0
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
options: '--entrypoint /bin/bash'
|
||||
volumes:
|
||||
- /home/runners/zephyrproject:/github/cache/zephyrproject
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
subset: ${{fromJSON(needs.twister-build-prep.outputs.subset)}}
|
||||
env:
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.2
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||
TWISTER_COMMON: ' --inline-logs -v -N -M --retry-failed 3 '
|
||||
DAILY_OPTIONS: ' -M --build-only --all '
|
||||
PR_OPTIONS: ' --clobber-output --integration '
|
||||
PUSH_OPTIONS: ' --clobber-output -M '
|
||||
DAILY_OPTIONS: ' --inline-logs -M -N --build-only --all --retry-failed 3 -v '
|
||||
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
steps:
|
||||
- name: Cleanup
|
||||
- name: Update PATH for west
|
||||
run: |
|
||||
# hotfix, until we have a better way to deal with existing data
|
||||
rm -rf zephyr zephyr-testing
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Checkout
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: Environment Setup
|
||||
- name: west setup
|
||||
run: |
|
||||
pip3 install GitPython
|
||||
if [ "${{github.event_name}}" = "pull_request_target" ]; then
|
||||
git config --global user.email "bot@zephyrproject.org"
|
||||
git config --global user.name "Zephyr Builder"
|
||||
rm -fr ".git/rebase-apply"
|
||||
git rebase origin/${BASE_REF}
|
||||
git log --pretty=oneline | head -n 10
|
||||
fi
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
west init -l . || true
|
||||
west config --global update.narrow true
|
||||
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
|
||||
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update.log
|
||||
west forall -c 'git reset --hard HEAD'
|
||||
|
||||
- name: Check Environment
|
||||
@@ -187,7 +169,7 @@ jobs:
|
||||
|
||||
- name: ccache stats initial
|
||||
run: |
|
||||
test -d github/home/.ccache && rm -rf /github/home/.ccache && mv github/home/.ccache /github/home/.ccache
|
||||
test -d github/home/.ccache && mv github/home/.ccache /github/home/.ccache
|
||||
ccache -M 10G -s
|
||||
|
||||
- if: github.event_name == 'push'
|
||||
@@ -195,41 +177,26 @@ jobs:
|
||||
run: |
|
||||
export ZEPHYR_BASE=${PWD}
|
||||
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
|
||||
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${PUSH_OPTIONS}
|
||||
if [ "${{matrix.subset}}" = "1" ]; then
|
||||
./scripts/zephyr_module.py --twister-out module_tests.args
|
||||
if [ -s module_tests.args ]; then
|
||||
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PUSH_OPTIONS}
|
||||
fi
|
||||
fi
|
||||
./scripts/ci/run_ci.sh -c -b main -r origin -m ${{matrix.subset}} \
|
||||
-M ${{ strategy.job-total }}
|
||||
|
||||
- if: github.event_name == 'pull_request_target'
|
||||
name: Run Tests with Twister (Pull Request)
|
||||
run: |
|
||||
rm -f testplan.csv
|
||||
git config --global user.email "bot@zephyrproject.org"
|
||||
git config --global user.name "Zephyr Builder"
|
||||
export ZEPHYR_BASE=${PWD}
|
||||
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
|
||||
python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request
|
||||
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} --load-tests testplan.csv ${TWISTER_COMMON} ${PR_OPTIONS}
|
||||
if [ "${{matrix.subset}}" = "1" -a ${{needs.twister-build-prep.outputs.fullrun}} = 'True' ]; then
|
||||
./scripts/zephyr_module.py --twister-out module_tests.args
|
||||
if [ -s module_tests.args ]; then
|
||||
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PR_OPTIONS}
|
||||
fi
|
||||
fi
|
||||
./scripts/ci/run_ci.sh -c -b ${{github.base_ref}} -r origin \
|
||||
-m ${{matrix.subset}} -M ${{ strategy.job-total }} \
|
||||
-p ${{github.event.pull_request.number}} -R ${COMMIT_RANGE}
|
||||
|
||||
- if: github.event_name == 'schedule'
|
||||
name: Run Tests with Twister (Daily)
|
||||
run: |
|
||||
export ZEPHYR_BASE=${PWD}
|
||||
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
|
||||
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${DAILY_OPTIONS}
|
||||
if [ "${{matrix.subset}}" = "1" ]; then
|
||||
./scripts/zephyr_module.py --twister-out module_tests.args
|
||||
if [ -s module_tests.args ]; then
|
||||
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${DAILY_OPTIONS}
|
||||
fi
|
||||
fi
|
||||
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${DAILY_OPTIONS}
|
||||
|
||||
- name: ccache stats post
|
||||
run: |
|
||||
@@ -240,10 +207,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Unit Test Results (Subset ${{ matrix.subset }})
|
||||
if-no-files-found: ignore
|
||||
path: |
|
||||
twister-out/twister.xml
|
||||
testplan.csv
|
||||
path: twister-out/twister.xml
|
||||
|
||||
twister-test-results:
|
||||
name: "Publish Unit Tests Results"
|
||||
@@ -258,21 +222,6 @@ jobs:
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Merge Test Results
|
||||
run: |
|
||||
pip3 install junitparser junit2html
|
||||
junitparser merge artifacts/*/*/twister.xml junit.xml
|
||||
junit2html junit.xml junit.html
|
||||
|
||||
- name: Upload Unit Test Results in HTML
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: HTML Unit Test Results
|
||||
if-no-files-found: ignore
|
||||
path: |
|
||||
junit.html
|
||||
|
||||
- name: Publish Unit Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v1
|
||||
with:
|
||||
|
||||
2
.github/workflows/west_cmds.yml
vendored
2
.github/workflows/west_cmds.yml
vendored
@@ -26,8 +26,6 @@ jobs:
|
||||
exclude:
|
||||
- os: macos-latest
|
||||
python-version: 3.6
|
||||
- os: windows-latest
|
||||
python-version: 3.6
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -44,11 +44,6 @@ doc/doc.warnings
|
||||
hide-defaults-note
|
||||
venv
|
||||
.venv
|
||||
.DS_Store
|
||||
|
||||
# CI output
|
||||
compliance.xml
|
||||
_error.types
|
||||
|
||||
# Tag files
|
||||
GPATH
|
||||
|
||||
7
.gitlint
7
.gitlint
@@ -4,10 +4,7 @@ ignore=title-trailing-punctuation, T3, title-max-length, T1, body-hard-tab, B3,
|
||||
# verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this
|
||||
verbosity = 3
|
||||
# By default gitlint will ignore merge commits. Set to 'false' to disable.
|
||||
ignore-merge-commits=false
|
||||
ignore-revert-commits=false
|
||||
ignore-fixup-commits=false
|
||||
ignore-squash-commits=false
|
||||
ignore-merge-commits=true
|
||||
# Enable debug mode (prints more output). Disabled by default
|
||||
debug = false
|
||||
|
||||
@@ -42,7 +39,7 @@ words=wip
|
||||
|
||||
[max-line-length-with-exceptions]
|
||||
# B1 = body-max-line-length
|
||||
line-length=75
|
||||
line-length=72
|
||||
|
||||
[body-min-length]
|
||||
min-length=3
|
||||
|
||||
@@ -24,13 +24,6 @@ nl_func_var_def_blk = 1
|
||||
nl_fcall_brace = remove # "list_for_each() {" vs "list_for_each()\n{"
|
||||
nl_fdef_brace = add # "int foo() {" vs "int foo()\n{"
|
||||
|
||||
#
|
||||
# End of file behavior
|
||||
#
|
||||
|
||||
nl_end_of_file = force # string (add/force/ignore/remove)
|
||||
nl_end_of_file_min = 1 # The min number of newlines at end of file
|
||||
|
||||
#
|
||||
# Source code modifications
|
||||
#
|
||||
|
||||
771
CMakeLists.txt
771
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
205
CODEOWNERS
205
CODEOWNERS
@@ -15,7 +15,7 @@
|
||||
|
||||
/.github/ @nashif
|
||||
/.github/workflows/ @galak @nashif
|
||||
/MAINTAINERS.yml @MaureenHelm
|
||||
/MAINTAINERS.yml @ioannisg @MaureenHelm
|
||||
/arch/arc/ @abrodkin @ruuddw @evgeniy-paltsev
|
||||
/arch/arm/ @MaureenHelm @galak @ioannisg
|
||||
/arch/arm/core/aarch32/cortex_m/cmse/ @ioannisg
|
||||
@@ -23,9 +23,7 @@
|
||||
/arch/arm/core/aarch32/cortex_a_r/ @MaureenHelm @galak @ioannisg @bbolen @stephanosio
|
||||
/arch/arm64/ @carlocaione
|
||||
/arch/arm64/core/cortex_r/ @povergoing
|
||||
/arch/arm64/core/xen/ @lorc @firscity
|
||||
/arch/common/ @ioannisg @andyross
|
||||
/arch/mips/ @frantony
|
||||
/soc/arc/snps_*/ @abrodkin @ruuddw @evgeniy-paltsev
|
||||
/soc/nios2/ @nashif
|
||||
/soc/arm/ @MaureenHelm @galak @ioannisg
|
||||
@@ -39,14 +37,12 @@
|
||||
/soc/arm/atmel_sam/samv71/ @nandojve
|
||||
/soc/arm/cypress/ @nandojve
|
||||
/soc/arm/bcm*/ @sbranden
|
||||
/soc/arm/gigadevice/ @nandojve
|
||||
/soc/arm/infineon_xmc/ @parthitce
|
||||
/soc/arm/nxp*/ @mmahadevan108 @dleach02
|
||||
/soc/arm/nordic_nrf/ @anangl
|
||||
/soc/arm/nordic_nrf/ @ioannisg
|
||||
/soc/arm/nuvoton_npcx/ @MulinChao @WealianLiao @ChiHuaL
|
||||
/soc/arm/nuvoton_numicro/ @ssekar15
|
||||
/soc/arm/quicklogic_eos_s3/ @kowalewskijan @kgugala
|
||||
/soc/arm/rpi_pico/ @yonsch
|
||||
/soc/arm/silabs_exx32/efm32pg1b/ @rdmeneze
|
||||
/soc/arm/silabs_exx32/efr32mg21/ @l-alfred
|
||||
/soc/arm/st_stm32/ @erwango
|
||||
@@ -55,7 +51,6 @@
|
||||
/soc/arm/ti_simplelink/cc13x2_cc26x2/ @bwitherspoon
|
||||
/soc/arm/ti_simplelink/cc32xx/ @vanti
|
||||
/soc/arm/ti_simplelink/msp432p4xx/ @Mani-Sadhasivam
|
||||
/soc/arm/xilinx_zynq7000/ @ibirnbaum
|
||||
/soc/arm/xilinx_zynqmp/ @stephanosio
|
||||
/soc/arm/renesas_rcar/ @julien-massot
|
||||
/soc/xtensa/intel_s1000/ @sathishkuttan @dcpleung
|
||||
@@ -63,21 +58,17 @@
|
||||
/soc/arm64/qemu_cortex_a53/ @carlocaione
|
||||
/soc/arm64/bcm_vk/ @abhishek-brcm
|
||||
/soc/arm64/nxp_layerscape/ @JiafeiPan
|
||||
/soc/arm64/xenvm/ @lorc @firscity
|
||||
/soc/arm64/xenvm/ @lorc
|
||||
/soc/arm64/arm/ @povergoing
|
||||
/soc/arm64/arm/fvp_aemv8a/ @carlocaione
|
||||
/submanifests/* @mbolivar-nordic
|
||||
/arch/x86/ @jhedberg @nashif @jenmwms @aasthagr
|
||||
/arch/nios2/ @nashif
|
||||
/arch/posix/ @aescolar @daor-oti
|
||||
/arch/riscv/ @kgugala @pgielda
|
||||
/soc/mips/ @frantony
|
||||
/soc/posix/ @aescolar @daor-oti
|
||||
/soc/riscv/ @kgugala @pgielda
|
||||
/soc/riscv/openisa*/ @dleach02
|
||||
/soc/riscv/riscv-privilege/andes_v5/ @cwshu @kevinwang821020 @jimmyzhe
|
||||
/soc/riscv/riscv-privilege/neorv32/ @henrikbrixandersen
|
||||
/soc/riscv/riscv-privilege/gd32vf103/ @soburi
|
||||
/soc/riscv/riscv-privilege/andes_v5/ @cwshu @Teng-Shih-Wei
|
||||
/soc/x86/ @dcpleung @nashif @jenmwms @aasthagr
|
||||
/arch/xtensa/ @dcpleung @andyross @nashif
|
||||
/soc/xtensa/ @dcpleung @andyross @nashif
|
||||
@@ -94,7 +85,6 @@
|
||||
/boards/arm/96b_stm32_sensor_mez/ @Mani-Sadhasivam
|
||||
/boards/arm/96b_wistrio/ @Mani-Sadhasivam
|
||||
/boards/arm/arduino_due/ @ioannisg
|
||||
/boards/arm/bbc_microbit_v2/ @LingaoM
|
||||
/boards/arm/blackpill_f401ce/ @coderkalyan
|
||||
/boards/arm/blackpill_f411ce/ @coderkalyan
|
||||
/boards/arm/cc1352r1_launchxl/ @bwitherspoon
|
||||
@@ -106,7 +96,6 @@
|
||||
/boards/arm/faze/ @mbittan @simonguinot
|
||||
/boards/arm/frdm*/ @mmahadevan108 @dleach02
|
||||
/boards/arm/frdm*/doc/ @dleach02 @MeganHansen
|
||||
/boards/arm/gd32*/ @nandojve
|
||||
/boards/arm/google_*/ @jackrosenthal
|
||||
/boards/arm/hexiwear*/ @mmahadevan108 @dleach02
|
||||
/boards/arm/hexiwear*/doc/ @dleach02 @MeganHansen
|
||||
@@ -120,17 +109,15 @@
|
||||
/boards/arm/mps2_an385/ @fvincenzo
|
||||
/boards/arm/msp_exp432p401r_launchxl/ @Mani-Sadhasivam
|
||||
/boards/arm/npcx7m6fb_evb/ @MulinChao @WealianLiao @ChiHuaL
|
||||
/boards/arm/nrf*/ @carlescufi @lemrey
|
||||
/boards/arm/nrf*/ @carlescufi @lemrey @ioannisg
|
||||
/boards/arm/nucleo*/ @erwango @ABOSTM @FRASTM
|
||||
/boards/arm/nucleo_f401re/ @idlethread
|
||||
/boards/arm/nuvoton_pfm_m487/ @ssekar15
|
||||
/boards/arm/qemu_cortex_a9/ @ibirnbaum
|
||||
/boards/arm/qemu_cortex_r*/ @stephanosio
|
||||
/boards/arm/qemu_cortex_m*/ @ioannisg @stephanosio
|
||||
/boards/arm/qemu_cortex_m*/ @ioannisg
|
||||
/boards/arm/quick_feather/ @kowalewskijan @kgugala
|
||||
/boards/arm/rak4631_nrf52840/ @gpaquet85
|
||||
/boards/arm/rak5010_nrf52840/ @gpaquet85
|
||||
/boards/arm/rpi_pico/ @yonsch
|
||||
/boards/arm/ronoth_lodev/ @NorthernDean
|
||||
/boards/arm/xmc45_relax_kit/ @parthitce
|
||||
/boards/arm/sam4e_xpro/ @nandojve
|
||||
@@ -138,7 +125,6 @@
|
||||
/boards/arm/sam4s_xplained/ @fallrisk
|
||||
/boards/arm/sam_e70_xplained/ @nandojve
|
||||
/boards/arm/sam_v71_xult/ @nandojve
|
||||
/boards/arm/scobc_module1/ @yashi
|
||||
/boards/arm/v2m_beetle/ @fvincenzo
|
||||
/boards/arm/olimexino_stm32/ @ydamigos
|
||||
/boards/arm/sensortile_box/ @avisconti
|
||||
@@ -151,7 +137,6 @@
|
||||
/boards/arm/ubx_bmd345eval_nrf52840/ @Navin-Sankar @brec-u-blox
|
||||
/boards/common/ @mbolivar-nordic
|
||||
/boards/deprecated.cmake @tejlmand
|
||||
/boards/mips/ @frantony
|
||||
/boards/nios2/ @nashif
|
||||
/boards/nios2/altera_max10/ @nashif
|
||||
/boards/arm/stm32_min_dev/ @sidcha
|
||||
@@ -160,10 +145,7 @@
|
||||
/boards/riscv/ @kgugala @pgielda
|
||||
/boards/riscv/rv32m1_vega/ @dleach02
|
||||
/boards/riscv/beaglev_starlight_jh7100/ @rajnesh-kanwal
|
||||
/boards/riscv/adp_xc7k_ae350/ @cwshu @kevinwang821020 @jimmyzhe
|
||||
/boards/riscv/gd32*/ @gmarull
|
||||
/boards/riscv/longan_nano/ @soburi
|
||||
/boards/riscv/neorv32/ @henrikbrixandersen
|
||||
/boards/riscv/adp_xc7k_ae350/ @cwshu @Teng-Shih-Wei
|
||||
/boards/shields/ @erwango
|
||||
/boards/shields/atmel_rf2xx/ @nandojve
|
||||
/boards/shields/esp_8266/ @nandojve
|
||||
@@ -178,10 +160,9 @@
|
||||
/boards/arm64/qemu_cortex_a53/ @carlocaione
|
||||
/boards/arm64/bcm958402m2_a72/ @abhishek-brcm
|
||||
/boards/arm64/nxp_ls1046ardb/ @JiafeiPan
|
||||
/boards/arm64/xenvm/ @lorc @firscity
|
||||
/boards/arm64/xenvm/ @lorc
|
||||
/boards/arm64/fvp_baser_aemv8r/ @povergoing
|
||||
/boards/arm64/fvp_base_revc_2xaemv8a/ @carlocaione
|
||||
/boards/arm64/intel_socfpga_agilex_socdk/ @siclim @ngboonkhai
|
||||
# All cmake related files
|
||||
/cmake/ @tejlmand @nashif
|
||||
/cmake/*/arcmwdt/ @abrodkin @evgeniy-paltsev @tejlmand
|
||||
@@ -190,44 +171,39 @@
|
||||
/doc/guides/coccinelle.rst @himanshujha199640 @JuliaLawall
|
||||
/doc/CMakeLists.txt @carlescufi
|
||||
/doc/_scripts/ @carlescufi
|
||||
/doc/guides/bluetooth/ @alwa-nordic @jhedberg @Vudentz
|
||||
/doc/guides/bluetooth/ @joerchan @jhedberg @Vudentz
|
||||
/doc/guides/dts/ @galak @mbolivar-nordic
|
||||
/doc/reference/bluetooth/ @alwa-nordic @jhedberg @Vudentz
|
||||
/doc/reference/bluetooth/ @joerchan @jhedberg @Vudentz
|
||||
/doc/reference/devicetree/ @galak @mbolivar-nordic
|
||||
/doc/reference/canbus/ @alexanderwachter
|
||||
/doc/reference/networking/can* @alexanderwachter
|
||||
/doc/security/ @ceolin @d3zd3z
|
||||
/drivers/debug/ @nashif
|
||||
/drivers/*/*sam4l* @nandojve
|
||||
/drivers/*/*cc13xx_cc26xx* @bwitherspoon
|
||||
/drivers/*/*gd32* @nandojve
|
||||
/drivers/*/*litex* @mateusz-holenko @kgugala @pgielda
|
||||
/drivers/*/*mcux* @mmahadevan108 @dleach02
|
||||
/drivers/*/*stm32* @erwango @ABOSTM @FRASTM
|
||||
/drivers/*/*native_posix* @aescolar @daor-oti
|
||||
/drivers/*/*lpc11u6x* @mbittan @simonguinot
|
||||
/drivers/*/*npcx* @MulinChao @WealianLiao @ChiHuaL
|
||||
/drivers/*/*andes* @cwshu @kevinwang821020 @jimmyzhe
|
||||
/drivers/*/*neorv32* @henrikbrixandersen
|
||||
/drivers/*/*andes* @cwshu @Teng-Shih-Wei
|
||||
/drivers/adc/ @anangl
|
||||
/drivers/adc/adc_stm32.c @cybertale
|
||||
/drivers/audio/*nrfx* @anangl
|
||||
/drivers/bbram/* @yperess @sjg20 @jackrosenthal
|
||||
/drivers/bluetooth/ @alwa-nordic @jhedberg @Vudentz
|
||||
/drivers/bluetooth/hci/hci_esp32.c @sylvioalves
|
||||
/drivers/bluetooth/ @joerchan @jhedberg @Vudentz
|
||||
/drivers/cache/ @carlocaione
|
||||
/drivers/syscon/ @carlocaione @yperess
|
||||
/drivers/can/ @alexanderwachter
|
||||
/drivers/can/*mcp2515* @karstenkoenig
|
||||
/drivers/can/*rcar* @julien-massot
|
||||
/drivers/clock_control/*agilex* @siclim
|
||||
/drivers/clock_control/*nrf* @nordic-krch
|
||||
/drivers/clock_control/*esp32* @extremegtx @glaubermaroto
|
||||
/drivers/clock_control/*esp32* @extremegtx
|
||||
/drivers/clock_control/*rcar* @julien-massot
|
||||
/drivers/counter/ @nordic-krch
|
||||
/drivers/console/ipm_console.c @finikorg
|
||||
/drivers/console/semihost_console.c @luozhongyao
|
||||
/drivers/counter/counter_cmos.c @dcpleung
|
||||
/drivers/counter/counter_ll_stm32_timer.c @kentjhall
|
||||
/drivers/crypto/*nrf_ecb* @maciekfabia @anangl
|
||||
/drivers/display/ @vanwinkeljan
|
||||
/drivers/display/display_framebuf.c @dcpleung
|
||||
@@ -245,29 +221,24 @@
|
||||
/drivers/entropy/*rv32m1* @dleach02
|
||||
/drivers/entropy/*gecko* @chrta
|
||||
/drivers/entropy/*litex* @mateusz-holenko @kgugala @pgielda
|
||||
/drivers/espi/ @albertofloyd @franciscomunoz @sjvasanth1
|
||||
/drivers/espi/ @albertofloyd @franciscomunoz @scottwcpg
|
||||
/drivers/ethernet/ @tbursztyka @pfalcon
|
||||
/drivers/ethernet/*dwmac* @npitre
|
||||
/drivers/ethernet/*stm32* @Nukersson @lochej
|
||||
/drivers/ethernet/*w5500* @parthitce
|
||||
/drivers/ethernet/*xlnx_gem* @ibirnbaum
|
||||
/drivers/ethernet/phy/ @rlubos @tbursztyka @arvinf
|
||||
/drivers/mdio/ @rlubos @tbursztyka @arvinf
|
||||
/drivers/flash/ @nashif @nvlsianpu
|
||||
/drivers/flash/*stm32_qspi* @lmajewski
|
||||
/drivers/flash/*b91* @yurvyn
|
||||
/drivers/flash/*nrf* @nvlsianpu
|
||||
/drivers/flash/*esp32* @glaubermaroto
|
||||
/drivers/fpga/ @tgorochowik @kgugala
|
||||
/drivers/gpio/ @mnkp
|
||||
/drivers/gpio/*b91* @yurvyn
|
||||
/drivers/gpio/*lmp90xxx* @henrikbrixandersen
|
||||
/drivers/gpio/*nct38xx* @MulinChao @WealianLiao @ChiHuaL
|
||||
/drivers/gpio/*stm32* @erwango
|
||||
/drivers/gpio/*eos_s3* @wtatarski @kowalewskijan @kgugala
|
||||
/drivers/gpio/*rcar* @julien-massot
|
||||
/drivers/gpio/*esp32* @glaubermaroto
|
||||
/drivers/gpio/*rpi_pico* @yonsch
|
||||
/drivers/hwinfo/ @alexanderwachter
|
||||
/drivers/i2c/i2c_common.c @sjg20
|
||||
/drivers/i2c/i2c_emul.c @sjg20
|
||||
@@ -289,43 +260,36 @@
|
||||
/drivers/interrupt_controller/ @dcpleung @nashif
|
||||
/drivers/interrupt_controller/intc_gic.c @stephanosio
|
||||
/drivers/interrupt_controller/*esp32* @glaubermaroto
|
||||
/drivers/interrupt_controller/intc_nuclei_eclic.c @soburi
|
||||
/drivers/ipm/ipm_mhu* @karl-zh
|
||||
/drivers/ipm/Kconfig.nrfx @masz-nordic
|
||||
/drivers/ipm/Kconfig.nrfx_ipc_channel @masz-nordic
|
||||
/drivers/ipm/Kconfig.nrfx @masz-nordic @ioannisg
|
||||
/drivers/ipm/Kconfig.nrfx_ipc_channel @masz-nordic @ioannisg
|
||||
/drivers/ipm/ipm_intel_adsp.c @finikorg
|
||||
/drivers/ipm/ipm_cavs_idc* @dcpleung
|
||||
/drivers/ipm/ipm_nrfx_ipc.c @masz-nordic
|
||||
/drivers/ipm/ipm_nrfx_ipc.h @masz-nordic
|
||||
/drivers/ipm/ipm_nrfx_ipc.c @masz-nordic @ioannisg
|
||||
/drivers/ipm/ipm_nrfx_ipc.h @masz-nordic @ioannisg
|
||||
/drivers/ipm/ipm_stm32_ipcc.c @arnopo
|
||||
/drivers/ipm/ipm_stm32_hsem.c @cameled
|
||||
/drivers/kscan/ @VenkatKotakonda @franciscomunoz @sjvasanth1
|
||||
/drivers/kscan/*xec* @franciscomunoz @sjvasanth1
|
||||
/drivers/kscan/ @VenkatKotakonda @franciscomunoz @scottwcpg
|
||||
/drivers/kscan/*xec* @franciscomunoz @scottwcpg
|
||||
/drivers/kscan/*ft5336* @MaureenHelm
|
||||
/drivers/kscan/*ht16k33* @henrikbrixandersen
|
||||
/drivers/led/ @Mani-Sadhasivam
|
||||
/drivers/led_strip/ @mbolivar-nordic
|
||||
/drivers/lora/ @Mani-Sadhasivam
|
||||
/drivers/mbox/ @carlocaione
|
||||
/drivers/memc/ @gmarull
|
||||
/drivers/misc/ @tejlmand
|
||||
/drivers/misc/ft8xx/ @hubertmis
|
||||
/drivers/mm/ @dcpleung
|
||||
/drivers/modem/hl7800.c @LairdCP/zephyr
|
||||
/drivers/modem/simcom-sim7080.c @lgehreke
|
||||
/drivers/modem/simcom-sim7080.h @lgehreke
|
||||
/drivers/modem/Kconfig.hl7800 @LairdCP/zephyr
|
||||
/drivers/modem/Kconfig.simcom-sim7080 @lgehreke
|
||||
/drivers/pcie/ @dcpleung @nashif @jhedberg
|
||||
/drivers/peci/ @albertofloyd @franciscomunoz @sjvasanth1
|
||||
/drivers/pinctrl/ @gmarull
|
||||
/drivers/peci/ @albertofloyd @franciscomunoz @scottwcpg
|
||||
/drivers/pinmux/*b91* @yurvyn
|
||||
/drivers/pinmux/*hsdk* @iriszzw
|
||||
/drivers/pinmux/*it8xxx2* @ite
|
||||
/drivers/pinmux/*esp32* @glaubermaroto
|
||||
/drivers/pm_cpu_ops/ @carlocaione
|
||||
/drivers/power_domain/ @ceolin
|
||||
/drivers/ps2/ @franciscomunoz @sjvasanth1
|
||||
/drivers/ps2/*xec* @franciscomunoz @sjvasanth1
|
||||
/drivers/ps2/ @franciscomunoz @scottwcpg
|
||||
/drivers/ps2/*xec* @franciscomunoz @scottwcpg
|
||||
/drivers/ps2/*npcx* @MulinChao @WealianLiao @ChiHuaL
|
||||
/drivers/pwm/*b91* @yurvyn
|
||||
/drivers/pwm/*rv32m1* @henrikbrixandersen
|
||||
@@ -336,12 +300,10 @@
|
||||
/drivers/pwm/pwm_shell.c @henrikbrixandersen
|
||||
/drivers/pwm/*gecko* @sun681
|
||||
/drivers/pwm/*it8xxx2* @RuibinChang
|
||||
/drivers/regulator/*pmic* @danieldegrasse
|
||||
/drivers/sensor/ @MaureenHelm
|
||||
/drivers/sensor/ams_iAQcore/ @alexanderwachter
|
||||
/drivers/sensor/ens210/ @alexanderwachter
|
||||
/drivers/sensor/hts*/ @avisconti
|
||||
/drivers/sensor/ina23*/ @bbilas
|
||||
/drivers/sensor/lis*/ @avisconti
|
||||
/drivers/sensor/lps*/ @avisconti
|
||||
/drivers/sensor/lsm*/ @avisconti
|
||||
@@ -356,7 +318,6 @@
|
||||
/drivers/serial/uart_mcux_iuart.c @Mani-Sadhasivam
|
||||
/drivers/serial/Kconfig.rtt @carlescufi @pkral78
|
||||
/drivers/serial/uart_rtt.c @carlescufi @pkral78
|
||||
/drivers/serial/*rpi_pico* @yonsch
|
||||
/drivers/serial/Kconfig.xlnx @wjliang
|
||||
/drivers/serial/uart_xlnx_ps.c @wjliang
|
||||
/drivers/serial/uart_xlnx_uartlite.c @henrikbrixandersen
|
||||
@@ -366,11 +327,8 @@
|
||||
/drivers/serial/*rcar* @aaillet
|
||||
/drivers/serial/Kconfig.test @str4t0m
|
||||
/drivers/serial/serial_test.c @str4t0m
|
||||
/drivers/serial/Kconfig.xen @lorc @firscity
|
||||
/drivers/serial/uart_hvc_xen.c @lorc @firscity
|
||||
/drivers/serial/uart_hvc_xen_consoleio.c @lorc @firscity
|
||||
/drivers/serial/Kconfig.it8xxx2 @GTLin08
|
||||
/drivers/serial/uart_ite_it8xxx2.c @GTLin08
|
||||
/drivers/serial/*esp32c3* @uLipe
|
||||
/drivers/serial/*esp32s2* @glaubermaroto
|
||||
/drivers/disk/ @jfischer-no
|
||||
/drivers/disk/sdmmc_sdhc.h @JunYangNXP
|
||||
/drivers/disk/sdmmc_spi.c @JunYangNXP
|
||||
@@ -381,28 +339,20 @@
|
||||
/drivers/spi/ @tbursztyka
|
||||
/drivers/spi/*b91* @yurvyn
|
||||
/drivers/spi/spi_rv32m1_lpspi* @karstenkoenig
|
||||
/drivers/spi/*esp32* @glaubermaroto
|
||||
/drivers/timer/*apic* @dcpleung @nashif
|
||||
/drivers/timer/apic_timer.c @dcpleung @nashif
|
||||
/drivers/timer/apic_tsc.c @andyross
|
||||
/drivers/timer/*arm_arch* @carlocaione
|
||||
/drivers/timer/*cortex_m_systick* @anangl
|
||||
/drivers/timer/*altera_avalon* @nashif
|
||||
/drivers/timer/*riscv_machine* @kgugala @pgielda
|
||||
/drivers/timer/*ite_it8xxx2* @ite
|
||||
/drivers/timer/*xlnx_psttc* @wjliang @stephanosio
|
||||
/drivers/timer/*cc13x2_cc26x2_rtc* @vanti
|
||||
/drivers/timer/*cavs* @dcpleung
|
||||
/drivers/timer/*stm32_lptim* @FRASTM
|
||||
/drivers/timer/*leon_gptimer* @martin-aberg
|
||||
/drivers/timer/*mips_cp0* @frantony
|
||||
/drivers/timer/*rcar_cmt* @julien-massot
|
||||
/drivers/timer/*esp32c3_sys* @uLipe
|
||||
/drivers/timer/*sam0_rtc* @bendiscz
|
||||
/drivers/timer/*arcv2* @ruuddw
|
||||
/drivers/timer/*xtensa* @dcpleung
|
||||
/drivers/timer/*rv32m1_lptmr* @mbolivar
|
||||
/drivers/timer/*nrf_rtc* @anangl
|
||||
/drivers/timer/*hpet* @dcpleung
|
||||
/drivers/timer/arm_arch_timer.c @carlocaione
|
||||
/drivers/timer/cortex_m_systick.c @ioannisg
|
||||
/drivers/timer/altera_avalon_timer_hal.c @nashif
|
||||
/drivers/timer/riscv_machine_timer.c @kgugala @pgielda
|
||||
/drivers/timer/ite_it8xxx2_timer.c @ite
|
||||
/drivers/timer/xlnx_psttc_timer* @wjliang @stephanosio
|
||||
/drivers/timer/cc13x2_cc26x2_rtc_timer.c @vanti
|
||||
/drivers/timer/cavs_timer.c @dcpleung
|
||||
/drivers/timer/stm32_lptim_timer.c @FRASTM
|
||||
/drivers/timer/leon_gptimer.c @martin-aberg
|
||||
/drivers/timer/rcar_cmt_timer.c @julien-massot
|
||||
/drivers/timer/esp32c3_sys_timer.c @uLipe
|
||||
/drivers/usb/ @jfischer-no
|
||||
/drivers/usb/device/usb_dc_stm32.c @ydamigos @loicpoulain
|
||||
/drivers/video/ @loicpoulain
|
||||
@@ -411,21 +361,19 @@
|
||||
/drivers/i2c/i2c_rv32m1_lpi2c* @henrikbrixandersen
|
||||
/drivers/i2c/*sam0* @Sizurka
|
||||
/drivers/i2c/i2c_dw* @dcpleung
|
||||
/drivers/i2c/*tca954x* @kurddt
|
||||
/drivers/*/*xec* @franciscomunoz @albertofloyd @sjvasanth1
|
||||
/drivers/i2c/*tca9546a* @kurddt
|
||||
/drivers/*/*xec* @franciscomunoz @albertofloyd @scottwcpg
|
||||
/drivers/watchdog/*gecko* @oanerer
|
||||
/drivers/watchdog/*sifive* @katsuster
|
||||
/drivers/watchdog/wdt_handlers.c @dcpleung @nashif
|
||||
/drivers/watchdog/*cc32xx* @pavlohamov
|
||||
/drivers/watchdog/wdt_ite_it8xxx2.c @RuibinChang
|
||||
/drivers/watchdog/Kconfig.it8xxx2 @RuibinChang
|
||||
/drivers/watchdog/wdt_counter.c @nordic-krch
|
||||
/drivers/wifi/ @rlubos @tbursztyka @pfalcon
|
||||
/drivers/wifi/esp_at/ @mniestroj
|
||||
/drivers/wifi/eswifi/ @loicpoulain @nandojve
|
||||
/drivers/wifi/winc1500/ @kludentwo
|
||||
/drivers/virtualization/ @tbursztyka
|
||||
/drivers/xen/ @lorc @firscity
|
||||
/dts/arc/ @abrodkin @ruuddw @iriszzw @evgeniy-paltsev
|
||||
/dts/arm/acsip/ @NorthernDean
|
||||
/dts/arm/atmel/sam4e* @nandojve
|
||||
@@ -437,7 +385,6 @@
|
||||
/dts/arm/atmel/ @galak
|
||||
/dts/arm/broadcom/ @sbranden
|
||||
/dts/arm/cypress/ @nandojve
|
||||
/dts/arm/gigadevice/ @nandojve
|
||||
/dts/arm/infineon/ @parthitce
|
||||
/dts/arm64/ @carlocaione
|
||||
/dts/arm64/armv8-r.dtsi @povergoing
|
||||
@@ -448,11 +395,10 @@
|
||||
/dts/arm/ti/cc13?2* @bwitherspoon
|
||||
/dts/arm/ti/cc26?2* @bwitherspoon
|
||||
/dts/arm/ti/cc3235* @vanti
|
||||
/dts/arm/nordic/ @anangl @carlescufi
|
||||
/dts/arm/nordic/ @ioannisg @carlescufi
|
||||
/dts/arm/nuvoton/ @ssekar15 @MulinChao @WealianLiao @ChiHuaL
|
||||
/dts/arm/nxp/ @mmahadevan108 @dleach02
|
||||
/dts/arm/microchip/ @franciscomunoz @albertofloyd @sjvasanth1
|
||||
/dts/arm/rpi_pico/ @yonsch
|
||||
/dts/arm/microchip/ @franciscomunoz @albertofloyd @scottwcpg
|
||||
/dts/arm/silabs/efm32_pg_1b.dtsi @rdmeneze
|
||||
/dts/arm/silabs/efm32gg11b* @oanerer
|
||||
/dts/arm/silabs/efm32_jg_pg* @chrta
|
||||
@@ -469,9 +415,8 @@
|
||||
/dts/riscv/rv32m1* @dleach02
|
||||
/dts/riscv/riscv32-litex-vexriscv.dtsi @mateusz-holenko @kgugala @pgielda
|
||||
/dts/riscv/starfive/ @rajnesh-kanwal
|
||||
/dts/riscv/andes_v5* @cwshu @kevinwang821020 @jimmyzhe
|
||||
/dts/riscv/andes_v5* @cwshu @Teng-Shih-Wei
|
||||
/dts/arm/armv*m.dtsi @galak @ioannisg
|
||||
/dts/arm/armv7-a.dtsi @ibirnbaum
|
||||
/dts/arm/armv7-r.dtsi @bbolen @stephanosio
|
||||
/dts/arm/xilinx/ @bbolen @stephanosio
|
||||
/dts/arm/renesas/ @julien-massot
|
||||
@@ -483,30 +428,26 @@
|
||||
/dts/sparc/ @martin-aberg
|
||||
/dts/bindings/ @galak
|
||||
/dts/bindings/can/ @alexanderwachter
|
||||
/dts/bindings/i2c/zephyr*i2c-emul*.yaml @sjg20
|
||||
/dts/bindings/i2c/zephyr*i2c-emul.yaml @sjg20
|
||||
/dts/bindings/adc/st*stm32-adc.yaml @cybertale
|
||||
/dts/bindings/modem/*hl7800.yaml @LairdCP/zephyr
|
||||
/dts/bindings/serial/ns16550.yaml @dcpleung @nashif
|
||||
/dts/bindings/wifi/*esp-at.yaml @mniestroj
|
||||
/dts/bindings/*/*gd32* @nandojve
|
||||
/dts/bindings/*/*npcx* @MulinChao @WealianLiao @ChiHuaL
|
||||
/dts/bindings/*/*psoc6* @nandojve
|
||||
/dts/bindings/*/nordic* @anangl
|
||||
/dts/bindings/*/nxp* @mmahadevan108 @dleach02
|
||||
/dts/bindings/*/openisa* @dleach02
|
||||
/dts/bindings/*/raspberrypi*pico* @yonsch
|
||||
/dts/bindings/*/st* @erwango
|
||||
/dts/bindings/sensor/ams* @alexanderwachter
|
||||
/dts/bindings/*/sifive* @mateusz-holenko @kgugala @pgielda
|
||||
/dts/bindings/*/litex* @mateusz-holenko @kgugala @pgielda
|
||||
/dts/bindings/*/vexriscv* @mateusz-holenko @kgugala @pgielda
|
||||
/dts/bindings/*/andes* @cwshu @kevinwang821020 @jimmyzhe
|
||||
/dts/bindings/*/neorv32* @henrikbrixandersen
|
||||
/dts/bindings/*/andes* @cwshu @Teng-Shih-Wei
|
||||
/dts/bindings/pm_cpu_ops/* @carlocaione
|
||||
/dts/bindings/ethernet/*gem.yaml @ibirnbaum
|
||||
/dts/posix/ @aescolar @vanwinkeljan @daor-oti
|
||||
/dts/bindings/sensor/*bme680* @BoschSensortec
|
||||
/dts/bindings/sensor/*ina23* @bbilas
|
||||
/dts/bindings/sensor/st* @avisconti
|
||||
/dts/common/ @galak
|
||||
/include/ @nashif @carlescufi @galak @MaureenHelm
|
||||
@@ -516,8 +457,8 @@
|
||||
/include/drivers/counter.h @nordic-krch
|
||||
/include/drivers/dac.h @martinjaeger
|
||||
/include/drivers/display.h @vanwinkeljan
|
||||
/include/drivers/espi.h @albertofloyd @franciscomunoz @sjvasanth1
|
||||
/include/drivers/bluetooth/ @alwa-nordic @jhedberg @Vudentz
|
||||
/include/drivers/espi.h @albertofloyd @franciscomunoz @scottwcpg
|
||||
/include/drivers/bluetooth/ @joerchan @jhedberg @Vudentz
|
||||
/include/drivers/flash.h @nashif @carlescufi @galak @MaureenHelm @nvlsianpu
|
||||
/include/drivers/i2c_emul.h @sjg20
|
||||
/include/drivers/led/ht16k33.h @henrikbrixandersen
|
||||
@@ -531,7 +472,7 @@
|
||||
/include/drivers/sensor.h @MaureenHelm
|
||||
/include/drivers/spi.h @tbursztyka
|
||||
/include/drivers/lora.h @Mani-Sadhasivam
|
||||
/include/drivers/peci.h @albertofloyd @franciscomunoz @sjvasanth1
|
||||
/include/drivers/peci.h @albertofloyd @franciscomunoz @scottwcpg
|
||||
/include/drivers/pm_cpu_ops.h @carlocaione
|
||||
/include/drivers/pm_cpu_ops/ @carlocaione
|
||||
/include/app_memory/ @dcpleung
|
||||
@@ -543,7 +484,6 @@
|
||||
/include/arch/arm64/ @carlocaione
|
||||
/include/arch/arm64/cortex_r/ @povergoing
|
||||
/include/arch/arm/aarch32/irq.h @carlocaione
|
||||
/include/arch/mips/ @frantony
|
||||
/include/arch/nios2/ @nashif
|
||||
/include/arch/nios2/arch.h @nashif
|
||||
/include/arch/posix/ @aescolar @daor-oti
|
||||
@@ -553,8 +493,8 @@
|
||||
/include/arch/xtensa/ @andyross @dcpleung
|
||||
/include/arch/sparc/ @martin-aberg
|
||||
/include/sys/atomic.h @andyross
|
||||
/include/bluetooth/ @alwa-nordic @jhedberg @Vudentz
|
||||
/include/bluetooth/audio/ @alwa-nordic @jhedberg @Vudentz @Thalley @asbjornsabo
|
||||
/include/bluetooth/ @joerchan @jhedberg @Vudentz
|
||||
/include/bluetooth/audio/ @joerchan @jhedberg @Vudentz @Thalley @asbjornsabo
|
||||
/include/cache.h @carlocaione @andyross
|
||||
/include/canbus/ @alexanderwachter
|
||||
/include/tracing/ @nashif
|
||||
@@ -587,7 +527,6 @@
|
||||
/include/net/coap*.h @rlubos
|
||||
/include/net/lwm2m*.h @rlubos
|
||||
/include/net/mqtt.h @rlubos
|
||||
/include/net/net_pkt_filter.h @npitre
|
||||
/include/posix/ @pfalcon
|
||||
/include/pm/pm.h @nashif @ceolin
|
||||
/include/drivers/ptp_clock.h @tbursztyka
|
||||
@@ -601,30 +540,25 @@
|
||||
/include/toolchain/ @dcpleung @nashif @andyross
|
||||
/include/zephyr.h @dcpleung @nashif @andyross
|
||||
/kernel/ @dcpleung @nashif @andyross
|
||||
/lib/smf/ @sambhurst
|
||||
/lib/util/ @carlescufi @jakub-uC
|
||||
/lib/util/fnmatch/ @carlescufi @jakub-uC
|
||||
/lib/util/getopt/ @jakub-uC
|
||||
/lib/gui/ @vanwinkeljan
|
||||
/lib/open-amp/ @arnopo
|
||||
/lib/os/ @dcpleung @nashif @andyross
|
||||
/lib/os/cbprintf_packaged.c @npitre
|
||||
/lib/posix/ @pfalcon
|
||||
/lib/posix/getopt/ @jakub-uC
|
||||
/subsys/portability/ @nashif
|
||||
/lib/libc/ @nashif
|
||||
/lib/libc/arcmwdt/ @abrodkin @ruuddw @evgeniy-paltsev
|
||||
/misc/ @tejlmand
|
||||
/modules/ @nashif
|
||||
/modules/canopennode/ @henrikbrixandersen
|
||||
/modules/mbedtls/ @ceolin @d3zd3z
|
||||
/modules/hal_gigadevice/ @nandojve
|
||||
/modules/trusted-firmware-m/ @microbuilder
|
||||
/modules/trusted-firmware-m/ @ioannisg @microbuilder
|
||||
/kernel/device.c @andyross @nashif
|
||||
/kernel/idle.c @andyross @nashif
|
||||
/samples/ @nashif
|
||||
/samples/basic/minimal/ @carlescufi
|
||||
/samples/basic/servo_motor/boards/*microbit* @jhe
|
||||
/samples/bluetooth/ @jhedberg @Vudentz @alwa-nordic
|
||||
/samples/bluetooth/ @jhedberg @Vudentz @joerchan
|
||||
/samples/boards/intel_s1000_crb/ @sathishkuttan @dcpleung @nashif
|
||||
/samples/subsys/display/ @vanwinkeljan
|
||||
/samples/compression/ @Navin-Sankar
|
||||
@@ -635,7 +569,6 @@
|
||||
/samples/drivers/ht16k33/ @henrikbrixandersen
|
||||
/samples/drivers/lora/ @Mani-Sadhasivam
|
||||
/samples/subsys/lorawan/ @Mani-Sadhasivam
|
||||
/samples/modules/canopennode/ @henrikbrixandersen
|
||||
/samples/net/ @rlubos @tbursztyka @pfalcon
|
||||
/samples/net/cloud/tagoio_http_post/ @nandojve
|
||||
/samples/net/dns_resolve/ @rlubos @tbursztyka @pfalcon
|
||||
@@ -653,7 +586,7 @@
|
||||
/samples/subsys/mgmt/osdp/ @sidcha
|
||||
/samples/subsys/usb/ @jfischer-no
|
||||
/samples/subsys/pm/ @nashif @ceolin
|
||||
/samples/tfm_integration/ @microbuilder
|
||||
/samples/tfm_integration/ @ioannisg @microbuilder
|
||||
/samples/userspace/ @dcpleung @nashif
|
||||
/scripts/release/bug_bash.py @cfriedt
|
||||
/scripts/coccicheck @himanshujha199640 @JuliaLawall
|
||||
@@ -665,7 +598,6 @@
|
||||
/scripts/pylib/twister/expr_parser.py @nashif
|
||||
/scripts/schemas/twister/ @nashif
|
||||
/scripts/gen_app_partitions.py @dcpleung @nashif
|
||||
scripts/gen_image_info.py @tejlmand
|
||||
/scripts/get_maintainer.py @nashif
|
||||
/scripts/dts/ @mbolivar-nordic @galak
|
||||
/scripts/release/ @nashif
|
||||
@@ -685,10 +617,7 @@ scripts/gen_image_info.py @tejlmand
|
||||
/scripts/pylib/twister/ @nashif
|
||||
/scripts/twister @nashif
|
||||
/scripts/series-push-hook.sh @erwango
|
||||
/scripts/utils/pinctrl_nrf_migrate.py @gmarull
|
||||
/scripts/west_commands/ @mbolivar-nordic
|
||||
/scripts/west_commands/runners/gd32isp.py @mbolivar-nordic @nandojve
|
||||
/scripts/west_commands/tests/test_gd32isp.py @mbolivar-nordic @nandojve
|
||||
/scripts/west-commands.yml @mbolivar-nordic
|
||||
/scripts/zephyr_module.py @tejlmand
|
||||
/scripts/uf2conv.py @petejohanson
|
||||
@@ -696,10 +625,10 @@ scripts/gen_image_info.py @tejlmand
|
||||
/scripts/valgrind.supp @aescolar @daor-oti
|
||||
/share/zephyr-package/ @tejlmand
|
||||
/share/zephyrunittest-package/ @tejlmand
|
||||
/subsys/bluetooth/ @alwa-nordic @jhedberg @Vudentz
|
||||
/subsys/bluetooth/audio/ @alwa-nordic @jhedberg @Vudentz @Thalley @asbjornsabo
|
||||
/subsys/bluetooth/ @joerchan @jhedberg @Vudentz
|
||||
/subsys/bluetooth/audio/ @joerchan @jhedberg @Vudentz @Thalley @asbjornsabo
|
||||
/subsys/bluetooth/controller/ @carlescufi @cvinayak @thoh-ot @kruithofa
|
||||
/subsys/bluetooth/mesh/ @jhedberg @trond-snekvik @alwa-nordic @Vudentz @LingaoM
|
||||
/subsys/bluetooth/mesh/ @jhedberg @trond-snekvik @joerchan @Vudentz
|
||||
/subsys/canbus/ @alexanderwachter
|
||||
/subsys/cpp/ @vanwinkeljan
|
||||
/subsys/debug/ @nashif
|
||||
@@ -717,13 +646,12 @@ scripts/gen_image_info.py @tejlmand
|
||||
/subsys/fs/fcb/ @nvlsianpu
|
||||
/subsys/fs/fuse_fs_access.c @vanwinkeljan
|
||||
/subsys/fs/nvs/ @Laczen
|
||||
/subsys/ipc/ @carlocaione
|
||||
/subsys/ipc/ @ioannisg
|
||||
/subsys/logging/ @nordic-krch
|
||||
/subsys/logging/log_backend_net.c @nordic-krch @rlubos
|
||||
/subsys/lorawan/ @Mani-Sadhasivam
|
||||
/subsys/mgmt/ec_host_cmd/ @jettr
|
||||
/subsys/mgmt/mcumgr/ @carlescufi @nvlsianpu
|
||||
/subsys/mgmt/mcumgr/lib/ @de-nordic
|
||||
/subsys/mgmt/hawkbit/ @Navin-Sankar
|
||||
/subsys/mgmt/mcumgr/smp_udp.c @aunsbjerg
|
||||
/subsys/mgmt/updatehub/ @nandojve @otavio
|
||||
@@ -742,7 +670,6 @@ scripts/gen_image_info.py @tejlmand
|
||||
/subsys/net/lib/tls_credentials/ @rlubos
|
||||
/subsys/net/l2/ @rlubos @tbursztyka
|
||||
/subsys/net/l2/canbus/ @alexanderwachter
|
||||
/subsys/net/pkt_filter/ @npitre
|
||||
/subsys/net/*/openthread/ @rlubos
|
||||
/subsys/pm/ @nashif @ceolin
|
||||
/subsys/random/ @dleach02
|
||||
@@ -752,7 +679,6 @@ scripts/gen_image_info.py @tejlmand
|
||||
/subsys/storage/ @nvlsianpu
|
||||
/subsys/task_wdt/ @martinjaeger
|
||||
/subsys/testsuite/ @nashif
|
||||
/subsys/testsuite/ztest/*/ztress* @nordic-krch
|
||||
/subsys/timing/ @nashif @dcpleung
|
||||
/subsys/usb/ @jfischer-no
|
||||
/subsys/usb/class/dfu/usb_dfu.c @nvlsianpu
|
||||
@@ -761,14 +687,12 @@ scripts/gen_image_info.py @tejlmand
|
||||
/tests/benchmarks/cmsis_dsp/ @stephanosio
|
||||
/tests/boards/native_posix/ @aescolar @daor-oti
|
||||
/tests/boards/intel_s1000_crb/ @dcpleung @sathishkuttan
|
||||
/tests/bluetooth/ @alwa-nordic @jhedberg @Vudentz
|
||||
/tests/bluetooth/controller/ @cvinayak @thoh-ot @kruithofa @erbr-ot @sjanc @ppryga
|
||||
/tests/bluetooth/bsim_bt/ @alwa-nordic @jhedberg @Vudentz @aescolar @wopu-ot
|
||||
/tests/bluetooth/bsim_bt/bsim_test_audio/ @alwa-nordic @jhedberg @Vudentz @aescolar @wopu-ot @Thalley @asbjornsabo
|
||||
/tests/bluetooth/tester/ @alwa-nordic @jhedberg @Vudentz @sjanc
|
||||
/tests/bluetooth/ @joerchan @jhedberg @Vudentz
|
||||
/tests/bluetooth/bsim_bt/ @joerchan @jhedberg @Vudentz @aescolar @wopu-ot
|
||||
/tests/bluetooth/bsim_bt/bsim_test_audio/ @joerchan @jhedberg @Vudentz @aescolar @wopu-ot @Thalley @asbjornsabo
|
||||
/tests/posix/ @pfalcon
|
||||
/tests/crypto/ @ceolin
|
||||
/tests/crypto/mbedtls/ @nashif @ceolin @d3zd3z
|
||||
/tests/crypto/mbedtls/ @nashif @ceolin
|
||||
/tests/drivers/can/ @alexanderwachter
|
||||
/tests/drivers/counter/ @nordic-krch
|
||||
/tests/drivers/eeprom/ @henrikbrixandersen @sjg20
|
||||
@@ -786,7 +710,6 @@ scripts/gen_image_info.py @tejlmand
|
||||
/tests/net/lib/http_header_fields/ @rlubos @tbursztyka
|
||||
/tests/net/lib/mqtt_packet/ @rlubos
|
||||
/tests/net/lib/coap/ @rlubos
|
||||
/tests/net/npf/ @npitre
|
||||
/tests/net/socket/socketpair/ @cfriedt
|
||||
/tests/net/socket/ @rlubos @tbursztyka @pfalcon
|
||||
/tests/subsys/debug/coredump/ @dcpleung
|
||||
|
||||
108
Kconfig.zephyr
108
Kconfig.zephyr
@@ -272,7 +272,7 @@ config NATIVE_APPLICATION
|
||||
Build as a native application that can run on the host and using
|
||||
resources and libraries provided by the host.
|
||||
|
||||
choice COMPILER_OPTIMIZATIONS
|
||||
choice
|
||||
prompt "Optimization level"
|
||||
default NO_OPTIMIZATIONS if COVERAGE
|
||||
default DEBUG_OPTIMIZATIONS if DEBUG
|
||||
@@ -309,7 +309,7 @@ config NO_OPTIMIZATIONS
|
||||
endchoice
|
||||
|
||||
config COMPILER_COLOR_DIAGNOSTICS
|
||||
bool "Enable colored diagnostics"
|
||||
bool "Enable colored diganostics"
|
||||
default y
|
||||
help
|
||||
Compiler diagnostic messages are colorized.
|
||||
@@ -462,7 +462,6 @@ config BUILD_OUTPUT_UF2_FAMILY_ID
|
||||
default "0xada52840" if SOC_NRF52840_QIAA
|
||||
default "0x4fb2d5bd" if SOC_SERIES_IMX_RT
|
||||
default "0x2abc77ec" if SOC_SERIES_LPC55XXX
|
||||
default "0xe48bff56" if SOC_SERIES_RP2XXX
|
||||
default "0x68ed2b88" if SOC_SERIES_SAMD21
|
||||
default "0x55114460" if SOC_SERIES_SAMD51
|
||||
default "0x647824b6" if SOC_SERIES_STM32F0X
|
||||
@@ -487,14 +486,6 @@ config BUILD_OUTPUT_UF2_FAMILY_ID
|
||||
name string. If the SoC in use is known by UF2, the Family ID will
|
||||
be pre-filled with the known value.
|
||||
|
||||
config BUILD_OUTPUT_UF2_USE_FLASH_BASE
|
||||
bool
|
||||
default n
|
||||
|
||||
config BUILD_OUTPUT_UF2_USE_FLASH_OFFSET
|
||||
bool
|
||||
default n
|
||||
|
||||
endif # BUILD_OUTPUT_UF2
|
||||
|
||||
config BUILD_OUTPUT_STRIPPED
|
||||
@@ -503,41 +494,6 @@ config BUILD_OUTPUT_STRIPPED
|
||||
Build a stripped binary zephyr/zephyr.strip in the build directory.
|
||||
The name of this file can be customized with CONFIG_KERNEL_BIN_NAME.
|
||||
|
||||
config BUILD_OUTPUT_ADJUST_LMA
|
||||
string
|
||||
help
|
||||
This will adjust the LMA address in the final ELF and hex files with
|
||||
the value provided.
|
||||
This will not affect the internal address symbols inside the image but
|
||||
can be useful when adjusting the LMA address for flash tools or multi
|
||||
stage loaders where a pre-loader may copy image to a second location
|
||||
before booting a second core.
|
||||
The value will be evaluated as a math expression, this means that
|
||||
following are valid expression
|
||||
- 1024
|
||||
- 0x1000
|
||||
- -0x1000
|
||||
- 0x20000000 - 0x10000000
|
||||
Note: negative numbers are valid.
|
||||
To adjust according to a chosen flash partition one can specify a
|
||||
default as:
|
||||
DT_CHOSEN_IMAGE_<name> := <name>,<name>-partition
|
||||
DT_CHOSEN_Z_FLASH := zephyr,flash
|
||||
config BUILD_OUTPUT_ADJUST_LMA
|
||||
default "$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_IMAGE_M4))-\
|
||||
$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH))"
|
||||
|
||||
config BUILD_OUTPUT_INFO_HEADER
|
||||
bool "Create a image information header"
|
||||
help
|
||||
Create an image information header which will contain image
|
||||
information from the Zephyr binary.
|
||||
Example of information contained in the header file:
|
||||
- Number of segments in the image
|
||||
- LMA address of each segment
|
||||
- VMA address of each segment
|
||||
- Size of each segment
|
||||
|
||||
config APPLICATION_DEFINED_SYSCALL
|
||||
bool "Scan application folder for any syscall definition"
|
||||
help
|
||||
@@ -550,56 +506,7 @@ config MAKEFILE_EXPORTS
|
||||
Generates a file with build information that can be read by
|
||||
third party Makefile-based build systems.
|
||||
|
||||
config BUILD_OUTPUT_META
|
||||
bool "Create a build meta file"
|
||||
help
|
||||
Create a build meta file in the build directory containing lists of:
|
||||
- Zephyr: path and revision (if git repo)
|
||||
- Zephyr modules: name, path, and revision (if git repo)
|
||||
- West:
|
||||
- manifest: path and revision
|
||||
- projects: path and revision
|
||||
- Workspace:
|
||||
- dirty: one or more repositories are marked dirty
|
||||
- extra: extra Zephyr modules are manually included in the build
|
||||
- off: the SHA of one or more west projects are not what the manifest
|
||||
defined when `west update` was run the last time (`manifest-rev`).
|
||||
The off state is only present if a west workspace is found.
|
||||
File extension is .meta
|
||||
|
||||
config BUILD_OUTPUT_META_STATE_PROPAGATE
|
||||
bool "Propagate module and project state"
|
||||
depends on BUILD_OUTPUT_META
|
||||
help
|
||||
Propagate to state of each module to the Zephyr revision field.
|
||||
If west is used the state of each west project is also propagated to
|
||||
the Zephyr revision field.
|
||||
West manifest repo revision field will also
|
||||
be marked with the same state as the Zephyr revision.
|
||||
The final revision will become: <SHA>-<state1>-<state2>-<state3>...
|
||||
If no states are appended to the SHA it means the build is of a clean
|
||||
tree.
|
||||
- dirty: one or more repositories are marked dirty
|
||||
- extra: extra Zephyr modules are manually included in the build
|
||||
- off: the SHA of one or more west projects are not what the manifest
|
||||
defined when `west update` was run the last time (`manifest-rev`).
|
||||
The off state is only present if a west workspace is found.
|
||||
|
||||
endmenu
|
||||
|
||||
config EXPERIMENTAL
|
||||
bool
|
||||
help
|
||||
Symbol that must be selected by a feature if it is considered to be
|
||||
at an experimental implementation stage.
|
||||
|
||||
config WARN_EXPERIMENTAL
|
||||
bool
|
||||
prompt "Warn on experimental usage"
|
||||
help
|
||||
Print a warning when the Kconfig tree is parsed if any experimental
|
||||
features are enabled.
|
||||
|
||||
endmenu
|
||||
|
||||
|
||||
@@ -658,7 +565,6 @@ if BOOTLOADER_MCUBOOT
|
||||
config MCUBOOT_SIGNATURE_KEY_FILE
|
||||
string "Path to the mcuboot signing key file"
|
||||
default ""
|
||||
depends on !MCUBOOT_GENERATE_UNSIGNED_IMAGE
|
||||
help
|
||||
The file contains a key pair whose public half is verified
|
||||
by your target's MCUboot image. The file is in PEM format.
|
||||
@@ -717,13 +623,6 @@ config MCUBOOT_EXTRA_IMGTOOL_ARGS
|
||||
you can use this option to pass extra options to imgtool.
|
||||
For example, you could set this to "--version 1.2".
|
||||
|
||||
config MCUBOOT_GENERATE_UNSIGNED_IMAGE
|
||||
bool "Generate unsigned binary image bootable with MCUboot"
|
||||
help
|
||||
Enabling this configuration allows automatic unsigned binary image
|
||||
generation when MCUboot signing key is not provided,
|
||||
i.e., MCUBOOT_SIGNATURE_KEY_FILE is left empty.
|
||||
|
||||
config MCUBOOT_GENERATE_CONFIRMED_IMAGE
|
||||
bool "Also generate a padded, confirmed image"
|
||||
help
|
||||
@@ -739,8 +638,7 @@ endif # BOOTLOADER_MCUBOOT
|
||||
|
||||
config BOOTLOADER_ESP_IDF
|
||||
bool "ESP-IDF bootloader support"
|
||||
depends on (SOC_ESP32 || SOC_ESP32S2 || SOC_ESP32C3) && !BOOTLOADER_MCUBOOT
|
||||
default y
|
||||
depends on SOC_ESP32 || SOC_ESP32S2
|
||||
help
|
||||
This option will trigger the compilation of the ESP-IDF bootloader
|
||||
inside the build folder.
|
||||
|
||||
212
MAINTAINERS.yml
212
MAINTAINERS.yml
@@ -129,7 +129,7 @@ ARC arch:
|
||||
ARM arch:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- microbuilder
|
||||
- ioannisg
|
||||
collaborators:
|
||||
- carlocaione
|
||||
- galak
|
||||
@@ -151,6 +151,7 @@ ARM64 arch:
|
||||
- carlocaione
|
||||
collaborators:
|
||||
- npitre
|
||||
- ioannisg
|
||||
- povergoing
|
||||
files:
|
||||
- arch/arm64/
|
||||
@@ -167,7 +168,7 @@ Bluetooth:
|
||||
maintainers:
|
||||
- jhedberg
|
||||
collaborators:
|
||||
- alwa-nordic
|
||||
- joerchan
|
||||
- Vudentz
|
||||
- Thalley
|
||||
- asbjornsabo
|
||||
@@ -185,11 +186,6 @@ Bluetooth:
|
||||
- subsys/bluetooth/shell/
|
||||
- subsys/bluetooth/audio/
|
||||
- tests/bluetooth/
|
||||
files-exclude:
|
||||
- include/bluetooth/mesh/
|
||||
- subsys/bluetooth/controller/
|
||||
- subsys/bluetooth/mesh/
|
||||
- samples/bluetooth/mesh/
|
||||
labels:
|
||||
- "area: Bluetooth"
|
||||
|
||||
@@ -200,15 +196,10 @@ Bluetooth controller:
|
||||
collaborators:
|
||||
- carlescufi
|
||||
- thoh-ot
|
||||
- kruithofa
|
||||
- ppryga
|
||||
- mtpr-ot
|
||||
- wopu-ot
|
||||
files:
|
||||
- subsys/bluetooth/controller/
|
||||
labels:
|
||||
- "area: Bluetooth Controller"
|
||||
- "area: Bluetooth"
|
||||
|
||||
Bluetooth Mesh:
|
||||
status: maintained
|
||||
@@ -216,25 +207,19 @@ Bluetooth Mesh:
|
||||
- trond-snekvik
|
||||
collaborators:
|
||||
- jhedberg
|
||||
- LingaoM
|
||||
- alxelax
|
||||
- PavelVPV
|
||||
files:
|
||||
- subsys/bluetooth/mesh/
|
||||
- include/bluetooth/mesh/
|
||||
- tests/bluetooth/mesh*/
|
||||
labels:
|
||||
- "area: Bluetooth Mesh"
|
||||
- "area: Bluetooth"
|
||||
|
||||
Build system:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- tejlmand
|
||||
collaborators:
|
||||
- jeremybettis
|
||||
- nashif
|
||||
- SebastianBoe
|
||||
files:
|
||||
- cmake/
|
||||
- CMakeLists.txt
|
||||
@@ -291,6 +276,7 @@ CMSIS-DSP integration:
|
||||
- stephanosio
|
||||
collaborators:
|
||||
- galak
|
||||
- ioannisg
|
||||
files:
|
||||
- modules/Kconfig.cmsis_dsp
|
||||
- tests/benchmarks/cmsis_dsp/
|
||||
@@ -363,9 +349,9 @@ DFU:
|
||||
Devicetree:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- mbolivar-nordic
|
||||
collaborators:
|
||||
- galak
|
||||
collaborators:
|
||||
- mbolivar-nordic
|
||||
files:
|
||||
- scripts/dts/
|
||||
- dts/bindings/
|
||||
@@ -395,7 +381,6 @@ Display drivers:
|
||||
- vanwinkeljan
|
||||
collaborators:
|
||||
- jfischer-no
|
||||
- gmarull
|
||||
files:
|
||||
- drivers/display/
|
||||
- dts/bindings/display/
|
||||
@@ -416,7 +401,6 @@ Documentation:
|
||||
- nashif
|
||||
- utzig
|
||||
- mbolivar-nordic
|
||||
- gmarull
|
||||
files:
|
||||
- doc/
|
||||
- doc/_static/
|
||||
@@ -449,8 +433,6 @@ Documentation:
|
||||
- lyakh
|
||||
- lgirdwood
|
||||
- mengxianglinx
|
||||
- marc-hb
|
||||
- kv2019i
|
||||
files:
|
||||
- drivers/audio/
|
||||
- include/audio/
|
||||
@@ -479,9 +461,7 @@ Documentation:
|
||||
- samples/drivers/can/
|
||||
- tests/drivers/can/
|
||||
- samples/subsys/canbus/
|
||||
- doc/reference/canbus/
|
||||
- modules/canopennode/
|
||||
- samples/modules/canopennode/
|
||||
- doc/reference/networking/can_api.rst
|
||||
labels:
|
||||
- "area: CAN"
|
||||
|
||||
@@ -543,9 +523,7 @@ Documentation:
|
||||
- "area: DAC"
|
||||
|
||||
"Drivers: DMA":
|
||||
status: maintained
|
||||
maintainers:
|
||||
- teburd
|
||||
status: orphaned
|
||||
files:
|
||||
- drivers/dma/
|
||||
- tests/drivers/dma/
|
||||
@@ -582,7 +560,7 @@ Documentation:
|
||||
- albertofloyd
|
||||
collaborators:
|
||||
- VenkatKotakonda
|
||||
- jvasanth1
|
||||
- scottwcpg
|
||||
files:
|
||||
- drivers/espi/
|
||||
- include/drivers/espi.h
|
||||
@@ -641,9 +619,7 @@ Documentation:
|
||||
- "area: HWINFO"
|
||||
|
||||
"Drivers: I2C":
|
||||
status: maintained
|
||||
maintainers:
|
||||
- teburd
|
||||
status: orphaned
|
||||
files:
|
||||
- drivers/i2c/
|
||||
- dts/bindings/i2c/
|
||||
@@ -702,7 +678,6 @@ Documentation:
|
||||
- albertofloyd
|
||||
collaborators:
|
||||
- VenkatKotakonda
|
||||
- gmarull
|
||||
files:
|
||||
- drivers/kscan/
|
||||
- include/drivers/kscan.h
|
||||
@@ -799,8 +774,6 @@ Documentation:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- mnkp
|
||||
collaborators:
|
||||
- gmarull
|
||||
files:
|
||||
- doc/reference/peripherals/pinmux.rst
|
||||
- drivers/pinmux/
|
||||
@@ -836,7 +809,6 @@ Documentation:
|
||||
- anangl
|
||||
collaborators:
|
||||
- henrikbrixandersen
|
||||
- gmarull
|
||||
files:
|
||||
- drivers/pwm/
|
||||
- dts/bindings/pwm/
|
||||
@@ -854,7 +826,6 @@ Documentation:
|
||||
- include/drivers/uart.h
|
||||
- include/drivers/uart/
|
||||
- dts/bindings/serial/
|
||||
- samples/drivers/uart/
|
||||
- tests/drivers/uart/
|
||||
labels:
|
||||
- "area: UART"
|
||||
@@ -865,8 +836,6 @@ Documentation:
|
||||
- MaureenHelm
|
||||
collaborators:
|
||||
- avisconti
|
||||
- gmarull
|
||||
- teburd
|
||||
files:
|
||||
- drivers/sensor/
|
||||
- include/drivers/sensor.h
|
||||
@@ -914,7 +883,6 @@ Documentation:
|
||||
status: orphaned
|
||||
collaborators:
|
||||
- katsuster
|
||||
- martinjaeger
|
||||
files:
|
||||
- doc/reference/peripherals/watchdog.rst
|
||||
- drivers/watchdog/
|
||||
@@ -966,20 +934,6 @@ Filesystems:
|
||||
labels:
|
||||
- "area: File System"
|
||||
|
||||
IPC:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- carlocaione
|
||||
- arnopo
|
||||
files:
|
||||
- include/ipc/
|
||||
- samples/subsys/ipc/
|
||||
- subsys/ipc/
|
||||
description: >-
|
||||
Inter-Processor Communication
|
||||
labels:
|
||||
- "area: IPC"
|
||||
|
||||
JSON Web Token:
|
||||
status: orphaned
|
||||
collaborators:
|
||||
@@ -1067,6 +1021,7 @@ MAINTAINERS file:
|
||||
maintainers:
|
||||
- MaureenHelm
|
||||
collaborators:
|
||||
- ioannisg
|
||||
- nashif
|
||||
files:
|
||||
- MAINTAINERS.yml
|
||||
@@ -1075,25 +1030,10 @@ MAINTAINERS file:
|
||||
description: >-
|
||||
Zephyr Maintainers File
|
||||
|
||||
Mbed TLS:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- d3zd3z
|
||||
- ceolin
|
||||
files:
|
||||
- modules/mbedtls/
|
||||
- tests/crypto/mbedtls/
|
||||
labels:
|
||||
- "area: Crypto / RNG"
|
||||
description: >-
|
||||
Mbed TLS module implementing the PSA Crypto API and TLS.
|
||||
|
||||
MCU Manager:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- de-nordic
|
||||
collaborators:
|
||||
- lairdjm
|
||||
files:
|
||||
- subsys/mgmt/mcumgr/
|
||||
- include/mgmt/mcumgr/
|
||||
@@ -1112,29 +1052,6 @@ OSDP:
|
||||
labels:
|
||||
- "area: OSDP"
|
||||
|
||||
hawkBit:
|
||||
status: orphaned
|
||||
collaborators:
|
||||
- ycsin
|
||||
files:
|
||||
- subsys/mgmt/hawkbit/
|
||||
- include/mgmt/hawkbit.h
|
||||
- samples/subsys/mgmt/hawkbit/
|
||||
labels:
|
||||
- "area: hawkBit"
|
||||
|
||||
"mgmt: updatehub":
|
||||
status: maintained
|
||||
maintainers:
|
||||
- nandojve
|
||||
files:
|
||||
- subsys/mgmt/updatehub/
|
||||
- samples/subsys/mgmt/updatehub/
|
||||
labels:
|
||||
- "area: updatehub"
|
||||
description: >-
|
||||
UpdateHub embedded Firmware Over-The-Air (FOTA) upgrade agent
|
||||
|
||||
Native POSIX and POSIX arch:
|
||||
status: maintained
|
||||
maintainers:
|
||||
@@ -1208,8 +1125,6 @@ Networking:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- rlubos
|
||||
collaborators:
|
||||
- pdgendt
|
||||
files:
|
||||
- subsys/net/lib/coap/
|
||||
- samples/net/sockets/coap_*/
|
||||
@@ -1221,8 +1136,6 @@ Networking:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- rlubos
|
||||
collaborators:
|
||||
- SeppoTakalo
|
||||
files:
|
||||
- samples/net/lwm2m_client/
|
||||
- subsys/net/lib/lwm2m/
|
||||
@@ -1240,20 +1153,6 @@ Networking:
|
||||
labels:
|
||||
- "area: Networking"
|
||||
|
||||
"Networking: OpenThread":
|
||||
status: maintained
|
||||
maintainers:
|
||||
- rlubos
|
||||
collaborators:
|
||||
- pdgendt
|
||||
files:
|
||||
- subsys/net/l2/openthread/
|
||||
- subsys/net/lib/openthread/
|
||||
- samples/net/openthread/
|
||||
labels:
|
||||
- "area: Networking"
|
||||
- "area: OpenThread"
|
||||
|
||||
NIOS-2 arch:
|
||||
status: maintained
|
||||
maintainers:
|
||||
@@ -1293,8 +1192,6 @@ Power management:
|
||||
collaborators:
|
||||
- nashif
|
||||
- mengxianglinx
|
||||
- gmarull
|
||||
- teburd
|
||||
files:
|
||||
- include/pm/pm.h
|
||||
- samples/subsys/pm/
|
||||
@@ -1304,13 +1201,8 @@ Power management:
|
||||
- "area: Power Management"
|
||||
|
||||
RISCV arch:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- kgugala
|
||||
- pgielda
|
||||
- tgorochowik
|
||||
status: orphaned
|
||||
collaborators:
|
||||
- fkokosinski
|
||||
- mgielda
|
||||
- katsuster
|
||||
- henrikbrixandersen
|
||||
@@ -1333,7 +1225,6 @@ Twister:
|
||||
- PerMac
|
||||
- enjiamai
|
||||
- hakehuang
|
||||
- gopiotr
|
||||
files:
|
||||
- scripts/twister
|
||||
- scripts/pylib/twister/
|
||||
@@ -1389,49 +1280,10 @@ SPARC arch:
|
||||
labels:
|
||||
- "area: SPARC"
|
||||
|
||||
State machine framework:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- sambhurst
|
||||
collaborators:
|
||||
- keith-zephyr
|
||||
files:
|
||||
- doc/guides/smf/
|
||||
- include/smf.h
|
||||
- lib/smf/
|
||||
- tests/lib/smf/
|
||||
labels:
|
||||
- "area: State Machine Framework"
|
||||
|
||||
GD32 Platforms:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- nandojve
|
||||
- gmarull
|
||||
collaborators:
|
||||
- soburi
|
||||
files:
|
||||
- boards/arm/gd32*/
|
||||
- boards/riscv/gd32*/
|
||||
- boards/riscv/longan_nano/
|
||||
- drivers/*/*gd32*/
|
||||
- drivers/*/*gd32*
|
||||
- dts/*/gigadevice/
|
||||
- dts/bindings/*/*gd32*
|
||||
- modules/hal_gigadevice/
|
||||
- soc/arm/gigadevice/
|
||||
- soc/riscv/riscv-privilege/gd32vf103/
|
||||
- scripts/west_commands/*/*gd32*
|
||||
labels:
|
||||
- "platform: GD32"
|
||||
description: >-
|
||||
GigaDevice GD32 SOCs, dts files and related drivers. Starter and eval
|
||||
boards.
|
||||
|
||||
Synopsys Platforms:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- ruuddw
|
||||
- ruudw
|
||||
collaborators:
|
||||
- abrodkin
|
||||
- evgeniy-paltsev
|
||||
@@ -1499,7 +1351,6 @@ Intel Platforms (X86):
|
||||
collaborators:
|
||||
- jhedberg
|
||||
- aasthagr
|
||||
- laurenmurphyx64
|
||||
files:
|
||||
- boards/x86/
|
||||
- soc/x86/
|
||||
@@ -1513,11 +1364,6 @@ Intel Platforms (Xtensa):
|
||||
collaborators:
|
||||
- andyross
|
||||
- dcpleung
|
||||
- lyakh
|
||||
- lgirdwood
|
||||
- mengxianglinx
|
||||
- marc-hb
|
||||
- kv2019i
|
||||
files:
|
||||
- boards/xtensa/intel_*/
|
||||
- soc/xtensa/intel_*/
|
||||
@@ -1531,7 +1377,6 @@ NXP Platforms:
|
||||
- dleach02
|
||||
collaborators:
|
||||
- mmahadevan108
|
||||
- danieldegrasse
|
||||
files:
|
||||
- boards/arm/mimx*/
|
||||
- boards/arm/frdm_k*/
|
||||
@@ -1549,7 +1394,7 @@ NXP Platforms:
|
||||
Microchip Platforms:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- jvasanth1
|
||||
- scottwcpg
|
||||
collaborators:
|
||||
- VenkatKotakonda
|
||||
- albertofloyd
|
||||
@@ -1564,7 +1409,7 @@ Microchip Platforms:
|
||||
nRF Platforms:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- anangl
|
||||
- ioannisg
|
||||
files:
|
||||
- boards/arm/*nrf*/
|
||||
- drivers/*/*nrfx*.c
|
||||
@@ -1581,7 +1426,6 @@ STM32 Platforms:
|
||||
collaborators:
|
||||
- ABOSTM
|
||||
- FRASTM
|
||||
- gmarull
|
||||
files:
|
||||
- boards/arm/nucleo_*/
|
||||
- boards/arm/stm32*_disco/
|
||||
@@ -1605,7 +1449,7 @@ Espressif Platforms:
|
||||
maintainers:
|
||||
- sylvioalves
|
||||
- glaubermaroto
|
||||
- uLipe
|
||||
- ulipe
|
||||
files:
|
||||
- drivers/*/*esp32*.c
|
||||
- boards/xtensa/esp32*/
|
||||
@@ -1636,8 +1480,7 @@ ITE Platforms:
|
||||
- sjg20
|
||||
files:
|
||||
- boards/riscv/it8xxx2_evb/
|
||||
- drivers/*/*/*it8xxx2*.c
|
||||
- drivers/*/*it8xxx2*.c
|
||||
- drivers/*/*it8xxx2*
|
||||
- dts/bindings/*/*ite*
|
||||
- dts/riscv/*it8xxx2*
|
||||
- soc/riscv/riscv-ite/
|
||||
@@ -1655,26 +1498,14 @@ Storage:
|
||||
labels:
|
||||
- "area: Storage"
|
||||
|
||||
Task Watchdog:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- martinjaeger
|
||||
files:
|
||||
- include/task_wdt/
|
||||
- samples/subsys/task_wdt/
|
||||
- subsys/task_wdt/
|
||||
labels:
|
||||
- "area: Task Watchdog"
|
||||
|
||||
TF-M Integration:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- microbuilder
|
||||
collaborators:
|
||||
- SebastianBoe
|
||||
- ioannisg
|
||||
files:
|
||||
- samples/tfm_integration/
|
||||
- modules/trusted-firmware-m/
|
||||
labels:
|
||||
- "area: TF-M"
|
||||
|
||||
@@ -1682,9 +1513,6 @@ Tracing:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- nashif
|
||||
collaborators:
|
||||
- teburd
|
||||
- tleksell-pe
|
||||
files:
|
||||
- subsys/tracing/
|
||||
- include/tracing/
|
||||
@@ -1715,6 +1543,7 @@ Userspace:
|
||||
maintainers:
|
||||
- dcpleung
|
||||
collaborators:
|
||||
- ioannisg
|
||||
- enjiamai
|
||||
files:
|
||||
- doc/reference/usermode/kernelobjects.rst
|
||||
@@ -1786,7 +1615,6 @@ x86 arch:
|
||||
- ceolin
|
||||
- enjiamai
|
||||
- aasthagr
|
||||
- laurenmurphyx64
|
||||
files:
|
||||
- arch/x86/
|
||||
- include/arch/x86/
|
||||
@@ -1814,8 +1642,6 @@ ZTest:
|
||||
status: maintained
|
||||
maintainers:
|
||||
- nashif
|
||||
collaborators:
|
||||
- jeremybettis
|
||||
files:
|
||||
- subsys/testsuite/
|
||||
- tests/ztest/
|
||||
|
||||
10
README.rst
10
README.rst
@@ -2,16 +2,15 @@
|
||||
|
||||
<a href="https://www.zephyrproject.org">
|
||||
<p align="center">
|
||||
<img src="doc/_static/images/logo-readme.svg">
|
||||
<img src="doc/_static/images/logo-readme.png">
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<a href="https://bestpractices.coreinfrastructure.org/projects/74"><img
|
||||
src="https://bestpractices.coreinfrastructure.org/projects/74/badge"></a>
|
||||
<a
|
||||
href="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml?query=branch%3Amain">
|
||||
<a href="https://buildkite.com/zephyr/zephyr">
|
||||
<img
|
||||
src="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml/badge.svg?event=push"></a>
|
||||
src="https://badge.buildkite.com/f5bd0dc88306cee17c9b38e78d11bb74a6291e3f40e7d13f31.svg?branch=main"></a>
|
||||
|
||||
|
||||
The Zephyr Project is a scalable real-time operating system (RTOS) supporting
|
||||
@@ -63,7 +62,8 @@ Here's a quick summary of resources to help you find your way around:
|
||||
`Zephyr Development mailing list`_. The other `Zephyr mailing list
|
||||
subgroups`_ have their own archives and sign-up pages.
|
||||
* **Nightly CI Build Status**: https://lists.zephyrproject.org/g/builds
|
||||
The builds@lists.zephyrproject.org mailing list archives the CI nightly build results.
|
||||
The builds@lists.zephyrproject.org mailing list archives the CI
|
||||
(buildkite) nightly build results.
|
||||
* **Chat**: Real-time chat happens in Zephyr's Discord Server. Use
|
||||
this `Discord Invite`_ to register.
|
||||
* **Contributing**: see the `Contribution Guide`_
|
||||
|
||||
4
VERSION
4
VERSION
@@ -1,5 +1,5 @@
|
||||
VERSION_MAJOR = 3
|
||||
VERSION_MINOR = 0
|
||||
VERSION_MAJOR = 2
|
||||
VERSION_MINOR = 7
|
||||
PATCHLEVEL = 0
|
||||
VERSION_TWEAK = 0
|
||||
EXTRAVERSION =
|
||||
|
||||
175
arch/Kconfig
175
arch/Kconfig
@@ -49,14 +49,6 @@ config ARM64
|
||||
help
|
||||
ARM64 (AArch64) architecture
|
||||
|
||||
config MIPS
|
||||
bool
|
||||
select ARCH_IS_SET
|
||||
select ATOMIC_OPERATIONS_C
|
||||
select HAS_DTS
|
||||
help
|
||||
MIPS architecture
|
||||
|
||||
config SPARC
|
||||
bool
|
||||
select ARCH_IS_SET
|
||||
@@ -104,7 +96,6 @@ config RISCV
|
||||
bool
|
||||
select ARCH_IS_SET
|
||||
select HAS_DTS
|
||||
select ARCH_SUPPORTS_COREDUMP
|
||||
select ARCH_HAS_THREAD_LOCAL_STORAGE
|
||||
imply XIP
|
||||
help
|
||||
@@ -604,6 +595,172 @@ config ARCH_MAPS_ALL_RAM
|
||||
this mapping at all; non-kernel pages will be considered free (unless marked
|
||||
as reserved) and Z_PAGE_FRAME_MAPPED will not be set.
|
||||
|
||||
menuconfig MMU
|
||||
bool "Enable MMU features"
|
||||
depends on CPU_HAS_MMU
|
||||
help
|
||||
This option is enabled when the CPU's memory management unit is active
|
||||
and the arch_mem_map() API is available.
|
||||
|
||||
if MMU
|
||||
config MMU_PAGE_SIZE
|
||||
hex "Size of smallest granularity MMU page"
|
||||
default 0x1000
|
||||
help
|
||||
Size of memory pages. Varies per MMU but 4K is common. For MMUs that
|
||||
support multiple page sizes, put the smallest one here.
|
||||
|
||||
config KERNEL_VM_BASE
|
||||
hex "Virtual address space base address"
|
||||
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_SRAM))
|
||||
help
|
||||
Define the base of the kernel's address space.
|
||||
|
||||
By default, this is the same as the DT_CHOSEN_Z_SRAM physical base SRAM
|
||||
address from DTS, in which case RAM will be identity-mapped. Some
|
||||
architectures may require RAM to be mapped in this way; they may have
|
||||
just one RAM region and doing this makes linking much simpler, as
|
||||
at least when the kernel boots all virtual RAM addresses are the same
|
||||
as their physical address (demand paging at runtime may later modify
|
||||
this for non-pinned page frames).
|
||||
|
||||
Otherwise, if RAM isn't identity-mapped:
|
||||
1. It is the architecture's responsibility to transition the
|
||||
instruction pointer to virtual addresses at early boot before
|
||||
entering the kernel at z_cstart().
|
||||
2. The underlying architecture may impose constraints on the bounds of
|
||||
the kernel's address space, such as not overlapping physical RAM
|
||||
regions if RAM is not identity-mapped, or the virtual and physical
|
||||
base addresses being aligned to some common value (which allows
|
||||
double-linking of paging structures to make the instruction pointer
|
||||
transition simpler).
|
||||
|
||||
Zephyr does not implement a split address space and if multiple
|
||||
page tables are in use, they all have the same virtual-to-physical
|
||||
mappings (with potentially different permissions).
|
||||
|
||||
config KERNEL_VM_OFFSET
|
||||
hex "Kernel offset within address space"
|
||||
default 0
|
||||
help
|
||||
Offset that the kernel image begins within its address space,
|
||||
if this is not the same offset from the beginning of RAM.
|
||||
|
||||
Some care may need to be taken in selecting this value. In certain
|
||||
build-time cases, or when a physical address cannot be looked up
|
||||
in page tables, the equation:
|
||||
|
||||
virt = phys + ((KERNEL_VM_BASE + KERNEL_VM_OFFSET) -
|
||||
(SRAM_BASE_ADDRESS + SRAM_OFFSET))
|
||||
|
||||
Will be used to convert between physical and virtual addresses for
|
||||
memory that is mapped at boot.
|
||||
|
||||
This uncommon and is only necessary if the beginning of VM and
|
||||
physical memory have dissimilar alignment.
|
||||
|
||||
config KERNEL_VM_SIZE
|
||||
hex "Size of kernel address space in bytes"
|
||||
default 0x800000
|
||||
help
|
||||
Size of the kernel's address space. Constraining this helps control
|
||||
how much total memory can be used for page tables.
|
||||
|
||||
The difference between KERNEL_VM_BASE and KERNEL_VM_SIZE indicates the
|
||||
size of the virtual region for runtime memory mappings. This is needed
|
||||
for mapping driver MMIO regions, as well as special RAM mapping use-cases
|
||||
such as VSDO pages, memory mapped thread stacks, and anonymous memory
|
||||
mappings. The kernel itself will be mapped in here as well at boot.
|
||||
|
||||
Systems with very large amounts of memory (such as 512M or more)
|
||||
will want to use a 64-bit build of Zephyr, there are no plans to
|
||||
implement a notion of "high" memory in Zephyr to work around physical
|
||||
RAM size larger than the defined bounds of the virtual address space.
|
||||
|
||||
menuconfig DEMAND_PAGING
|
||||
bool "Enable demand paging [EXPERIMENTAL]"
|
||||
depends on ARCH_HAS_DEMAND_PAGING
|
||||
help
|
||||
Enable demand paging. Requires architecture support in how the kernel
|
||||
is linked and the implementation of an eviction algorithm and a
|
||||
backing store for evicted pages.
|
||||
|
||||
if DEMAND_PAGING
|
||||
config DEMAND_PAGING_ALLOW_IRQ
|
||||
bool "Allow interrupts during page-ins/outs"
|
||||
help
|
||||
Allow interrupts to be serviced while pages are being evicted or
|
||||
retrieved from the backing store. This is much better for system
|
||||
latency, but any code running in interrupt context that page faults
|
||||
will cause a kernel panic. Such code must work with exclusively pinned
|
||||
code and data pages.
|
||||
|
||||
The scheduler is still disabled during this operation.
|
||||
|
||||
If this option is disabled, the page fault servicing logic
|
||||
runs with interrupts disabled for the entire operation. However,
|
||||
ISRs may also page fault.
|
||||
|
||||
config DEMAND_PAGING_PAGE_FRAMES_RESERVE
|
||||
int "Number of page frames reserved for paging"
|
||||
default 32 if !LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT
|
||||
default 0
|
||||
help
|
||||
This sets the number of page frames that will be reserved for
|
||||
paging that do not count towards free memory. This is to
|
||||
ensure that there are some page frames available for paging
|
||||
code and data. Otherwise, it would be possible to exhaust
|
||||
all page frames via anonymous memory mappings.
|
||||
|
||||
config DEMAND_PAGING_STATS
|
||||
bool "Gather Demand Paging Statistics"
|
||||
help
|
||||
This enables gathering various statistics related to demand paging,
|
||||
e.g. number of pagefaults. This is useful for tuning eviction
|
||||
algorithms and optimizing backing store.
|
||||
|
||||
Should say N in production system as this is not without cost.
|
||||
|
||||
config DEMAND_PAGING_STATS_USING_TIMING_FUNCTIONS
|
||||
bool "Use Timing Functions to Gather Demand Paging Statistics"
|
||||
select TIMING_FUNCTIONS_NEED_AT_BOOT
|
||||
help
|
||||
Use timing functions to gather various demand paging statistics.
|
||||
|
||||
config DEMAND_PAGING_THREAD_STATS
|
||||
bool "Gather per Thread Demand Paging Statistics"
|
||||
depends on DEMAND_PAGING_STATS
|
||||
help
|
||||
This enables gathering per thread statistics related to demand
|
||||
paging.
|
||||
|
||||
Should say N in production system as this is not without cost.
|
||||
|
||||
config DEMAND_PAGING_TIMING_HISTOGRAM
|
||||
bool "Gather Demand Paging Execution Timing Histogram"
|
||||
depends on DEMAND_PAGING_STATS
|
||||
help
|
||||
This gathers the histogram of execution time on page eviction
|
||||
selection, and backing store page in and page out.
|
||||
|
||||
Should say N in production system as this is not without cost.
|
||||
|
||||
config DEMAND_PAGING_TIMING_HISTOGRAM_NUM_BINS
|
||||
int "Number of bins (buckets) in Demand Paging Timing Histogrm"
|
||||
depends on DEMAND_PAGING_TIMING_HISTOGRAM
|
||||
default 10
|
||||
help
|
||||
Defines the number of bins (buckets) in the histogram used for
|
||||
gathering execution timing information for demand paging.
|
||||
|
||||
This requires k_mem_paging_eviction_histogram_bounds[] and
|
||||
k_mem_paging_backing_store_histogram_bounds[] to define
|
||||
the upper bounds for each bin. See kernel/statistics.c for
|
||||
information.
|
||||
|
||||
endif # DEMAND_PAGING
|
||||
endif # MMU
|
||||
|
||||
menuconfig MPU
|
||||
bool "Enable MPU features"
|
||||
depends on CPU_HAS_MPU
|
||||
|
||||
@@ -263,6 +263,7 @@ config CODE_DENSITY
|
||||
config ARC_HAS_ACCL_REGS
|
||||
bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6)"
|
||||
default y if CPU_HS3X
|
||||
default y if FPU
|
||||
help
|
||||
Depending on the configuration, CPU can contain accumulator reg-pair
|
||||
(also referred to as r58:r59). These can also be used by gcc as GPR so
|
||||
|
||||
@@ -24,6 +24,7 @@ GTEXT(_firq_enter)
|
||||
GTEXT(_firq_exit)
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Work to be done before handing control to a FIRQ ISR
|
||||
*
|
||||
* The processor switches to a second register bank so registers from the
|
||||
@@ -40,6 +41,8 @@ GTEXT(_firq_exit)
|
||||
* interrupt. An exception, however, can be taken.
|
||||
*
|
||||
* Assumption by _isr_demux: r3 is untouched by _firq_enter.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
SECTION_FUNC(TEXT, _firq_enter)
|
||||
@@ -128,7 +131,10 @@ firq_nest:
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Work to be done exiting a FIRQ
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
SECTION_FUNC(TEXT, _firq_exit)
|
||||
|
||||
@@ -38,8 +38,10 @@ K_KERNEL_STACK_ARRAY_DEFINE(_firq_interrupt_stack, CONFIG_MP_NUM_CPUS,
|
||||
K_KERNEL_STACK_DEFINE(_firq_interrupt_stack, CONFIG_ARC_FIRQ_STACK_SIZE);
|
||||
#endif
|
||||
|
||||
/**
|
||||
/*
|
||||
* @brief Set the stack pointer for firq handling
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void z_arc_firq_stack_set(void)
|
||||
{
|
||||
@@ -81,12 +83,14 @@ void z_arc_firq_stack_set(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
/*
|
||||
* @brief Enable an interrupt line
|
||||
*
|
||||
* Clear possible pending interrupts on the line, and enable the interrupt
|
||||
* line. After this call, the CPU will receive interrupts for the specified
|
||||
* @a irq.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
void arch_irq_enable(unsigned int irq)
|
||||
@@ -94,11 +98,13 @@ void arch_irq_enable(unsigned int irq)
|
||||
z_arc_v2_irq_unit_int_enable(irq);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @brief Disable an interrupt line
|
||||
*
|
||||
* Disable an interrupt line. After this call, the CPU will stop receiving
|
||||
* interrupts for the specified @a irq.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
void arch_irq_disable(unsigned int irq)
|
||||
@@ -117,7 +123,7 @@ int arch_irq_is_enabled(unsigned int irq)
|
||||
return z_arc_v2_irq_unit_int_enabled(irq);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @internal
|
||||
*
|
||||
* @brief Set an interrupt's priority
|
||||
@@ -127,6 +133,8 @@ int arch_irq_is_enabled(unsigned int irq)
|
||||
|
||||
* The priority is verified if ASSERT_ON is enabled; max priority level
|
||||
* depends on CONFIG_NUM_IRQ_PRIO_LEVELS.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
void z_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags)
|
||||
@@ -148,11 +156,13 @@ void z_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags)
|
||||
z_arc_v2_irq_unit_prio_set(irq, prio);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @brief Spurious interrupt handler
|
||||
*
|
||||
* Installed in all dynamic interrupt slots at boot time. Throws an error if
|
||||
* called.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
void z_irq_spurious(const void *unused)
|
||||
|
||||
@@ -249,6 +249,8 @@ rirq_path:
|
||||
#if defined(CONFIG_PM)
|
||||
clri r0 /* do not interrupt exiting tickless idle operations */
|
||||
MOVR r1, _kernel
|
||||
/* z_kernel.idle is 32 bit despite of platform bittnes */
|
||||
ld_s r3, [r1, _kernel_offset_to_idle] /* requested idle duration */
|
||||
breq r3, 0, _skip_pm_save_idle_exit
|
||||
|
||||
st 0, [r1, _kernel_offset_to_idle] /* zero idle duration */
|
||||
@@ -275,10 +277,6 @@ SECTION_FUNC(TEXT, _isr_demux)
|
||||
PUSHR r59
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SCHED_THREAD_USAGE
|
||||
bl z_sched_usage_stop
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRACING_ISR
|
||||
bl sys_trace_isr_enter
|
||||
#endif
|
||||
|
||||
@@ -35,7 +35,7 @@ int arch_mem_domain_max_partitions_get(void)
|
||||
/*
|
||||
* Validate the given buffer is user accessible or not
|
||||
*/
|
||||
int arch_buffer_validate(void *addr, size_t size, int write)
|
||||
int arch_buffer_validate(const void *addr, size_t size, bool write)
|
||||
{
|
||||
return arc_core_mpu_buffer_validate(addr, size, write);
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ int arc_core_mpu_get_max_domain_partition_regions(void)
|
||||
/**
|
||||
* @brief validate the given buffer is user accessible or not
|
||||
*/
|
||||
int arc_core_mpu_buffer_validate(void *addr, size_t size, int write)
|
||||
int arc_core_mpu_buffer_validate(const void *addr, size_t size, bool write)
|
||||
{
|
||||
/*
|
||||
* For ARC MPU, smaller region number takes priority.
|
||||
|
||||
@@ -779,7 +779,7 @@ int arc_core_mpu_get_max_domain_partition_regions(void)
|
||||
/**
|
||||
* @brief validate the given buffer is user accessible or not
|
||||
*/
|
||||
int arc_core_mpu_buffer_validate(void *addr, size_t size, int write)
|
||||
int arc_core_mpu_buffer_validate(const void *addr, size_t size, bool write)
|
||||
{
|
||||
int r_index;
|
||||
int key = arch_irq_lock();
|
||||
|
||||
@@ -27,10 +27,13 @@
|
||||
/* XXX - keep for future use in full-featured cache APIs */
|
||||
#if 0
|
||||
/**
|
||||
*
|
||||
* @brief Disable the i-cache if present
|
||||
*
|
||||
* For those ARC CPUs that have a i-cache present,
|
||||
* invalidate the i-cache and then disable it.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
static void disable_icache(void)
|
||||
@@ -48,10 +51,13 @@ static void disable_icache(void)
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Invalidate the data cache if present
|
||||
*
|
||||
* For those ARC CPUs that have a data cache present,
|
||||
* invalidate the data cache.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
static void invalidate_dcache(void)
|
||||
@@ -69,9 +75,12 @@ static void invalidate_dcache(void)
|
||||
|
||||
extern FUNC_NORETURN void z_cstart(void);
|
||||
/**
|
||||
*
|
||||
* @brief Prepare to and run C code
|
||||
*
|
||||
* This routine prepares for the execution of and runs C code.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
void _PrepC(void)
|
||||
|
||||
@@ -190,6 +190,7 @@ will be corrupted.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Work to be done before handing control to an IRQ ISR
|
||||
*
|
||||
* The processor pushes automatically all registers that need to be saved.
|
||||
@@ -197,6 +198,8 @@ will be corrupted.
|
||||
* automatic switch to the IRQ stack: this must be done in software.
|
||||
*
|
||||
* Assumption by _isr_demux: r3 is untouched by _rirq_enter.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
SECTION_FUNC(TEXT, _rirq_enter)
|
||||
@@ -225,7 +228,10 @@ rirq_nest:
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Work to be done exiting an IRQ
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
SECTION_FUNC(TEXT, _rirq_exit)
|
||||
|
||||
@@ -31,6 +31,7 @@ GTEXT(__reset)
|
||||
GTEXT(__start)
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Reset vector
|
||||
*
|
||||
* Ran when the system comes out of reset. The processor is at supervisor level.
|
||||
@@ -39,6 +40,8 @@ GTEXT(__start)
|
||||
*
|
||||
* When these steps are completed, jump to _PrepC(), which will finish setting
|
||||
* up the system for running C code.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
SECTION_SUBSEC_FUNC(TEXT,_reset_and__start,__reset)
|
||||
|
||||
@@ -19,11 +19,13 @@
|
||||
GTEXT(z_thread_entry_wrapper)
|
||||
GTEXT(z_thread_entry_wrapper1)
|
||||
|
||||
/**
|
||||
/*
|
||||
* @brief Wrapper for z_thread_entry
|
||||
*
|
||||
* The routine pops parameters for the z_thread_entry from stack frame, prepared
|
||||
* by the arch_new_thread() routine.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
SECTION_FUNC(TEXT, z_thread_entry_wrapper)
|
||||
|
||||
@@ -52,11 +52,11 @@ GTEXT(arch_user_string_nlen)
|
||||
GTEXT(z_arc_user_string_nlen_fault_start)
|
||||
GTEXT(z_arc_user_string_nlen_fault_end)
|
||||
GTEXT(z_arc_user_string_nlen_fixup)
|
||||
|
||||
/**
|
||||
/*
|
||||
* @brief Wrapper for z_thread_entry in the case of user thread
|
||||
*
|
||||
* The init parameters are in privileged stack
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
SECTION_FUNC(TEXT, z_user_thread_entry_wrapper)
|
||||
seti _ARC_V2_INIT_IRQ_LOCK_KEY
|
||||
|
||||
@@ -27,9 +27,7 @@ add_subdirectory_ifdef(CONFIG_ARM_SECURE_FIRMWARE cortex_m/tz)
|
||||
add_subdirectory_ifdef(CONFIG_ARM_NONSECURE_FIRMWARE cortex_m/tz)
|
||||
|
||||
add_subdirectory_ifdef(CONFIG_ARM_MPU mpu)
|
||||
add_subdirectory_ifdef(CONFIG_ARM_AARCH32_MMU mmu)
|
||||
|
||||
add_subdirectory_ifdef(CONFIG_CPU_CORTEX_R cortex_a_r)
|
||||
add_subdirectory_ifdef(CONFIG_CPU_AARCH32_CORTEX_A cortex_a_r)
|
||||
|
||||
zephyr_linker_sources(ROM_START SORT_KEY 0x0vectors vector_table.ld)
|
||||
|
||||
@@ -36,17 +36,6 @@ config CPU_CORTEX_R
|
||||
help
|
||||
This option signifies the use of a CPU of the Cortex-R family.
|
||||
|
||||
config CPU_AARCH32_CORTEX_A
|
||||
bool
|
||||
select CPU_CORTEX
|
||||
select CPU_HAS_MMU
|
||||
select HAS_CMSIS_CORE
|
||||
select HAS_FLASH_LOAD_OFFSET
|
||||
select ARCH_HAS_EXTRA_EXCEPTION_INFO
|
||||
select ARCH_HAS_NOCACHE_MEMORY_SUPPORT
|
||||
help
|
||||
This option signifies the use of a CPU of the Cortex-A family.
|
||||
|
||||
config ISA_THUMB2
|
||||
bool
|
||||
help
|
||||
@@ -306,4 +295,3 @@ rsource "cortex_m/Kconfig"
|
||||
rsource "cortex_a_r/Kconfig"
|
||||
|
||||
rsource "mpu/Kconfig"
|
||||
rsource "mmu/Kconfig"
|
||||
|
||||
@@ -1,67 +1,15 @@
|
||||
# ARM Cortex-A and Cortex-R platform configuration options
|
||||
# ARM Cortex-R platform configuration options
|
||||
|
||||
# Copyright (c) 2018 Marvell
|
||||
# Copyright (c) 2018 Lexmark International, Inc.
|
||||
# Copyright (c) 2021 Weidmueller Interface GmbH & Co. KG
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# NOTE: We have the specific core implementations first and outside of the
|
||||
# if CPU_AARCH32_CORTEX_A / if CPU_CORTEX_R block so that SoCs can select
|
||||
# which core they are using without having to select all the options related
|
||||
# to that core. Everything else is captured inside the if CPU_CORTEX_A / if
|
||||
# CPU_CORTEX_R blocks so they are not exposed if one selects a different ARM
|
||||
# Cortex Family (Cortex-M).
|
||||
# if CPU_CORTEX_R block so that SoCs can select which core they are using
|
||||
# without having to select all the options related to that core. Everything
|
||||
# else is captured inside the if CPU_CORTEX_R block so they are not exposed
|
||||
# if one selects a different ARM Cortex Family (Cortex-A or Cortex-M)
|
||||
|
||||
config CPU_CORTEX_A9
|
||||
bool
|
||||
select CPU_AARCH32_CORTEX_A
|
||||
select ARMV7_A
|
||||
help
|
||||
This option signifies the use of a Cortex-A9 CPU.
|
||||
|
||||
if CPU_AARCH32_CORTEX_A
|
||||
|
||||
config ARMV7_A
|
||||
bool
|
||||
select ATOMIC_OPERATIONS_BUILTIN
|
||||
select ISA_ARM
|
||||
|
||||
config ARMV7_EXCEPTION_STACK_SIZE
|
||||
int "Undefined Instruction and Abort stack size (in bytes)"
|
||||
default 256
|
||||
help
|
||||
This option specifies the size of the stack used by the undefined
|
||||
instruction and data abort exception handlers.
|
||||
|
||||
config ARMV7_FIQ_STACK_SIZE
|
||||
int "FIQ stack size (in bytes)"
|
||||
default 256
|
||||
help
|
||||
This option specifies the size of the stack used by the FIQ handler.
|
||||
|
||||
config ARMV7_SVC_STACK_SIZE
|
||||
int "SVC stack size (in bytes)"
|
||||
default 512
|
||||
help
|
||||
This option specifies the size of the stack used by the SVC handler.
|
||||
|
||||
config ARMV7_SYS_STACK_SIZE
|
||||
int "SYS stack size (in bytes)"
|
||||
default 1024
|
||||
help
|
||||
This option specifies the size of the stack used by the system mode.
|
||||
|
||||
config RUNTIME_NMI
|
||||
default y
|
||||
|
||||
config GEN_ISR_TABLES
|
||||
default y
|
||||
|
||||
config GEN_IRQ_VECTOR_TABLE
|
||||
default n
|
||||
|
||||
endif # CPU_AARCH32_CORTEX_A
|
||||
|
||||
config CPU_CORTEX_R4
|
||||
bool
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief ARM Cortex-A and Cortex-R interrupt initialization
|
||||
* @brief ARM Cortex-R interrupt initialization
|
||||
*/
|
||||
|
||||
#include <arch/cpu.h>
|
||||
@@ -16,6 +16,7 @@
|
||||
*
|
||||
* @brief Initialize interrupts
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void z_arm_interrupt_init(void)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief ARM Cortex-A and Cortex-R System Control Block interface
|
||||
* @brief ARM Cortex-R System Control Block interface
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
@@ -19,6 +19,7 @@
|
||||
*
|
||||
* This routine resets the processor.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
void __weak sys_arch_reboot(int type)
|
||||
|
||||
@@ -43,6 +43,7 @@ GTEXT(z_arm_platform_init)
|
||||
* When these steps are completed, jump to z_arm_prep_c(), which will finish
|
||||
* setting up the system for running C code.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
SECTION_SUBSEC_FUNC(TEXT, _reset_section, z_arm_reset)
|
||||
SECTION_SUBSEC_FUNC(TEXT, _reset_section, __start)
|
||||
|
||||
@@ -8,12 +8,10 @@
|
||||
|
||||
void z_arm_tcm_disable_ecc(void)
|
||||
{
|
||||
#if defined(CONFIG_ARMV7_R)
|
||||
uint32_t actlr;
|
||||
|
||||
actlr = __get_ACTLR();
|
||||
actlr &= ~(ACTLR_ATCMPCEN_Msk | ACTLR_B0TCMPCEN_Msk |
|
||||
ACTLR_B1TCMPCEN_Msk);
|
||||
__set_ACTLR(actlr);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ GDATA(_kernel)
|
||||
* z_arm_int_exit();
|
||||
* }
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
SECTION_SUBSEC_FUNC(TEXT, _HandlerModeExit, z_arm_int_exit)
|
||||
@@ -62,6 +63,7 @@ SECTION_SUBSEC_FUNC(TEXT, _HandlerModeExit, z_arm_int_exit)
|
||||
*
|
||||
* See z_arm_int_exit().
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
SECTION_SUBSEC_FUNC(TEXT, _HandlerModeExit, z_arm_exc_exit)
|
||||
|
||||
@@ -353,8 +353,7 @@ static uint32_t mem_manage_fault(z_arch_esf_t *esf, int from_hard_fault,
|
||||
*
|
||||
* See z_arm_fault_dump() for example.
|
||||
*
|
||||
* @return error code to identify the fatal error reason.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static int bus_fault(z_arch_esf_t *esf, int from_hard_fault, bool *recoverable)
|
||||
{
|
||||
@@ -566,6 +565,7 @@ static uint32_t usage_fault(const z_arch_esf_t *esf)
|
||||
*
|
||||
* See z_arm_fault_dump() for example.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void secure_fault(const z_arch_esf_t *esf)
|
||||
{
|
||||
@@ -604,6 +604,7 @@ static void secure_fault(const z_arch_esf_t *esf)
|
||||
*
|
||||
* See z_arm_fault_dump() for example.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void debug_monitor(z_arch_esf_t *esf, bool *recoverable)
|
||||
{
|
||||
@@ -724,6 +725,7 @@ static uint32_t hard_fault(z_arch_esf_t *esf, bool *recoverable)
|
||||
*
|
||||
* See z_arm_fault_dump() for example.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void reserved_exception(const z_arch_esf_t *esf, int fault)
|
||||
{
|
||||
@@ -847,7 +849,7 @@ static inline z_arch_esf_t *get_esf(uint32_t msp, uint32_t psp, uint32_t exc_ret
|
||||
bool *nested_exc)
|
||||
{
|
||||
bool alternative_state_exc = false;
|
||||
z_arch_esf_t *ptr_esf = NULL;
|
||||
z_arch_esf_t *ptr_esf;
|
||||
|
||||
*nested_exc = false;
|
||||
|
||||
@@ -1055,6 +1057,7 @@ void z_arm_fault(uint32_t msp, uint32_t psp, uint32_t exc_return,
|
||||
*
|
||||
* Turns on the desired hardware faults.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void z_arm_fault_init(void)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
* not 0, which they have it set to when coming out of reset. This ensures that
|
||||
* interrupt locking via BASEPRI works as expected.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
void z_arm_interrupt_init(void)
|
||||
|
||||
@@ -51,6 +51,7 @@ GDATA(z_main_stack)
|
||||
* When these steps are completed, jump to z_arm_prep_c(), which will finish
|
||||
* setting up the system for running C code.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
SECTION_SUBSEC_FUNC(TEXT,_reset_section,z_arm_reset)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
*
|
||||
* This routine resets the processor.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
void __weak sys_arch_reboot(int type)
|
||||
@@ -46,6 +47,7 @@ void __weak sys_arch_reboot(int type)
|
||||
*
|
||||
* This routine clears all ARM MPU region configuration.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void z_arm_clear_arm_mpu_config(void)
|
||||
{
|
||||
@@ -82,6 +84,7 @@ void z_arm_clear_arm_mpu_config(void)
|
||||
* This routine resets Cortex-M system control block
|
||||
* components and core registers.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void z_arm_init_arch_hw_at_boot(void)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ static inline uint64_t z_arm_dwt_freq_get(void)
|
||||
/* SysTick and DWT both run at CPU frequency,
|
||||
* reflected in the system timer HW cycles/sec.
|
||||
*/
|
||||
return sys_clock_hw_cycles_per_sec();
|
||||
return CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC;
|
||||
#else
|
||||
static uint64_t dwt_frequency;
|
||||
uint32_t cyc_start, cyc_end;
|
||||
|
||||
@@ -80,12 +80,14 @@ SECTION_SUBSEC_FUNC(exc_vector_table,_vector_table_section,_vector_table)
|
||||
.word z_arm_exc_spurious
|
||||
#endif
|
||||
#if defined(CONFIG_CPU_CORTEX_M_HAS_SYSTICK)
|
||||
#if defined(CONFIG_SYS_CLOCK_EXISTS) && \
|
||||
defined(CONFIG_CORTEX_M_SYSTICK_INSTALL_ISR)
|
||||
#if defined(CONFIG_SYS_CLOCK_EXISTS)
|
||||
/* Install sys_clock_isr even if CORTEX_M_SYSTICK is not set
|
||||
* (e.g. to support out-of-tree SysTick-based timer drivers).
|
||||
*/
|
||||
.word sys_clock_isr
|
||||
#else
|
||||
.word z_arm_exc_spurious
|
||||
#endif /* CONFIG_SYS_CLOCK_EXISTS && CONFIG_CORTEX_M_SYSTICK_INSTALL_ISR */
|
||||
#endif /* CONFIG_SYS_CLOCK_EXISTS */
|
||||
#else
|
||||
.word 0
|
||||
#endif /* CONFIG_CPU_CORTEX_M_HAS_SYSTICK */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief ARM Cortex-A, Cortex-M and Cortex-R power management
|
||||
* @brief ARM Cortex-M and Cortex-R power management
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -35,6 +35,8 @@ GTEXT(arch_cpu_atomic_idle)
|
||||
* Only called by arch_kernel_init(). Sets SEVONPEND bit once for the system's
|
||||
* duration.
|
||||
*
|
||||
* @return N/A
|
||||
*
|
||||
* C function prototype:
|
||||
*
|
||||
* void z_arm_cpu_idle_init(void);
|
||||
@@ -133,8 +135,7 @@ SECTION_FUNC(TEXT, arch_cpu_atomic_idle)
|
||||
/* r0: interrupt mask from caller */
|
||||
|
||||
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE) \
|
||||
|| defined(CONFIG_ARMV7_R) \
|
||||
|| defined(CONFIG_ARMV7_A)
|
||||
|| defined(CONFIG_ARMV7_R)
|
||||
/* No BASEPRI, call wfe directly
|
||||
* (SEVONPEND is set in z_arm_cpu_idle_init())
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief ARM Cortex-A, Cortex-M and Cortex-R interrupt management
|
||||
* @brief ARM Cortex-M and Cortex-R interrupt management
|
||||
*
|
||||
*
|
||||
* Interrupt management: enabling/disabling and dynamic ISR
|
||||
@@ -18,8 +18,7 @@
|
||||
#include <arch/cpu.h>
|
||||
#if defined(CONFIG_CPU_CORTEX_M)
|
||||
#include <arch/arm/aarch32/cortex_m/cmsis.h>
|
||||
#elif defined(CONFIG_CPU_AARCH32_CORTEX_A) \
|
||||
|| defined(CONFIG_CPU_CORTEX_R)
|
||||
#elif defined(CONFIG_CPU_CORTEX_A) || defined(CONFIG_CPU_CORTEX_R)
|
||||
#include <drivers/interrupt_controller/gic.h>
|
||||
#endif
|
||||
#include <sys/__assert.h>
|
||||
@@ -60,6 +59,8 @@ int arch_irq_is_enabled(unsigned int irq)
|
||||
* The priority is verified if ASSERT_ON is enabled. The maximum number
|
||||
* of priority levels is a little complex, as there are some hardware
|
||||
* priority levels which are reserved.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void z_arm_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags)
|
||||
{
|
||||
@@ -87,12 +88,11 @@ void z_arm_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags)
|
||||
__ASSERT(prio <= (BIT(NUM_IRQ_PRIO_BITS) - 1),
|
||||
"invalid priority %d for %d irq! values must be less than %lu\n",
|
||||
prio - _IRQ_PRIO_OFFSET, irq,
|
||||
BIT(NUM_IRQ_PRIO_BITS) - (_IRQ_PRIO_OFFSET));
|
||||
(unsigned long)BIT(NUM_IRQ_PRIO_BITS) - (_IRQ_PRIO_OFFSET));
|
||||
NVIC_SetPriority((IRQn_Type)irq, prio);
|
||||
}
|
||||
|
||||
#elif defined(CONFIG_CPU_AARCH32_CORTEX_A) \
|
||||
|| defined(CONFIG_CPU_CORTEX_R)
|
||||
#elif defined(CONFIG_CPU_CORTEX_A) || defined(CONFIG_CPU_CORTEX_R)
|
||||
/*
|
||||
* For Cortex-A and Cortex-R cores, the default interrupt controller is the ARM
|
||||
* Generic Interrupt Controller (GIC) and therefore the architecture interrupt
|
||||
@@ -129,6 +129,8 @@ int arch_irq_is_enabled(unsigned int irq)
|
||||
* of priority levels is a little complex, as there are some hardware
|
||||
* priority levels which are reserved: three for various types of exceptions,
|
||||
* and possibly one additional to support zero latency interrupts.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void z_arm_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags)
|
||||
{
|
||||
@@ -147,6 +149,7 @@ void z_arm_fatal_error(unsigned int reason, const z_arch_esf_t *esf);
|
||||
* Installed in all _sw_isr_table slots at boot time. Throws an error if
|
||||
* called.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void z_irq_spurious(const void *unused)
|
||||
{
|
||||
@@ -159,11 +162,10 @@ void z_irq_spurious(const void *unused)
|
||||
void _arch_isr_direct_pm(void)
|
||||
{
|
||||
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE) \
|
||||
|| defined(CONFIG_ARMV7_R) \
|
||||
|| defined(CONFIG_ARMV7_A)
|
||||
|| defined(CONFIG_ARMV7_R)
|
||||
unsigned int key;
|
||||
|
||||
/* irq_lock() does what we want for this CPU */
|
||||
/* irq_lock() does what we wan for this CPU */
|
||||
key = irq_lock();
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
|
||||
/* Lock all interrupts. irq_lock() will on this CPU only disable those
|
||||
@@ -176,13 +178,14 @@ void _arch_isr_direct_pm(void)
|
||||
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
|
||||
|
||||
if (_kernel.idle) {
|
||||
int32_t idle_val = _kernel.idle;
|
||||
|
||||
_kernel.idle = 0;
|
||||
z_pm_save_idle_exit();
|
||||
z_pm_save_idle_exit(idle_val);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE) \
|
||||
|| defined(CONFIG_ARMV7_R) \
|
||||
|| defined(CONFIG_ARMV7_A)
|
||||
|| defined(CONFIG_ARMV7_R)
|
||||
irq_unlock(key);
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
|
||||
__asm__ volatile("cpsie i" : : : "memory");
|
||||
@@ -265,6 +268,7 @@ int irq_target_state_is_secure(unsigned int irq)
|
||||
* - Bits corresponding to un-implemented interrupts are RES0, so writes
|
||||
* will be ignored.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void irq_target_state_set_all_non_secure(void)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief ARM Cortex-A, Cortex-M and Cortex-R wrapper for ISRs with parameter
|
||||
* @brief ARM Cortex-M and Cortex-R wrapper for ISRs with parameter
|
||||
*
|
||||
* Wrapper installed in vector table for handling dynamic interrupts that accept
|
||||
* a parameter.
|
||||
@@ -42,12 +42,13 @@ GTEXT(z_arm_int_exit)
|
||||
* z_arm_pendsv()) and pends the PendSV exception if so: the latter will
|
||||
* perform the context switch itself.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
SECTION_FUNC(TEXT, _isr_wrapper)
|
||||
|
||||
#if defined(CONFIG_CPU_CORTEX_M)
|
||||
push {r0,lr} /* r0, lr are now the first items on the stack */
|
||||
#elif defined(CONFIG_CPU_CORTEX_R) || defined(CONFIG_CPU_AARCH32_CORTEX_A)
|
||||
#elif defined(CONFIG_CPU_CORTEX_R)
|
||||
|
||||
#if defined(CONFIG_USERSPACE)
|
||||
/* See comment below about svc stack usage */
|
||||
@@ -163,7 +164,7 @@ _idle_state_cleared:
|
||||
/* clear kernel idle state */
|
||||
strne r1, [r2, #_kernel_offset_to_idle]
|
||||
blne z_pm_save_idle_exit
|
||||
#elif defined(CONFIG_ARMV7_R) || defined(CONFIG_ARMV7_A)
|
||||
#elif defined(CONFIG_ARMV7_R)
|
||||
beq _idle_state_cleared
|
||||
movs r1, #0
|
||||
/* clear kernel idle state */
|
||||
@@ -190,7 +191,7 @@ _idle_state_cleared:
|
||||
sub r0, r0, #16 /* get IRQ number */
|
||||
lsl r0, r0, #3 /* table is 8-byte wide */
|
||||
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
|
||||
#elif defined(CONFIG_CPU_CORTEX_R) || defined(CONFIG_CPU_AARCH32_CORTEX_A)
|
||||
#elif defined(CONFIG_CPU_CORTEX_R)
|
||||
/* Get active IRQ number from the interrupt controller */
|
||||
#if !defined(CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER)
|
||||
bl arm_gic_get_active
|
||||
@@ -232,7 +233,7 @@ _idle_state_cleared:
|
||||
ldm r1!,{r0,r3} /* arg in r0, ISR in r3 */
|
||||
blx r3 /* call ISR */
|
||||
|
||||
#if defined(CONFIG_CPU_CORTEX_R) || defined(CONFIG_CPU_AARCH32_CORTEX_A)
|
||||
#if defined(CONFIG_CPU_CORTEX_R)
|
||||
spurious_continue:
|
||||
/* Signal end-of-interrupt */
|
||||
pop {r0, r1}
|
||||
@@ -241,7 +242,7 @@ spurious_continue:
|
||||
#else
|
||||
bl z_soc_irq_eoi
|
||||
#endif /* !CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER */
|
||||
#endif /* CONFIG_CPU_CORTEX_R || CONFIG_CPU_AARCH32_CORTEX_A */
|
||||
#endif /* CONFIG_CPU_CORTEX_R */
|
||||
|
||||
#ifdef CONFIG_TRACING_ISR
|
||||
bl sys_trace_isr_exit
|
||||
@@ -252,7 +253,7 @@ spurious_continue:
|
||||
mov lr, r3
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
|
||||
pop {r0, lr}
|
||||
#elif defined(CONFIG_ARMV7_R) || defined(CONFIG_ARMV7_A)
|
||||
#elif defined(CONFIG_ARMV7_R)
|
||||
/*
|
||||
* r0 and lr_irq were saved on the process stack since a swap could
|
||||
* happen. exc_exit will handle getting those values back
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_library()
|
||||
|
||||
zephyr_library_sources(arm_mmu.c)
|
||||
@@ -1,35 +0,0 @@
|
||||
#
|
||||
# ARMv7 Memory Management Unit (MMU) configuration options
|
||||
#
|
||||
# Copyright (c) 2021 Weidmueller Interface GmbH & Co. KG
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
if CPU_HAS_MMU
|
||||
|
||||
config ARM_AARCH32_MMU
|
||||
bool "ARMv7 Cortex-A MMU Support"
|
||||
default y if CPU_AARCH32_CORTEX_A
|
||||
select MMU
|
||||
select SRAM_REGION_PERMISSIONS
|
||||
select THREAD_STACK_INFO
|
||||
select ARCH_HAS_EXECUTABLE_PAGE_BIT
|
||||
help
|
||||
The current CPU has an ARMv7 Memory Management Unit.
|
||||
|
||||
config ARM_MMU_NUM_L2_TABLES
|
||||
depends on ARM_AARCH32_MMU
|
||||
int "Number of L2 translation tables available to the MMU"
|
||||
default 64
|
||||
help
|
||||
Number of level 2 translation tables. Each level 2 table
|
||||
covers 1 MB of address space.
|
||||
|
||||
config ARM_MMU_REGION_MIN_ALIGN_AND_SIZE
|
||||
int
|
||||
default 4096
|
||||
help
|
||||
Minimum size (and alignment) of an ARM MMU page.
|
||||
This value should not be modified.
|
||||
|
||||
endif # CPU_HAS_MMU
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,205 +0,0 @@
|
||||
/*
|
||||
* ARMv7 MMU support
|
||||
*
|
||||
* Private data declarations
|
||||
*
|
||||
* Copyright (c) 2021 Weidmueller Interface GmbH & Co. KG
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_ARCH_AARCH32_ARM_MMU_PRIV_H_
|
||||
#define ZEPHYR_ARCH_AARCH32_ARM_MMU_PRIV_H_
|
||||
|
||||
/*
|
||||
* Comp.:
|
||||
* ARM Architecture Reference Manual, ARMv7-A and ARMv7-R edition
|
||||
* ARM document ID DDI0406C Rev. d, March 2018
|
||||
* L1 / L2 page table entry formats and entry type IDs:
|
||||
* Chapter B3.5.1, fig. B3-4 and B3-5, p. B3-1323 f.
|
||||
*/
|
||||
|
||||
#define ARM_MMU_PT_L1_NUM_ENTRIES 4096
|
||||
#define ARM_MMU_PT_L2_NUM_ENTRIES 256
|
||||
|
||||
#define ARM_MMU_PTE_L1_INDEX_PA_SHIFT 20
|
||||
#define ARM_MMU_PTE_L1_INDEX_MASK 0xFFF
|
||||
#define ARM_MMU_PTE_L2_INDEX_PA_SHIFT 12
|
||||
#define ARM_MMU_PTE_L2_INDEX_MASK 0xFF
|
||||
#define ARM_MMU_PT_L2_ADDR_SHIFT 10
|
||||
#define ARM_MMU_PT_L2_ADDR_MASK 0x3FFFFF
|
||||
#define ARM_MMU_PTE_L2_SMALL_PAGE_ADDR_SHIFT 12
|
||||
#define ARM_MMU_PTE_L2_SMALL_PAGE_ADDR_MASK 0xFFFFF
|
||||
#define ARM_MMU_ADDR_BELOW_PAGE_GRAN_MASK 0xFFF
|
||||
|
||||
#define ARM_MMU_PTE_ID_INVALID 0x0
|
||||
#define ARM_MMU_PTE_ID_L2_PT 0x1
|
||||
#define ARM_MMU_PTE_ID_SECTION 0x2
|
||||
#define ARM_MMU_PTE_ID_LARGE_PAGE 0x1
|
||||
#define ARM_MMU_PTE_ID_SMALL_PAGE 0x2
|
||||
|
||||
#define ARM_MMU_PERMS_AP2_DISABLE_WR 0x2
|
||||
#define ARM_MMU_PERMS_AP1_ENABLE_PL0 0x1
|
||||
#define ARM_MMU_TEX2_CACHEABLE_MEMORY 0x4
|
||||
|
||||
#define ARM_MMU_TEX_CACHE_ATTRS_WB_WA 0x1
|
||||
#define ARM_MMU_TEX_CACHE_ATTRS_WT_nWA 0x2
|
||||
#define ARM_MMU_TEX_CACHE_ATTRS_WB_nWA 0x3
|
||||
#define ARM_MMU_C_CACHE_ATTRS_WB_WA 0
|
||||
#define ARM_MMU_B_CACHE_ATTRS_WB_WA 1
|
||||
#define ARM_MMU_C_CACHE_ATTRS_WT_nWA 1
|
||||
#define ARM_MMU_B_CACHE_ATTRS_WT_nWA 0
|
||||
#define ARM_MMU_C_CACHE_ATTRS_WB_nWA 1
|
||||
#define ARM_MMU_B_CACHE_ATTRS_WB_nWA 1
|
||||
|
||||
/*
|
||||
* The following defines might vary if support for CPUs without
|
||||
* the multiprocessor extensions was to be implemented:
|
||||
*/
|
||||
|
||||
#define ARM_MMU_TTBR_IRGN0_BIT_MP_EXT_ONLY BIT(6)
|
||||
#define ARM_MMU_TTBR_NOS_BIT BIT(5)
|
||||
#define ARM_MMU_TTBR_RGN_OUTER_NON_CACHEABLE 0x0
|
||||
#define ARM_MMU_TTBR_RGN_OUTER_WB_WA_CACHEABLE 0x1
|
||||
#define ARM_MMU_TTBR_RGN_OUTER_WT_CACHEABLE 0x2
|
||||
#define ARM_MMU_TTBR_RGN_OUTER_WB_nWA_CACHEABLE 0x3
|
||||
#define ARM_MMU_TTBR_RGN_SHIFT 3
|
||||
#define ARM_MMU_TTBR_SHAREABLE_BIT BIT(1)
|
||||
#define ARM_MMU_TTBR_IRGN1_BIT_MP_EXT_ONLY BIT(0)
|
||||
#define ARM_MMU_TTBR_CACHEABLE_BIT_NON_MP_ONLY BIT(0)
|
||||
|
||||
/* <-- end MP-/non-MP-specific */
|
||||
|
||||
#define ARM_MMU_DOMAIN_OS 0
|
||||
#define ARM_MMU_DOMAIN_DEVICE 1
|
||||
#define ARM_MMU_DACR_ALL_DOMAINS_CLIENT 0x55555555
|
||||
|
||||
#define ARM_MMU_SCTLR_AFE_BIT BIT(29)
|
||||
#define ARM_MMU_SCTLR_TEX_REMAP_ENABLE_BIT BIT(28)
|
||||
#define ARM_MMU_SCTLR_HA_BIT BIT(17)
|
||||
#define ARM_MMU_SCTLR_ICACHE_ENABLE_BIT BIT(12)
|
||||
#define ARM_MMU_SCTLR_DCACHE_ENABLE_BIT BIT(2)
|
||||
#define ARM_MMU_SCTLR_CHK_ALIGN_ENABLE_BIT BIT(1)
|
||||
#define ARM_MMU_SCTLR_MMU_ENABLE_BIT BIT(0)
|
||||
|
||||
#define ARM_MMU_L2_PT_INDEX(pt) ((uint32_t)pt - (uint32_t)l2_page_tables) /\
|
||||
sizeof(struct arm_mmu_l2_page_table);
|
||||
|
||||
union arm_mmu_l1_page_table_entry {
|
||||
struct {
|
||||
uint32_t id : 2; /* [00] */
|
||||
uint32_t bufferable : 1;
|
||||
uint32_t cacheable : 1;
|
||||
uint32_t exec_never : 1;
|
||||
uint32_t domain : 4;
|
||||
uint32_t impl_def : 1;
|
||||
uint32_t acc_perms10 : 2;
|
||||
uint32_t tex : 3;
|
||||
uint32_t acc_perms2 : 1;
|
||||
uint32_t shared : 1;
|
||||
uint32_t not_global : 1;
|
||||
uint32_t zero : 1;
|
||||
uint32_t non_sec : 1;
|
||||
uint32_t base_address : 12; /* [31] */
|
||||
} l1_section_1m;
|
||||
struct {
|
||||
uint32_t id : 2; /* [00] */
|
||||
uint32_t zero0 : 1; /* PXN if avail. */
|
||||
uint32_t non_sec : 1;
|
||||
uint32_t zero1 : 1;
|
||||
uint32_t domain : 4;
|
||||
uint32_t impl_def : 1;
|
||||
uint32_t l2_page_table_address : 22; /* [31] */
|
||||
} l2_page_table_ref;
|
||||
struct {
|
||||
uint32_t id : 2; /* [00] */
|
||||
uint32_t reserved : 30; /* [31] */
|
||||
} undefined;
|
||||
uint32_t word;
|
||||
};
|
||||
|
||||
struct arm_mmu_l1_page_table {
|
||||
union arm_mmu_l1_page_table_entry entries[ARM_MMU_PT_L1_NUM_ENTRIES];
|
||||
};
|
||||
|
||||
union arm_mmu_l2_page_table_entry {
|
||||
struct {
|
||||
uint32_t id : 2; /* [00] */
|
||||
uint32_t bufferable : 1;
|
||||
uint32_t cacheable : 1;
|
||||
uint32_t acc_perms10 : 2;
|
||||
uint32_t tex : 3;
|
||||
uint32_t acc_perms2 : 1;
|
||||
uint32_t shared : 1;
|
||||
uint32_t not_global : 1;
|
||||
uint32_t pa_base : 20; /* [31] */
|
||||
} l2_page_4k;
|
||||
struct {
|
||||
uint32_t id : 2; /* [00] */
|
||||
uint32_t bufferable : 1;
|
||||
uint32_t cacheable : 1;
|
||||
uint32_t acc_perms10 : 2;
|
||||
uint32_t zero : 3;
|
||||
uint32_t acc_perms2 : 1;
|
||||
uint32_t shared : 1;
|
||||
uint32_t not_global : 1;
|
||||
uint32_t tex : 3;
|
||||
uint32_t exec_never : 1;
|
||||
uint32_t pa_base : 16; /* [31] */
|
||||
} l2_page_64k;
|
||||
struct {
|
||||
uint32_t id : 2; /* [00] */
|
||||
uint32_t reserved : 30; /* [31] */
|
||||
} undefined;
|
||||
uint32_t word;
|
||||
};
|
||||
|
||||
struct arm_mmu_l2_page_table {
|
||||
union arm_mmu_l2_page_table_entry entries[ARM_MMU_PT_L2_NUM_ENTRIES];
|
||||
};
|
||||
|
||||
/*
|
||||
* Data structure for L2 table usage tracking, contains a
|
||||
* L1 index reference if the respective L2 table is in use.
|
||||
*/
|
||||
|
||||
struct arm_mmu_l2_page_table_status {
|
||||
uint32_t l1_index : 12;
|
||||
uint32_t entries : 9;
|
||||
uint32_t reserved : 11;
|
||||
};
|
||||
|
||||
/*
|
||||
* Data structure used to describe memory areas defined by the
|
||||
* current Zephyr image, for which an identity mapping (pa = va)
|
||||
* will be set up. Those memory areas are processed during the
|
||||
* MMU initialization.
|
||||
*/
|
||||
struct arm_mmu_flat_range {
|
||||
const char *name;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
uint32_t attrs;
|
||||
};
|
||||
|
||||
/*
|
||||
* Data structure containing the memory attributes and permissions
|
||||
* data derived from a memory region's attr flags word in the format
|
||||
* required for setting up the corresponding PTEs.
|
||||
*/
|
||||
struct arm_mmu_perms_attrs {
|
||||
uint32_t acc_perms : 2;
|
||||
uint32_t bufferable : 1;
|
||||
uint32_t cacheable : 1;
|
||||
uint32_t not_global : 1;
|
||||
uint32_t non_sec : 1;
|
||||
uint32_t shared : 1;
|
||||
uint32_t tex : 3;
|
||||
uint32_t exec_never : 1;
|
||||
uint32_t id_mask : 2;
|
||||
uint32_t domain : 4;
|
||||
uint32_t reserved : 15;
|
||||
};
|
||||
|
||||
#endif /* ZEPHYR_ARCH_AARCH32_ARM_MMU_PRIV_H_ */
|
||||
|
||||
/* EOF */
|
||||
@@ -324,7 +324,7 @@ int arch_mem_domain_max_partitions_get(void)
|
||||
return ARM_CORE_MPU_MAX_DOMAIN_PARTITIONS_GET(available_regions);
|
||||
}
|
||||
|
||||
int arch_buffer_validate(void *addr, size_t size, int write)
|
||||
int arch_buffer_validate(const void *addr, size_t size, bool write)
|
||||
{
|
||||
return arm_core_mpu_buffer_validate(addr, size, write);
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ int arm_core_mpu_get_max_available_dyn_regions(void);
|
||||
* spans multiple enabled MPU regions (even if these regions all
|
||||
* permit user access).
|
||||
*/
|
||||
int arm_core_mpu_buffer_validate(void *addr, size_t size, int write);
|
||||
int arm_core_mpu_buffer_validate(const void *addr, size_t size, bool write);
|
||||
|
||||
#endif /* CONFIG_ARM_MPU */
|
||||
|
||||
|
||||
@@ -146,12 +146,12 @@ void arm_core_mpu_enable(void)
|
||||
{
|
||||
uint32_t val;
|
||||
|
||||
val = __get_SCTLR();
|
||||
val |= SCTLR_MPU_ENABLE;
|
||||
__asm__ volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r" (val) ::);
|
||||
val |= SCTRL_MPU_ENABLE;
|
||||
/* Make sure that all the registers are set before proceeding */
|
||||
__DSB();
|
||||
__set_SCTLR(val);
|
||||
__ISB();
|
||||
__asm__ volatile ("dsb");
|
||||
__asm__ volatile ("mcr p15, 0, %0, c1, c0, 0" :: "r" (val) :);
|
||||
__asm__ volatile ("isb");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,12 +161,12 @@ void arm_core_mpu_disable(void)
|
||||
{
|
||||
uint32_t val;
|
||||
|
||||
val = __get_SCTLR();
|
||||
val &= ~SCTLR_MPU_ENABLE;
|
||||
__asm__ volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r" (val) ::);
|
||||
val &= ~SCTRL_MPU_ENABLE;
|
||||
/* Force any outstanding transfers to complete before disabling MPU */
|
||||
__DSB();
|
||||
__set_SCTLR(val);
|
||||
__ISB();
|
||||
__asm__ volatile ("dsb");
|
||||
__asm__ volatile ("mcr p15, 0, %0, c1, c0, 0" :: "r" (val) :);
|
||||
__asm__ volatile ("isb");
|
||||
}
|
||||
#else
|
||||
/**
|
||||
@@ -253,7 +253,7 @@ int arm_core_mpu_get_max_available_dyn_regions(void)
|
||||
*
|
||||
* Presumes the background mapping is NOT user accessible.
|
||||
*/
|
||||
int arm_core_mpu_buffer_validate(void *addr, size_t size, int write)
|
||||
int arm_core_mpu_buffer_validate(const void *addr, size_t size, bool write)
|
||||
{
|
||||
return mpu_buffer_validate(addr, size, write);
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ static inline int is_user_accessible_region(uint32_t r_index, int write)
|
||||
* This internal function validates whether a given memory buffer
|
||||
* is user accessible or not.
|
||||
*/
|
||||
static inline int mpu_buffer_validate(void *addr, size_t size, int write)
|
||||
static inline int mpu_buffer_validate(const void *addr, size_t size, bool write)
|
||||
{
|
||||
int32_t r_index;
|
||||
int rc = -EPERM;
|
||||
|
||||
@@ -270,7 +270,7 @@ static inline int is_enabled_region(uint32_t index)
|
||||
* in case the fast address range check fails.
|
||||
*
|
||||
*/
|
||||
static inline int mpu_buffer_validate(void *addr, size_t size, int write)
|
||||
static inline int mpu_buffer_validate(const void *addr, size_t size, bool write)
|
||||
{
|
||||
uint32_t _addr = (uint32_t)addr;
|
||||
uint32_t _size = (uint32_t)size;
|
||||
|
||||
@@ -536,7 +536,7 @@ static inline int is_user_accessible_region(uint32_t r_index, int write)
|
||||
/**
|
||||
* @brief validate the given buffer is user accessible or not
|
||||
*/
|
||||
int arm_core_mpu_buffer_validate(void *addr, size_t size, int write)
|
||||
int arm_core_mpu_buffer_validate(const void *addr, size_t size, bool write)
|
||||
{
|
||||
uint8_t r_index;
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ static _NmiHandler_t handler = z_SysNmiOnReset;
|
||||
* The default handler outputs a error message and reboots the target. It is
|
||||
* installed by calling z_arm_nmi_init();
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
static void DefaultHandler(void)
|
||||
@@ -53,6 +54,7 @@ static void DefaultHandler(void)
|
||||
* handler that reboots the target. It should be installed after the console is
|
||||
* initialized.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
void z_arm_nmi_init(void)
|
||||
@@ -68,6 +70,7 @@ void z_arm_nmi_init(void)
|
||||
* handler that reboots. It should be installed after the console is
|
||||
* initialized if it is meant to output to the console.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
void z_NmiHandlerSet(void (*pHandler)(void))
|
||||
@@ -82,6 +85,7 @@ void z_NmiHandlerSet(void (*pHandler)(void))
|
||||
*
|
||||
* Simply call what is installed in 'static void(*handler)(void)'.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
void z_arm_nmi(void)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <kernel_internal.h>
|
||||
#include <linker/linker-defs.h>
|
||||
|
||||
#if defined(CONFIG_ARMV7_R) || defined(CONFIG_ARMV7_A)
|
||||
#if defined(CONFIG_ARMV7_R)
|
||||
#include <aarch32/cortex_a_r/stack.h>
|
||||
#endif
|
||||
|
||||
@@ -166,13 +166,13 @@ static inline void z_arm_floating_point_init(void)
|
||||
#endif /* CONFIG_CPU_HAS_FPU */
|
||||
|
||||
extern FUNC_NORETURN void z_cstart(void);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Prepare to and run C code
|
||||
*
|
||||
* This routine prepares for the execution of and runs C code.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void z_arm_prep_c(void)
|
||||
{
|
||||
@@ -182,7 +182,7 @@ void z_arm_prep_c(void)
|
||||
#endif
|
||||
z_bss_zero();
|
||||
z_data_copy();
|
||||
#if ((defined(CONFIG_ARMV7_R) || defined(CONFIG_ARMV7_A)) && defined(CONFIG_INIT_STACKS))
|
||||
#if defined(CONFIG_ARMV7_R) && defined(CONFIG_INIT_STACKS)
|
||||
z_arm_init_stacks();
|
||||
#endif
|
||||
z_arm_interrupt_init();
|
||||
|
||||
@@ -42,7 +42,7 @@ int arch_swap(unsigned int key)
|
||||
|
||||
/* clear mask or enable all irqs to take a pendsv */
|
||||
irq_unlock(0);
|
||||
#elif defined(CONFIG_CPU_CORTEX_R) || defined(CONFIG_CPU_AARCH32_CORTEX_A)
|
||||
#elif defined(CONFIG_CPU_CORTEX_R)
|
||||
z_arm_cortex_r_svc();
|
||||
irq_unlock(key);
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* @brief Thread context switching for ARM Cortex-M and Cortex-R
|
||||
*
|
||||
* This module implements the routines necessary for thread context switching
|
||||
* on ARM Cortex-A, Cortex-M and Cortex-R CPUs.
|
||||
* on ARM Cortex-M and Cortex-R CPUs.
|
||||
*/
|
||||
|
||||
#include <toolchain.h>
|
||||
@@ -120,7 +120,7 @@ out_fp_endif:
|
||||
* regardless of whether the thread has an active FP context.
|
||||
*/
|
||||
#endif /* CONFIG_FPU_SHARING */
|
||||
#elif defined(CONFIG_ARMV7_R) || defined(CONFIG_ARMV7_A)
|
||||
#elif defined(CONFIG_ARMV7_R)
|
||||
/* Store rest of process context */
|
||||
cps #MODE_SYS
|
||||
stm r0, {r4-r11, sp}
|
||||
@@ -136,7 +136,7 @@ out_fp_endif:
|
||||
movs.n r0, #_EXC_IRQ_DEFAULT_PRIO
|
||||
msr BASEPRI_MAX, r0
|
||||
isb /* Make the effect of disabling interrupts be realized immediately */
|
||||
#elif defined(CONFIG_ARMV7_R) || defined(CONFIG_ARMV7_A)
|
||||
#elif defined(CONFIG_ARMV7_R)
|
||||
/*
|
||||
* Interrupts are still disabled from arch_swap so empty clause
|
||||
* here to avoid the preprocessor error below
|
||||
@@ -344,7 +344,7 @@ in_fp_endif:
|
||||
/* load callee-saved + psp from thread */
|
||||
add r0, r2, #_thread_offset_to_callee_saved
|
||||
ldmia r0, {v1-v8, ip}
|
||||
#elif defined(CONFIG_ARMV7_R) || defined(CONFIG_ARMV7_A)
|
||||
#elif defined(CONFIG_ARMV7_R)
|
||||
_thread_irq_disabled:
|
||||
/* load _kernel into r1 and current k_thread into r2 */
|
||||
ldr r1, =_kernel
|
||||
@@ -413,6 +413,7 @@ _thread_irq_disabled:
|
||||
* - Kernel run-time exceptions
|
||||
* - System Calls (User mode)
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
SECTION_FUNC(TEXT, z_arm_svc)
|
||||
/* Use EXC_RETURN state to find out if stack frame is on the
|
||||
@@ -602,7 +603,7 @@ valid_syscall_id:
|
||||
bx lr
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
||||
#elif defined(CONFIG_ARMV7_R) || defined(CONFIG_ARMV7_A)
|
||||
#elif defined(CONFIG_ARMV7_R)
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -613,6 +614,7 @@ valid_syscall_id:
|
||||
* - IRQ offloading
|
||||
* - Kernel run-time exceptions
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
SECTION_FUNC(TEXT, z_arm_svc)
|
||||
#if defined(CONFIG_USERSPACE)
|
||||
@@ -646,7 +648,6 @@ svc_system_thread:
|
||||
srsdb #MODE_SYS!
|
||||
cps #MODE_SYS
|
||||
push {r0-r3, r12, lr}
|
||||
mov ip, sp
|
||||
cps #MODE_SVC
|
||||
|
||||
/*
|
||||
@@ -724,14 +725,20 @@ _oops:
|
||||
#if defined(CONFIG_USERSPACE)
|
||||
/*
|
||||
* System call will setup a jump to the _do_arm_syscall function
|
||||
* running in system mode when returning from the exception.
|
||||
* when the SVC returns via the bx lr.
|
||||
*
|
||||
* There is some trickery involved here because we have to preserve
|
||||
* the original PC value so that we can return back to the caller of
|
||||
* the SVC.
|
||||
*
|
||||
* On SVC exception, the USER/SYSTEM stack looks like the following:
|
||||
* r0 - r1 - r2 - r3 - r12 - LR - { possible FPU space } - PC - SPSR
|
||||
*
|
||||
* sp+0: r0
|
||||
* sp+4: r1
|
||||
* sp+8: r2
|
||||
* sp+12: r3
|
||||
* sp+16: r12
|
||||
* sp+20: LR_svc (address of opcode just following SVC opcode )
|
||||
*
|
||||
* Registers look like:
|
||||
* r0 - arg1
|
||||
@@ -744,26 +751,6 @@ _oops:
|
||||
* r8 - saved link register
|
||||
*/
|
||||
_do_syscall:
|
||||
ldr r8, [ip, #24] /* grab address of LR from stack frame */
|
||||
|
||||
/* Make the exception return to system state */
|
||||
ldr r1, [ip, #28]
|
||||
|
||||
/* If leaving thumb mode, set the return address to thumb mode */
|
||||
tst r1, #T_BIT
|
||||
orrne r8, #1
|
||||
|
||||
bic r1, #(MODE_MASK | T_BIT)
|
||||
orr r1, r1, #MODE_SYS
|
||||
str r1, [ip, #28]
|
||||
|
||||
/*
|
||||
* Store the address of z_arm_do_syscall for the exit so the exception
|
||||
* return goes there in system state.
|
||||
*/
|
||||
ldr r1, =z_arm_do_syscall
|
||||
str r1, [ip, #24] /* overwrite the LR to point to z_arm_do_syscall */
|
||||
|
||||
/* validate syscall limit, only set priv mode if valid */
|
||||
ldr ip, =K_SYSCALL_LIMIT
|
||||
cmp r6, ip
|
||||
@@ -776,6 +763,7 @@ _do_syscall:
|
||||
ldr r6, =K_SYSCALL_BAD
|
||||
|
||||
valid_syscall_id:
|
||||
push {r0, r1}
|
||||
ldr r0, =_kernel
|
||||
ldr r0, [r0, #_kernel_offset_to_current]
|
||||
ldr r1, [r0, #_thread_offset_to_mode]
|
||||
@@ -790,8 +778,56 @@ valid_syscall_id:
|
||||
*/
|
||||
isb
|
||||
|
||||
/* Return to _arm_do_syscall in system state. */
|
||||
b z_arm_int_exit
|
||||
/*
|
||||
* restore r0-r3 from supervisor stack before changing to system mode.
|
||||
* r0,r1 saved just after valid_syscall_id
|
||||
* r2,r3 saved just after z_arm_svc
|
||||
*/
|
||||
pop {r0-r3}
|
||||
|
||||
add sp,sp,r3 /* un-do stack pointer alignment to double-word boundary */
|
||||
|
||||
/* Switch to system mode */
|
||||
cps #MODE_SYS
|
||||
|
||||
/*
|
||||
* Restore the nested level. The thread that is doing the system call may
|
||||
* be put to sleep, as in the case of waiting in k_msgq_get() with
|
||||
* K_FOREVER, so we don't want the nesting level to be elevated during
|
||||
* that complete time.
|
||||
*/
|
||||
ldr r2, =_kernel
|
||||
ldr r1, [r2, #_kernel_offset_to_nested]
|
||||
sub r1, r1, #1
|
||||
str r1, [r2, #_kernel_offset_to_nested]
|
||||
|
||||
/*
|
||||
* restore r0-r3 from stack since we've used them above during demux
|
||||
*/
|
||||
ldr r0, [sp, #0]
|
||||
ldr r1, [sp, #4]
|
||||
ldr r2, [sp, #8]
|
||||
ldr r3, [sp, #12]
|
||||
|
||||
/*
|
||||
* grab return address from USER/SYSTEM stack frame
|
||||
* (just past the SVC opcode)
|
||||
*/
|
||||
ldr r8, [sp, #20]
|
||||
|
||||
/*
|
||||
* User stack left with:
|
||||
*
|
||||
* sp: r0
|
||||
* sp+4: r1
|
||||
* sp+8: r2
|
||||
* sp+12: r3
|
||||
* sp+16: r12
|
||||
* sp+20: LR_svc (address of opcode just following SVC opcode )
|
||||
*/
|
||||
|
||||
/* branch to _arm_do_syscall. We will not return here. */
|
||||
b z_arm_do_syscall
|
||||
#endif
|
||||
|
||||
GTEXT(z_arm_cortex_r_svc)
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief New thread creation for ARM Cortex-A, Cortex-M and Cortex-R
|
||||
* @brief New thread creation for ARM Cortex-M and Cortex-R
|
||||
*
|
||||
* Core thread related primitives for the ARM Cortex-A, Cortex-M and
|
||||
* Cortex-R processor architecture.
|
||||
* Core thread related primitives for the ARM Cortex-M and Cortex-R
|
||||
* processor architecture.
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
@@ -562,8 +562,7 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
|
||||
|
||||
"movs r1, #0\n\t"
|
||||
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE) \
|
||||
|| defined(CONFIG_ARMV7_R) \
|
||||
|| defined(CONFIG_ARMV7_A)
|
||||
|| defined(CONFIG_ARMV7_R)
|
||||
"cpsie i\n\t" /* __enable_irq() */
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
|
||||
"cpsie if\n\t" /* __enable_irq(); __enable_fault_irq() */
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <arch/arm/aarch32/exc.h>
|
||||
|
||||
#if defined(CONFIG_ARMV7_R)
|
||||
#if defined(CONFIG_CPU_CORTEX_R)
|
||||
#include <arch/cpu.h>
|
||||
#endif
|
||||
|
||||
@@ -63,7 +63,7 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
|
||||
ldr r0, [r0, #_thread_offset_to_priv_stack_start] /* priv stack ptr */
|
||||
ldr ip, =CONFIG_PRIVILEGED_STACK_SIZE
|
||||
add r0, r0, ip
|
||||
#elif defined(CONFIG_ARMV7_R)
|
||||
#elif defined(CONFIG_CPU_CORTEX_R)
|
||||
ldr r0, [r0, #_thread_offset_to_priv_stack_start] /* priv stack ptr */
|
||||
ldr ip, =CONFIG_PRIVILEGED_STACK_SIZE
|
||||
add r0, r0, ip
|
||||
@@ -79,7 +79,7 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
|
||||
*/
|
||||
mov ip, sp
|
||||
|
||||
#if defined(CONFIG_ARMV7_R)
|
||||
#if defined(CONFIG_CPU_CORTEX_R)
|
||||
mov sp, r0
|
||||
#else
|
||||
/* set stack to privileged stack
|
||||
@@ -113,7 +113,7 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
|
||||
mov r1, ip
|
||||
push {r0,r1}
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|
||||
|| defined(CONFIG_ARMV7_R)
|
||||
|| defined(CONFIG_CPU_CORTEX_R)
|
||||
push {r0,ip}
|
||||
#endif
|
||||
|
||||
@@ -145,7 +145,7 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
|
||||
|
||||
push {r0,r3}
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|
||||
|| defined(CONFIG_ARMV7_R)
|
||||
|| defined(CONFIG_CPU_CORTEX_R)
|
||||
pop {r0,ip}
|
||||
|
||||
/* load up stack info from user stack */
|
||||
@@ -169,7 +169,7 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
|
||||
pop {r0, r1}
|
||||
mov ip, r1
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|
||||
|| defined(CONFIG_ARMV7_R)
|
||||
|| defined(CONFIG_CPU_CORTEX_R)
|
||||
pop {r0,ip}
|
||||
#endif
|
||||
|
||||
@@ -184,11 +184,11 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
|
||||
mov lr, r4
|
||||
mov r4, ip
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|
||||
|| defined(CONFIG_ARMV7_R)
|
||||
|| defined(CONFIG_CPU_CORTEX_R)
|
||||
pop {r1,r2,r3,lr}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARMV7_R)
|
||||
#if defined(CONFIG_CPU_CORTEX_R)
|
||||
/*
|
||||
* set stack to user stack. We are in SYSTEM state, so r13 and r14 are
|
||||
* shared with USER state
|
||||
@@ -244,7 +244,7 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
|
||||
/* restore r0 */
|
||||
mov r0, lr
|
||||
|
||||
#if defined(CONFIG_ARMV7_R)
|
||||
#if defined(CONFIG_CPU_CORTEX_R)
|
||||
/* change processor mode to unprivileged, with all interrrupts enabled. */
|
||||
msr CPSR_c, #MODE_USR
|
||||
#else
|
||||
@@ -296,7 +296,7 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
|
||||
mov ip, r0
|
||||
pop {r0, r1}
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|
||||
|| defined(CONFIG_ARMV7_R)
|
||||
|| defined(CONFIG_CPU_CORTEX_R)
|
||||
ldr ip, =z_thread_entry
|
||||
#endif
|
||||
bx ip
|
||||
@@ -351,7 +351,7 @@ SECTION_FUNC(TEXT, z_arm_do_syscall)
|
||||
/* Restore user stack and original r0, r1 */
|
||||
pop {r0, r1}
|
||||
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|
||||
/* setup privileged stack */
|
||||
ldr ip, =_kernel
|
||||
ldr ip, [ip, #_kernel_offset_to_current]
|
||||
@@ -362,19 +362,16 @@ SECTION_FUNC(TEXT, z_arm_do_syscall)
|
||||
subs ip, #8
|
||||
str sp, [ip, #0]
|
||||
str lr, [ip, #4]
|
||||
#elif defined(CONFIG_ARMV7_R)
|
||||
/*
|
||||
* The SVC handler has already switched to the privileged stack.
|
||||
* Store the user SP and LR at the beginning of the priv stack.
|
||||
*/
|
||||
ldr ip, =_kernel
|
||||
ldr ip, [ip, #_kernel_offset_to_current]
|
||||
ldr ip, [ip, #_thread_offset_to_sp_usr]
|
||||
push {ip, lr}
|
||||
#elif defined(CONFIG_CPU_CORTEX_R)
|
||||
/* Store current LR at the beginning of the priv stack */
|
||||
push {lr}
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_ARMV7_R)
|
||||
/* switch to privileged stack */
|
||||
#if !defined(CONFIG_CPU_CORTEX_R)
|
||||
/*
|
||||
* switch to privileged stack
|
||||
* The stack switch happens on exception entry for Cortex-R
|
||||
*/
|
||||
msr PSP, ip
|
||||
#endif
|
||||
|
||||
@@ -449,7 +446,7 @@ dispatch_syscall:
|
||||
mov r0, ip
|
||||
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|
||||
|| defined(CONFIG_ARMV7_R)
|
||||
|| defined(CONFIG_CPU_CORTEX_R)
|
||||
ldr ip, =K_SYSCALL_BAD
|
||||
cmp r6, ip
|
||||
bne valid_syscall
|
||||
@@ -457,7 +454,11 @@ dispatch_syscall:
|
||||
/* BAD SYSCALL path */
|
||||
/* fixup stack frame on the privileged stack, adding ssf */
|
||||
mov ip, sp
|
||||
#if defined(CONFIG_CPU_CORTEX_R)
|
||||
push {r4,r5,ip}
|
||||
#else
|
||||
push {r4,r5,ip,lr}
|
||||
#endif
|
||||
b dispatch_syscall
|
||||
|
||||
valid_syscall:
|
||||
@@ -471,13 +472,36 @@ dispatch_syscall:
|
||||
add ip, r6
|
||||
ldr ip, [ip] /* load table address */
|
||||
|
||||
#if defined(CONFIG_CPU_CORTEX_R)
|
||||
/*
|
||||
* We can only be in this system call handling code if interrupts were
|
||||
* enabled. This is because we would only come down this path if we were
|
||||
* actively running in user state, and user state CANNOT disable external
|
||||
* interrupts via irq_lock(). We want external interrupts enabled while
|
||||
* running the system call handler, so we can blindly enable them now, and
|
||||
* disable them afterwards.
|
||||
*/
|
||||
cpsie i
|
||||
#endif
|
||||
|
||||
/* execute function from dispatch table */
|
||||
blx ip
|
||||
|
||||
#if defined(CONFIG_CPU_CORTEX_R)
|
||||
/*
|
||||
* for same reasoning as above: we now disable external interrupts.
|
||||
*/
|
||||
cpsid i
|
||||
|
||||
/* restore LR */
|
||||
ldr lr, [sp,#12]
|
||||
#else
|
||||
/* restore LR */
|
||||
ldr lr, [sp,#16]
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CONFIG_BUILTIN_STACK_GUARD)
|
||||
/*
|
||||
@@ -521,7 +545,7 @@ dispatch_syscall:
|
||||
/* Restore r0 */
|
||||
mov r0, ip
|
||||
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|
||||
/* set stack back to unprivileged stack */
|
||||
ldr ip, [sp,#12]
|
||||
msr PSP, ip
|
||||
@@ -550,8 +574,7 @@ dispatch_syscall:
|
||||
orrs r2, r2, r3
|
||||
msr CONTROL, r2
|
||||
pop {r2, r3}
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|
||||
|| defined(CONFIG_ARMV7_R)
|
||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
|
||||
ldr r0, =_kernel
|
||||
ldr r0, [r0, #_kernel_offset_to_current]
|
||||
ldr r1, [r0, #_thread_offset_to_mode]
|
||||
@@ -559,12 +582,10 @@ dispatch_syscall:
|
||||
/* Store (unprivileged) mode in thread's mode state variable */
|
||||
str r1, [r0, #_thread_offset_to_mode]
|
||||
dsb
|
||||
#if defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
|
||||
/* drop privileges by setting bit 0 in CONTROL */
|
||||
mrs ip, CONTROL
|
||||
orrs ip, ip, #1
|
||||
msr CONTROL, ip
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ISB is not strictly necessary here (stack pointer is not being
|
||||
@@ -615,10 +636,42 @@ dispatch_syscall:
|
||||
*/
|
||||
mov ip, r8
|
||||
orrs ip, ip, #1
|
||||
#elif defined(CONFIG_ARMV7_R)
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CPU_CORTEX_R)
|
||||
/*
|
||||
* The stack contains (from top)
|
||||
* spsr lr lr_svc r12 r3 r2 r1 r0 lr sp r5 r4
|
||||
* Unwind everything except the return state that will be used for rfeia.
|
||||
*/
|
||||
add sp, sp, #(8*4)
|
||||
ldmia sp!, {r12,lr}
|
||||
pop {r2, r3}
|
||||
|
||||
cps #MODE_SVC
|
||||
|
||||
/*
|
||||
* Restore lr_svc stored into the SVC mode stack by the mode entry
|
||||
* function. This ensures that the return address of the interrupted
|
||||
* context is preserved in case of interrupt nesting.
|
||||
*/
|
||||
pop {lr}
|
||||
|
||||
/*
|
||||
* Move the return state from the privileged stack to the service
|
||||
* stack. We need to put the user stack back in $sp, but we cannot
|
||||
* trust the user stack. Therefore, put the return state on the svc
|
||||
* stack and return from there.
|
||||
*/
|
||||
push {r2, r3}
|
||||
|
||||
/* Restore user stack pointer */
|
||||
ldr ip, [sp,#12]
|
||||
mov sp, ip
|
||||
ldr r1, =_kernel
|
||||
ldr r1, [r1, #_kernel_offset_to_current]
|
||||
cps #MODE_SYS
|
||||
ldr sp, [r1, #_thread_offset_to_sp_usr] /* sp_usr */
|
||||
cps #MODE_SVC
|
||||
|
||||
/* Zero out volatile (caller-saved) registers so as to not leak state from
|
||||
* kernel mode. The C calling convention for the syscall handler will
|
||||
@@ -628,14 +681,11 @@ dispatch_syscall:
|
||||
mov r2, #0
|
||||
mov r3, #0
|
||||
|
||||
/*
|
||||
* return back to original function that called SVC
|
||||
*/
|
||||
mov ip, r8
|
||||
cps #MODE_USR
|
||||
#endif
|
||||
|
||||
/* return from SVC state to user state. */
|
||||
rfeia sp!
|
||||
#else
|
||||
bx ip
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
@@ -662,7 +712,7 @@ z_arm_user_string_nlen_fault_start:
|
||||
ldrb r5, [r0, r3]
|
||||
|
||||
z_arm_user_string_nlen_fault_end:
|
||||
#if defined(CONFIG_ARMV7_R)
|
||||
#if defined(CONFIG_CPU_CORTEX_R)
|
||||
cmp r5, #0
|
||||
beq strlen_done
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ static ALWAYS_INLINE bool z_arm_preempted_thread_in_user_mode(const z_arch_esf_t
|
||||
*
|
||||
* Enable fault exceptions.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static ALWAYS_INLINE void z_arm_exc_setup(void)
|
||||
{
|
||||
@@ -69,6 +70,7 @@ static ALWAYS_INLINE void z_arm_exc_setup(void)
|
||||
*
|
||||
* Clear out exceptions for Mem, Bus, Usage and Hard Faults
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static ALWAYS_INLINE void z_arm_clear_faults(void)
|
||||
{
|
||||
|
||||
@@ -30,8 +30,9 @@ extern void z_arm_init_stacks(void);
|
||||
*
|
||||
* @brief Setup interrupt stack
|
||||
*
|
||||
* On Cortex-A and Cortex-R, the interrupt stack is set up by reset.S
|
||||
* On Cortex-R, the interrupt stack is set up by reset.S
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static ALWAYS_INLINE void z_arm_interrupt_stack_setup(void)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@ extern "C" {
|
||||
*
|
||||
* This function shall only be called in Privileged mode.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void z_arm_tcm_disable_ecc(void);
|
||||
|
||||
|
||||
@@ -99,10 +99,8 @@ static inline int z_arm_dwt_init_cycle_counter(void)
|
||||
DWT->CYCCNT = 0;
|
||||
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
|
||||
|
||||
/* Assert that the cycle counter is indeed implemented.
|
||||
* The field is called NOCYCCNT. So 1 means there is no cycle counter.
|
||||
*/
|
||||
__ASSERT((DWT->CTRL & DWT_CTRL_NOCYCCNT_Msk) == 0,
|
||||
/* Assert that the cycle counter is indeed implemented. */
|
||||
__ASSERT((DWT->CTRL & DWT_CTRL_NOCYCCNT_Msk) != 0,
|
||||
"DWT implements no cycle counter. "
|
||||
"Cannot be used for cycle counting\n");
|
||||
|
||||
@@ -125,6 +123,8 @@ static inline uint32_t z_arm_dwt_get_cycles(void)
|
||||
* @brief Reset and start the DWT cycle counter
|
||||
*
|
||||
* This routine starts the cycle counter and resets its value to zero.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void z_arm_dwt_cycle_count_start(void)
|
||||
{
|
||||
@@ -138,6 +138,8 @@ static inline void z_arm_dwt_cycle_count_start(void)
|
||||
* This routine enables the DebugMonitor handler to service
|
||||
* data watchpoint events coming from DWT. The routine sets
|
||||
* the DebugMonitor exception priority to highest possible.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static inline void z_arm_dwt_enable_debug_monitor(void)
|
||||
{
|
||||
|
||||
@@ -93,6 +93,8 @@ static ALWAYS_INLINE bool z_arm_preempted_thread_in_user_mode(const z_arch_esf_t
|
||||
* Set PendSV priority to lowest possible.
|
||||
*
|
||||
* Enable fault exceptions.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static ALWAYS_INLINE void z_arm_exc_setup(void)
|
||||
{
|
||||
@@ -165,6 +167,8 @@ static ALWAYS_INLINE void z_arm_exc_setup(void)
|
||||
* @brief Clear Fault exceptions
|
||||
*
|
||||
* Clear out exceptions for Mem, Bus, Usage and Hard Faults
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static ALWAYS_INLINE void z_arm_clear_faults(void)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
K_KERNEL_STACK_ARRAY_EXTERN(z_interrupt_stacks, CONFIG_MP_NUM_CPUS,
|
||||
extern K_KERNEL_STACK_ARRAY_DEFINE(z_interrupt_stacks, CONFIG_MP_NUM_CPUS,
|
||||
CONFIG_ISR_STACK_SIZE);
|
||||
|
||||
/**
|
||||
@@ -36,6 +36,7 @@ K_KERNEL_STACK_ARRAY_EXTERN(z_interrupt_stacks, CONFIG_MP_NUM_CPUS,
|
||||
* On Cortex-M, the interrupt stack is registered in the MSP (main stack
|
||||
* pointer) register, and switched to automatically when taking an exception.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static ALWAYS_INLINE void z_arm_interrupt_stack_setup(void)
|
||||
{
|
||||
|
||||
@@ -63,6 +63,7 @@ typedef struct tz_nonsecure_setup_conf {
|
||||
* This function shall be called before the Secure Firmware may transition
|
||||
* to Non-Secure state.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void tz_nonsecure_state_setup(const tz_nonsecure_setup_conf_t *p_ns_conf);
|
||||
|
||||
@@ -81,6 +82,7 @@ void tz_nonsecure_state_setup(const tz_nonsecure_setup_conf_t *p_ns_conf);
|
||||
* This function shall only be called from Secure state.
|
||||
* Only ARMv8-M Mainline implementations have Non-Secure MSPLIM instance.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void tz_nonsecure_msplim_set(uint32_t val);
|
||||
|
||||
@@ -97,6 +99,7 @@ void tz_nonsecure_msplim_set(uint32_t val);
|
||||
* This function shall only be called from Secure state.
|
||||
* Only ARMv8-M Mainline implementations have Non-Secure PSPLIM instance.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void tz_nonsecure_psplim_set(uint32_t val);
|
||||
|
||||
@@ -114,6 +117,8 @@ void tz_nonsecure_psplim_set(uint32_t val);
|
||||
* Note:
|
||||
*
|
||||
* This function shall only be called from Secure state.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void tz_nonsecure_system_reset_req_block(int block);
|
||||
|
||||
@@ -129,6 +134,8 @@ void tz_nonsecure_system_reset_req_block(int block);
|
||||
* Note:
|
||||
*
|
||||
* This function shall only be called from Secure state.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void tz_nonsecure_exception_prio_config(int secure_boost);
|
||||
|
||||
@@ -155,6 +162,8 @@ void tz_nonsecure_exception_prio_config(int secure_boost);
|
||||
* - If secure_state is set to 1 (Secure), all Non-Secure HardFaults are
|
||||
* escalated to Secure HardFaults.
|
||||
* - BusFault is present only if the Main Extension is implemented.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void tz_nbanked_exception_target_state_set(int secure_state);
|
||||
|
||||
@@ -169,6 +178,8 @@ void tz_nbanked_exception_target_state_set(int secure_state);
|
||||
* Note:
|
||||
*
|
||||
* This function shall only be called from Secure state.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void tz_nonsecure_fpu_access_enable(void);
|
||||
#endif /* CONFIG_ARMV7_M_ARMV8_M_FP */
|
||||
@@ -198,6 +209,7 @@ void tz_nonsecure_fpu_access_enable(void);
|
||||
* This function shall be called before the Secure Firmware may transition
|
||||
* to Non-Secure state.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void tz_sau_configure(int enable, int allns);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
"pop {r0-r3}\n\t" \
|
||||
load_lr "\n\t" \
|
||||
::); \
|
||||
} while (0)
|
||||
} while (false)
|
||||
|
||||
/**
|
||||
* @brief Macro for "sandwiching" a function call (@p name) in two other calls
|
||||
|
||||
@@ -35,9 +35,6 @@ extern void z_arm_configure_static_mpu_regions(void);
|
||||
extern void z_arm_configure_dynamic_mpu_regions(struct k_thread *thread);
|
||||
extern int z_arm_mpu_init(void);
|
||||
#endif /* CONFIG_ARM_MPU */
|
||||
#ifdef CONFIG_ARM_AARCH32_MMU
|
||||
extern int z_arm_mmu_init(void);
|
||||
#endif /* CONFIG_ARM_AARCH32_MMU */
|
||||
|
||||
static ALWAYS_INLINE void arch_kernel_init(void)
|
||||
{
|
||||
@@ -55,10 +52,7 @@ static ALWAYS_INLINE void arch_kernel_init(void)
|
||||
* This function is invoked once, upon system initialization.
|
||||
*/
|
||||
z_arm_configure_static_mpu_regions();
|
||||
#endif /* CONFIG_ARM_MPU */
|
||||
#if defined(CONFIG_ARM_AARCH32_MMU)
|
||||
z_arm_mmu_init();
|
||||
#endif /* CONFIG_ARM_AARCH32_MMU */
|
||||
#endif
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE void
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#if defined(CONFIG_CPU_CORTEX_M)
|
||||
#include <aarch32/cortex_m/stack.h>
|
||||
#include <aarch32/cortex_m/exc.h>
|
||||
#elif defined(CONFIG_CPU_CORTEX_R) || defined(CONFIG_CPU_AARCH32_CORTEX_A)
|
||||
#elif defined(CONFIG_CPU_CORTEX_R)
|
||||
#include <aarch32/cortex_a_r/stack.h>
|
||||
#include <aarch32/cortex_a_r/exc.h>
|
||||
#endif
|
||||
|
||||
@@ -17,7 +17,6 @@ zephyr_library_sources(
|
||||
|
||||
zephyr_library_sources_ifdef(CONFIG_FPU_SHARING fpu.c fpu.S)
|
||||
zephyr_library_sources_ifdef(CONFIG_ARM_MMU mmu.c mmu.S)
|
||||
zephyr_library_sources_ifdef(CONFIG_ARM_MPU cortex_r/arm_mpu.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_USERSPACE userspace.S)
|
||||
zephyr_library_sources_ifdef(CONFIG_GEN_SW_ISR_TABLE isr_wrapper.S)
|
||||
zephyr_library_sources_ifdef(CONFIG_IRQ_OFFLOAD irq_offload.c)
|
||||
@@ -29,6 +28,6 @@ if ((CONFIG_MP_NUM_CPUS GREATER 1) OR (CONFIG_SMP))
|
||||
zephyr_library_sources(smp.c)
|
||||
endif ()
|
||||
|
||||
zephyr_cc_option_ifdef(CONFIG_USERSPACE -mno-outline-atomics)
|
||||
add_subdirectory_ifdef(CONFIG_ARM_MPU cortex_r/mpu)
|
||||
|
||||
add_subdirectory_ifdef(CONFIG_SOC_XENVM xen)
|
||||
zephyr_cc_option_ifdef(CONFIG_USERSPACE -mno-outline-atomics)
|
||||
|
||||
@@ -104,7 +104,6 @@ config ARMV8_A
|
||||
select ATOMIC_OPERATIONS_BUILTIN
|
||||
select CPU_HAS_MMU
|
||||
select ARCH_HAS_USERSPACE if ARM_MMU
|
||||
select ARCH_HAS_NOCACHE_MEMORY_SUPPORT if ARM_MMU
|
||||
help
|
||||
This option signifies the use of an ARMv8-A processor
|
||||
implementation.
|
||||
@@ -128,7 +127,6 @@ config ARMV8_R
|
||||
bool
|
||||
select ATOMIC_OPERATIONS_BUILTIN
|
||||
select SCHED_IPI_SUPPORTED if SMP
|
||||
select ARCH_HAS_USERSPACE if ARM_MPU
|
||||
help
|
||||
This option signifies the use of an ARMv8-R processor
|
||||
implementation.
|
||||
@@ -139,7 +137,7 @@ config ARMV8_R
|
||||
Protected Memory System Architecture (PMSA) based on a Memory Protection
|
||||
Unit (MPU). It supports the A32 and T32 instruction sets.
|
||||
|
||||
rsource "cortex_r/Kconfig"
|
||||
rsource "cortex_r/mpu/Kconfig"
|
||||
|
||||
endif # CPU_AARCH64_CORTEX_R
|
||||
|
||||
|
||||
@@ -1,552 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 Linaro Limited.
|
||||
* Copyright (c) 2021 Arm Limited (or its affiliates). All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <device.h>
|
||||
#include <init.h>
|
||||
#include <kernel.h>
|
||||
#include <soc.h>
|
||||
#include <arch/arm64/mm.h>
|
||||
#include <linker/linker-defs.h>
|
||||
#include <logging/log.h>
|
||||
#include <sys/check.h>
|
||||
|
||||
LOG_MODULE_REGISTER(mpu, CONFIG_MPU_LOG_LEVEL);
|
||||
|
||||
#define MPU_DYNAMIC_REGION_AREAS_NUM 1
|
||||
|
||||
#define _MAX_DYNAMIC_MPU_REGIONS_NUM \
|
||||
((IS_ENABLED(CONFIG_USERSPACE) ? (CONFIG_MAX_DOMAIN_PARTITIONS + 1) : 0) + \
|
||||
(IS_ENABLED(CONFIG_MPU_STACK_GUARD) ? 1 : 0))
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
static int dynamic_areas_init(uintptr_t start, size_t size);
|
||||
#define MPU_DYNAMIC_REGIONS_AREA_START ((uintptr_t)&_app_smem_start)
|
||||
#else
|
||||
#define MPU_DYNAMIC_REGIONS_AREA_START ((uintptr_t)&__kernel_ram_start)
|
||||
#endif
|
||||
#define MPU_DYNAMIC_REGIONS_AREA_SIZE \
|
||||
((size_t)((uintptr_t)&__kernel_ram_end - MPU_DYNAMIC_REGIONS_AREA_START))
|
||||
|
||||
/*
|
||||
* AArch64 Memory Model Feature Register 0
|
||||
* Provides information about the implemented memory model and memory
|
||||
* management support in AArch64 state.
|
||||
* See Arm Architecture Reference Manual Supplement
|
||||
* Armv8, for Armv8-R AArch64 architecture profile, G1.3.7
|
||||
*
|
||||
* ID_AA64MMFR0_MSA_FRAC, bits[55:52]
|
||||
* ID_AA64MMFR0_MSA, bits [51:48]
|
||||
*/
|
||||
#define ID_AA64MMFR0_MSA_msk (0xFFUL << 48U)
|
||||
#define ID_AA64MMFR0_PMSA_EN (0x1FUL << 48U)
|
||||
#define ID_AA64MMFR0_PMSA_VMSA_EN (0x2FUL << 48U)
|
||||
|
||||
/*
|
||||
* Global status variable holding the number of HW MPU region indices, which
|
||||
* have been reserved by the MPU driver to program the static (fixed) memory
|
||||
* regions.
|
||||
*/
|
||||
static uint8_t static_regions_num;
|
||||
|
||||
/* Get the number of supported MPU regions. */
|
||||
static inline uint8_t get_num_regions(void)
|
||||
{
|
||||
uint64_t type;
|
||||
|
||||
type = read_mpuir_el1();
|
||||
type = type & MPU_IR_REGION_Msk;
|
||||
|
||||
return (uint8_t)type;
|
||||
}
|
||||
|
||||
/* ARM Core MPU Driver API Implementation for ARM MPU */
|
||||
|
||||
/**
|
||||
* @brief enable the MPU
|
||||
*/
|
||||
void arm_core_mpu_enable(void)
|
||||
{
|
||||
uint64_t val;
|
||||
|
||||
val = read_sctlr_el1();
|
||||
val |= SCTLR_M_BIT;
|
||||
write_sctlr_el1(val);
|
||||
dsb();
|
||||
isb();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief disable the MPU
|
||||
*/
|
||||
void arm_core_mpu_disable(void)
|
||||
{
|
||||
uint64_t val;
|
||||
|
||||
/* Force any outstanding transfers to complete before disabling MPU */
|
||||
dmb();
|
||||
|
||||
val = read_sctlr_el1();
|
||||
val &= ~SCTLR_M_BIT;
|
||||
write_sctlr_el1(val);
|
||||
dsb();
|
||||
isb();
|
||||
}
|
||||
|
||||
/* ARM MPU Driver Initial Setup
|
||||
*
|
||||
* Configure the cache-ability attributes for all the
|
||||
* different types of memory regions.
|
||||
*/
|
||||
static void mpu_init(void)
|
||||
{
|
||||
/* Device region(s): Attribute-0
|
||||
* Flash region(s): Attribute-1
|
||||
* SRAM region(s): Attribute-2
|
||||
* SRAM no cache-able regions(s): Attribute-3
|
||||
*/
|
||||
uint64_t mair = MPU_MAIR_ATTRS;
|
||||
|
||||
write_mair_el1(mair);
|
||||
dsb();
|
||||
isb();
|
||||
}
|
||||
|
||||
static inline void mpu_set_region(uint32_t rnr, uint64_t rbar,
|
||||
uint64_t rlar)
|
||||
{
|
||||
write_prselr_el1(rnr);
|
||||
dsb();
|
||||
write_prbar_el1(rbar);
|
||||
write_prlar_el1(rlar);
|
||||
dsb();
|
||||
isb();
|
||||
}
|
||||
|
||||
/* This internal functions performs MPU region initialization. */
|
||||
static void region_init(const uint32_t index,
|
||||
const struct arm_mpu_region *region_conf)
|
||||
{
|
||||
uint64_t rbar = region_conf->base & MPU_RBAR_BASE_Msk;
|
||||
uint64_t rlar = (region_conf->limit - 1) & MPU_RLAR_LIMIT_Msk;
|
||||
|
||||
rbar |= region_conf->attr.rbar &
|
||||
(MPU_RBAR_XN_Msk | MPU_RBAR_AP_Msk | MPU_RBAR_SH_Msk);
|
||||
rlar |= (region_conf->attr.mair_idx << MPU_RLAR_AttrIndx_Pos) &
|
||||
MPU_RLAR_AttrIndx_Msk;
|
||||
rlar |= MPU_RLAR_EN_Msk;
|
||||
|
||||
mpu_set_region(index, rbar, rlar);
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief MPU default configuration
|
||||
*
|
||||
* This function here provides the default configuration mechanism
|
||||
* for the Memory Protection Unit (MPU).
|
||||
*/
|
||||
void z_arm64_mm_init(bool is_primary_core)
|
||||
{
|
||||
/* This param is only for compatibility with the MMU init */
|
||||
ARG_UNUSED(is_primary_core);
|
||||
uint64_t val;
|
||||
uint32_t r_index;
|
||||
|
||||
/* Current MPU code supports only EL1 */
|
||||
val = read_currentel();
|
||||
__ASSERT(GET_EL(val) == MODE_EL1,
|
||||
"Exception level not EL1, MPU not enabled!\n");
|
||||
|
||||
/* Check whether the processor supports MPU */
|
||||
val = read_id_aa64mmfr0_el1() & ID_AA64MMFR0_MSA_msk;
|
||||
if ((val != ID_AA64MMFR0_PMSA_EN) &&
|
||||
(val != ID_AA64MMFR0_PMSA_VMSA_EN)) {
|
||||
__ASSERT(0, "MPU not supported!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (mpu_config.num_regions > get_num_regions()) {
|
||||
/* Attempt to configure more MPU regions than
|
||||
* what is supported by hardware. As this operation
|
||||
* is executed during system (pre-kernel) initialization,
|
||||
* we want to ensure we can detect an attempt to
|
||||
* perform invalid configuration.
|
||||
*/
|
||||
__ASSERT(0,
|
||||
"Request to configure: %u regions (supported: %u)\n",
|
||||
mpu_config.num_regions,
|
||||
get_num_regions());
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_DBG("total region count: %d", get_num_regions());
|
||||
|
||||
arm_core_mpu_disable();
|
||||
|
||||
/* Architecture-specific configuration */
|
||||
mpu_init();
|
||||
|
||||
/* Program fixed regions configured at SOC definition. */
|
||||
for (r_index = 0U; r_index < mpu_config.num_regions; r_index++) {
|
||||
region_init(r_index, &mpu_config.mpu_regions[r_index]);
|
||||
}
|
||||
|
||||
/* Update the number of programmed MPU regions. */
|
||||
static_regions_num = mpu_config.num_regions;
|
||||
|
||||
arm_core_mpu_enable();
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
int rc = dynamic_areas_init(MPU_DYNAMIC_REGIONS_AREA_START,
|
||||
MPU_DYNAMIC_REGIONS_AREA_SIZE);
|
||||
if (rc <= 0) {
|
||||
__ASSERT(0, "Dynamic areas init fail");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
|
||||
struct dynamic_region_info {
|
||||
int index;
|
||||
struct arm_mpu_region region_conf;
|
||||
};
|
||||
|
||||
static struct dynamic_region_info sys_dyn_regions[MPU_DYNAMIC_REGION_AREAS_NUM];
|
||||
static int sys_dyn_regions_num;
|
||||
|
||||
static int dynamic_areas_init(uintptr_t start, size_t size)
|
||||
{
|
||||
const struct arm_mpu_region *region;
|
||||
struct dynamic_region_info *tmp_info;
|
||||
|
||||
uint64_t base = start;
|
||||
uint64_t limit = base + size;
|
||||
|
||||
if (sys_dyn_regions_num + 1 > MPU_DYNAMIC_REGION_AREAS_NUM) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < mpu_config.num_regions; i++) {
|
||||
region = &mpu_config.mpu_regions[i];
|
||||
tmp_info = &sys_dyn_regions[sys_dyn_regions_num];
|
||||
if (base >= region->base && limit <= region->limit) {
|
||||
tmp_info->index = i;
|
||||
tmp_info->region_conf = *region;
|
||||
return ++sys_dyn_regions_num;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int dup_dynamic_regions(struct dynamic_region_info *dst, int len)
|
||||
{
|
||||
size_t i;
|
||||
int ret = sys_dyn_regions_num;
|
||||
|
||||
CHECKIF(!(sys_dyn_regions_num < len)) {
|
||||
LOG_ERR("system dynamic region nums too large.");
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; i < sys_dyn_regions_num; i++) {
|
||||
dst[i] = sys_dyn_regions[i];
|
||||
}
|
||||
for (; i < len; i++) {
|
||||
dst[i].index = -1;
|
||||
}
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void set_region(struct arm_mpu_region *region,
|
||||
uint64_t base, uint64_t limit,
|
||||
struct arm_mpu_region_attr *attr)
|
||||
{
|
||||
region->base = base;
|
||||
region->limit = limit;
|
||||
region->attr = *attr;
|
||||
}
|
||||
|
||||
static int get_underlying_region_idx(struct dynamic_region_info *dyn_regions,
|
||||
uint8_t region_num, uint64_t base,
|
||||
uint64_t limit)
|
||||
{
|
||||
for (size_t idx = 0; idx < region_num; idx++) {
|
||||
struct arm_mpu_region *region = &(dyn_regions[idx].region_conf);
|
||||
|
||||
if (base >= region->base && limit <= region->limit) {
|
||||
return idx;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int insert_region(struct dynamic_region_info *dyn_regions,
|
||||
uint8_t region_idx, uint8_t region_num,
|
||||
uintptr_t start, size_t size,
|
||||
struct arm_mpu_region_attr *attr)
|
||||
{
|
||||
|
||||
/* base: inclusive, limit: exclusive */
|
||||
uint64_t base = (uint64_t)start;
|
||||
uint64_t limit = base + size;
|
||||
int u_idx;
|
||||
struct arm_mpu_region *u_region;
|
||||
uint64_t u_base;
|
||||
uint64_t u_limit;
|
||||
struct arm_mpu_region_attr *u_attr;
|
||||
int ret = 0;
|
||||
|
||||
CHECKIF(!(region_idx < region_num)) {
|
||||
LOG_ERR("Out-of-bounds error for dynamic region map. "
|
||||
"region idx: %d, region num: %d",
|
||||
region_idx, region_num);
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
u_idx = get_underlying_region_idx(dyn_regions, region_idx, base, limit);
|
||||
|
||||
CHECKIF(!(u_idx >= 0)) {
|
||||
LOG_ERR("Invalid underlying region index");
|
||||
ret = -ENOENT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Get underlying region range and attr */
|
||||
u_region = &(dyn_regions[u_idx].region_conf);
|
||||
u_base = u_region->base;
|
||||
u_limit = u_region->limit;
|
||||
u_attr = &u_region->attr;
|
||||
|
||||
/* Temporally holding new region available to be configured */
|
||||
struct arm_mpu_region *curr_region = &(dyn_regions[region_idx].region_conf);
|
||||
|
||||
if (base == u_base && limit == u_limit) {
|
||||
/*
|
||||
* The new region overlaps entirely with the
|
||||
* underlying region. Simply update the attr.
|
||||
*/
|
||||
set_region(u_region, base, limit, attr);
|
||||
} else if (base == u_base) {
|
||||
set_region(curr_region, base, limit, attr);
|
||||
set_region(u_region, limit, u_limit, u_attr);
|
||||
region_idx++;
|
||||
} else if (limit == u_limit) {
|
||||
set_region(u_region, u_base, base, u_attr);
|
||||
set_region(curr_region, base, limit, attr);
|
||||
region_idx++;
|
||||
} else {
|
||||
set_region(u_region, u_base, base, u_attr);
|
||||
set_region(curr_region, base, limit, attr);
|
||||
region_idx++;
|
||||
curr_region = &(dyn_regions[region_idx].region_conf);
|
||||
set_region(curr_region, limit, u_limit, u_attr);
|
||||
region_idx++;
|
||||
}
|
||||
|
||||
ret = region_idx;
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int flush_dynamic_regions_to_mpu(struct dynamic_region_info *dyn_regions,
|
||||
uint8_t region_num)
|
||||
{
|
||||
int reg_avail_idx = static_regions_num;
|
||||
int ret = 0;
|
||||
|
||||
/*
|
||||
* Clean the dynamic regions
|
||||
*/
|
||||
for (size_t i = reg_avail_idx; i < get_num_regions(); i++) {
|
||||
mpu_set_region(i, 0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* flush the dyn_regions to MPU
|
||||
*/
|
||||
for (size_t i = 0; i < region_num; i++) {
|
||||
int region_idx = dyn_regions[i].index;
|
||||
/*
|
||||
* dyn_regions has two types of regions:
|
||||
* 1) The fixed dyn background region which has a real index.
|
||||
* 2) The normal region whose index will accumulate from
|
||||
* static_regions_num.
|
||||
*
|
||||
* Region_idx < 0 means not the fixed dyn background region.
|
||||
* In this case, region_idx should be the reg_avail_idx which
|
||||
* is accumulated from static_regions_num.
|
||||
*/
|
||||
if (region_idx < 0) {
|
||||
region_idx = reg_avail_idx++;
|
||||
}
|
||||
CHECKIF(!(region_idx < get_num_regions())) {
|
||||
LOG_ERR("Out-of-bounds error for mpu regions. "
|
||||
"region idx: %d, total mpu regions: %d",
|
||||
region_idx, get_num_regions());
|
||||
ret = -ENOENT;
|
||||
}
|
||||
|
||||
region_init(region_idx, &(dyn_regions[i].region_conf));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int configure_dynamic_mpu_regions(struct k_thread *thread)
|
||||
{
|
||||
/*
|
||||
* Allocate double space for dyn_regions. Because when split
|
||||
* the background dynamic regions, it will cause double regions numbers
|
||||
* generated.
|
||||
*/
|
||||
struct dynamic_region_info dyn_regions[_MAX_DYNAMIC_MPU_REGIONS_NUM * 2];
|
||||
const uint8_t max_region_num = ARRAY_SIZE(dyn_regions);
|
||||
uint8_t region_num;
|
||||
int ret = 0, ret2;
|
||||
|
||||
ret2 = dup_dynamic_regions(dyn_regions, max_region_num);
|
||||
CHECKIF(ret2 < 0) {
|
||||
ret = ret2;
|
||||
goto out;
|
||||
}
|
||||
|
||||
region_num = (uint8_t)ret2;
|
||||
|
||||
struct k_mem_domain *mem_domain = thread->mem_domain_info.mem_domain;
|
||||
|
||||
if (mem_domain) {
|
||||
LOG_DBG("configure domain: %p", mem_domain);
|
||||
|
||||
uint32_t num_parts = mem_domain->num_partitions;
|
||||
uint32_t max_parts = CONFIG_MAX_DOMAIN_PARTITIONS;
|
||||
struct k_mem_partition *partition;
|
||||
|
||||
for (size_t i = 0; i < max_parts && num_parts > 0; i++, num_parts--) {
|
||||
partition = &mem_domain->partitions[i];
|
||||
if (partition->size == 0) {
|
||||
continue;
|
||||
}
|
||||
LOG_DBG("set region 0x%lx 0x%lx",
|
||||
partition->start, partition->size);
|
||||
ret2 = insert_region(dyn_regions,
|
||||
region_num,
|
||||
max_region_num,
|
||||
partition->start,
|
||||
partition->size,
|
||||
&partition->attr);
|
||||
CHECKIF(ret2 != 0) {
|
||||
ret = ret2;
|
||||
}
|
||||
|
||||
region_num = (uint8_t)ret2;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_DBG("configure user thread %p's context", thread);
|
||||
if ((thread->base.user_options & K_USER) != 0) {
|
||||
/* K_USER thread stack needs a region */
|
||||
ret2 = insert_region(dyn_regions,
|
||||
region_num,
|
||||
max_region_num,
|
||||
thread->stack_info.start,
|
||||
thread->stack_info.size,
|
||||
&K_MEM_PARTITION_P_RW_U_RW);
|
||||
CHECKIF(ret2 != 0) {
|
||||
ret = ret2;
|
||||
}
|
||||
|
||||
region_num = (uint8_t)ret2;
|
||||
}
|
||||
|
||||
arm_core_mpu_disable();
|
||||
ret = flush_dynamic_regions_to_mpu(dyn_regions, region_num);
|
||||
arm_core_mpu_enable();
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int arch_mem_domain_max_partitions_get(void)
|
||||
{
|
||||
int max_parts = get_num_regions() - static_regions_num;
|
||||
|
||||
if (max_parts > CONFIG_MAX_DOMAIN_PARTITIONS) {
|
||||
max_parts = CONFIG_MAX_DOMAIN_PARTITIONS;
|
||||
}
|
||||
|
||||
return max_parts;
|
||||
}
|
||||
|
||||
int arch_mem_domain_partition_add(struct k_mem_domain *domain, uint32_t partition_id)
|
||||
{
|
||||
ARG_UNUSED(domain);
|
||||
ARG_UNUSED(partition_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int arch_mem_domain_partition_remove(struct k_mem_domain *domain, uint32_t partition_id)
|
||||
{
|
||||
ARG_UNUSED(domain);
|
||||
ARG_UNUSED(partition_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int arch_mem_domain_thread_add(struct k_thread *thread)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (thread == _current) {
|
||||
ret = configure_dynamic_mpu_regions(thread);
|
||||
}
|
||||
#ifdef CONFIG_SMP
|
||||
else {
|
||||
/* the thread could be running on another CPU right now */
|
||||
z_arm64_mem_cfg_ipi();
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int arch_mem_domain_thread_remove(struct k_thread *thread)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (thread == _current) {
|
||||
ret = configure_dynamic_mpu_regions(thread);
|
||||
}
|
||||
#ifdef CONFIG_SMP
|
||||
else {
|
||||
/* the thread could be running on another CPU right now */
|
||||
z_arm64_mem_cfg_ipi();
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void z_arm64_thread_mem_domains_init(struct k_thread *thread)
|
||||
{
|
||||
configure_dynamic_mpu_regions(thread);
|
||||
}
|
||||
|
||||
void z_arm64_swap_mem_domains(struct k_thread *thread)
|
||||
{
|
||||
configure_dynamic_mpu_regions(thread);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
7
arch/arm64/core/cortex_r/mpu/CMakeLists.txt
Normal file
7
arch/arm64/core/cortex_r/mpu/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
# Copyright (c) 2021 Arm Limited (or its affiliates). All rights reserved.
|
||||
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_library()
|
||||
|
||||
zephyr_library_sources(arm_mpu.c)
|
||||
@@ -10,9 +10,6 @@ if CPU_HAS_MPU
|
||||
config ARM_MPU
|
||||
bool "ARM MPU Support"
|
||||
select THREAD_STACK_INFO
|
||||
select MPU
|
||||
select SRAM_REGION_PERMISSIONS
|
||||
select ARCH_MEM_DOMAIN_SYNCHRONOUS_API if USERSPACE
|
||||
default y
|
||||
help
|
||||
MPU implements Memory Protection Unit.
|
||||
186
arch/arm64/core/cortex_r/mpu/arm_mpu.c
Normal file
186
arch/arm64/core/cortex_r/mpu/arm_mpu.c
Normal file
@@ -0,0 +1,186 @@
|
||||
/*
|
||||
* Copyright (c) 2017 Linaro Limited.
|
||||
* Copyright (c) 2021 Arm Limited (or its affiliates). All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <device.h>
|
||||
#include <init.h>
|
||||
#include <kernel.h>
|
||||
#include <soc.h>
|
||||
#include <arch/arm64/cortex_r/mpu/arm_mpu.h>
|
||||
#include <linker/linker-defs.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_MPU_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(mpu);
|
||||
|
||||
/*
|
||||
* AArch64 Memory Model Feature Register 0
|
||||
* Provides information about the implemented memory model and memory
|
||||
* management support in AArch64 state.
|
||||
* See Arm Architecture Reference Manual Supplement
|
||||
* Armv8, for Armv8-R AArch64 architecture profile, G1.3.7
|
||||
*
|
||||
* ID_AA64MMFR0_MSA_FRAC, bits[55:52]
|
||||
* ID_AA64MMFR0_MSA, bits [51:48]
|
||||
*/
|
||||
#define ID_AA64MMFR0_MSA_msk (0xFFUL << 48U)
|
||||
#define ID_AA64MMFR0_PMSA_EN (0x1FUL << 48U)
|
||||
#define ID_AA64MMFR0_PMSA_VMSA_EN (0x2FUL << 48U)
|
||||
|
||||
/*
|
||||
* Global status variable holding the number of HW MPU region indices, which
|
||||
* have been reserved by the MPU driver to program the static (fixed) memory
|
||||
* regions.
|
||||
*/
|
||||
static uint8_t static_regions_num;
|
||||
|
||||
/* Get the number of supported MPU regions. */
|
||||
static inline uint8_t get_num_regions(void)
|
||||
{
|
||||
uint64_t type;
|
||||
|
||||
type = read_mpuir_el1();
|
||||
type = type & MPU_IR_REGION_Msk;
|
||||
|
||||
return (uint8_t)type;
|
||||
}
|
||||
|
||||
/* ARM Core MPU Driver API Implementation for ARM MPU */
|
||||
|
||||
/**
|
||||
* @brief enable the MPU
|
||||
*/
|
||||
void arm_core_mpu_enable(void)
|
||||
{
|
||||
uint64_t val;
|
||||
|
||||
val = read_sctlr_el1();
|
||||
val |= SCTLR_M_BIT;
|
||||
write_sctlr_el1(val);
|
||||
dsb();
|
||||
isb();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief disable the MPU
|
||||
*/
|
||||
void arm_core_mpu_disable(void)
|
||||
{
|
||||
uint64_t val;
|
||||
|
||||
/* Force any outstanding transfers to complete before disabling MPU */
|
||||
dmb();
|
||||
|
||||
val = read_sctlr_el1();
|
||||
val &= ~SCTLR_M_BIT;
|
||||
write_sctlr_el1(val);
|
||||
dsb();
|
||||
isb();
|
||||
}
|
||||
|
||||
/* ARM MPU Driver Initial Setup
|
||||
*
|
||||
* Configure the cache-ability attributes for all the
|
||||
* different types of memory regions.
|
||||
*/
|
||||
static void mpu_init(void)
|
||||
{
|
||||
/* Device region(s): Attribute-0
|
||||
* Flash region(s): Attribute-1
|
||||
* SRAM region(s): Attribute-2
|
||||
* SRAM no cache-able regions(s): Attribute-3
|
||||
*/
|
||||
uint64_t mair = MPU_MAIR_ATTRS;
|
||||
|
||||
write_mair_el1(mair);
|
||||
dsb();
|
||||
isb();
|
||||
}
|
||||
|
||||
static inline void mpu_set_region(uint32_t rnr, uint64_t rbar,
|
||||
uint64_t rlar)
|
||||
{
|
||||
write_prselr_el1(rnr);
|
||||
dsb();
|
||||
write_prbar_el1(rbar);
|
||||
write_prlar_el1(rlar);
|
||||
dsb();
|
||||
isb();
|
||||
}
|
||||
|
||||
/* This internal functions performs MPU region initialization. */
|
||||
static void region_init(const uint32_t index,
|
||||
const struct arm_mpu_region *region_conf)
|
||||
{
|
||||
uint64_t rbar = region_conf->base & MPU_RBAR_BASE_Msk;
|
||||
uint64_t rlar = (region_conf->limit - 1) & MPU_RLAR_LIMIT_Msk;
|
||||
|
||||
rbar |= region_conf->attr.rbar &
|
||||
(MPU_RBAR_XN_Msk | MPU_RBAR_AP_Msk | MPU_RBAR_SH_Msk);
|
||||
rlar |= (region_conf->attr.mair_idx << MPU_RLAR_AttrIndx_Pos) &
|
||||
MPU_RLAR_AttrIndx_Msk;
|
||||
rlar |= MPU_RLAR_EN_Msk;
|
||||
|
||||
mpu_set_region(index, rbar, rlar);
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief MPU default configuration
|
||||
*
|
||||
* This function here provides the default configuration mechanism
|
||||
* for the Memory Protection Unit (MPU).
|
||||
*/
|
||||
void z_arm64_mm_init(bool is_primary_core)
|
||||
{
|
||||
/* This param is only for compatibility with the MMU init */
|
||||
ARG_UNUSED(is_primary_core);
|
||||
uint64_t val;
|
||||
uint32_t r_index;
|
||||
|
||||
/* Current MPU code supports only EL1 */
|
||||
val = read_currentel();
|
||||
__ASSERT(GET_EL(val) == MODE_EL1,
|
||||
"Exception level not EL1, MPU not enabled!\n");
|
||||
|
||||
/* Check whether the processor supports MPU */
|
||||
val = read_id_aa64mmfr0_el1() & ID_AA64MMFR0_MSA_msk;
|
||||
if ((val != ID_AA64MMFR0_PMSA_EN) &&
|
||||
(val != ID_AA64MMFR0_PMSA_VMSA_EN)) {
|
||||
__ASSERT(0, "MPU not supported!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (mpu_config.num_regions > get_num_regions()) {
|
||||
/* Attempt to configure more MPU regions than
|
||||
* what is supported by hardware. As this operation
|
||||
* is executed during system (pre-kernel) initialization,
|
||||
* we want to ensure we can detect an attempt to
|
||||
* perform invalid configuration.
|
||||
*/
|
||||
__ASSERT(0,
|
||||
"Request to configure: %u regions (supported: %u)\n",
|
||||
mpu_config.num_regions,
|
||||
get_num_regions());
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_DBG("total region count: %d", get_num_regions());
|
||||
|
||||
arm_core_mpu_disable();
|
||||
|
||||
/* Architecture-specific configuration */
|
||||
mpu_init();
|
||||
|
||||
/* Program fixed regions configured at SOC definition. */
|
||||
for (r_index = 0U; r_index < mpu_config.num_regions; r_index++) {
|
||||
region_init(r_index, &mpu_config.mpu_regions[r_index]);
|
||||
}
|
||||
|
||||
/* Update the number of programmed MPU regions. */
|
||||
static_regions_num = mpu_config.num_regions;
|
||||
|
||||
arm_core_mpu_enable();
|
||||
}
|
||||
@@ -35,10 +35,6 @@ SECTION_FUNC(TEXT, _isr_wrapper)
|
||||
/* ++(_kernel->nested) to be checked by arch_is_in_isr() */
|
||||
inc_nest_counter x0, x1
|
||||
|
||||
#ifdef CONFIG_SCHED_THREAD_USAGE
|
||||
bl z_sched_usage_stop
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRACING
|
||||
bl sys_trace_isr_enter
|
||||
#endif
|
||||
@@ -50,22 +46,8 @@ SECTION_FUNC(TEXT, _isr_wrapper)
|
||||
bl z_soc_irq_get_active
|
||||
#endif /* !CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER */
|
||||
|
||||
#if CONFIG_GIC_VER >= 3
|
||||
/*
|
||||
* Ignore Special INTIDs 1020..1023 see 2.2.1 of Arm Generic Interrupt Controller
|
||||
* Architecture Specification GIC architecture version 3 and version 4
|
||||
*/
|
||||
cmp x0, 1019
|
||||
b.le oob
|
||||
cmp x0, 1023
|
||||
b.gt oob
|
||||
b spurious_continue
|
||||
|
||||
oob:
|
||||
#endif
|
||||
/* IRQ out of bounds */
|
||||
mov x1, #(CONFIG_NUM_IRQS - 1)
|
||||
cmp x0, x1
|
||||
cmp x0, #(CONFIG_NUM_IRQS - 1)
|
||||
b.hi spurious_continue
|
||||
|
||||
stp x0, xzr, [sp, #-16]!
|
||||
@@ -119,28 +101,9 @@ spurious_continue:
|
||||
* x0: 1st thread in the ready queue
|
||||
* x1: _current thread
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/*
|
||||
* 2 possibilities here:
|
||||
* - x0 != NULL (implies x0 != x1): we need to context switch and set
|
||||
* the switch_handle in the context switch code
|
||||
* - x0 == NULL: no context switch
|
||||
*/
|
||||
cmp x0, #0x0
|
||||
bne switch
|
||||
|
||||
/*
|
||||
* No context switch. Restore x0 from x1 (they are the same thread).
|
||||
* See also comments to z_arch_get_next_switch_handle()
|
||||
*/
|
||||
mov x0, x1
|
||||
b exit
|
||||
switch:
|
||||
#else
|
||||
cmp x0, x1
|
||||
beq exit
|
||||
#endif
|
||||
|
||||
/* Switch thread */
|
||||
bl z_arm64_context_switch
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <logging/log.h>
|
||||
#include <arch/arm64/cpu.h>
|
||||
#include <arch/arm64/lib_helpers.h>
|
||||
#include <arch/arm64/mm.h>
|
||||
#include <arch/arm64/arm_mmu.h>
|
||||
#include <linker/linker-defs.h>
|
||||
#include <spinlock.h>
|
||||
#include <sys/util.h>
|
||||
@@ -104,19 +104,6 @@ static inline uint64_t *pte_desc_table(uint64_t desc)
|
||||
return (uint64_t *)address;
|
||||
}
|
||||
|
||||
static inline bool is_desc_block_aligned(uint64_t desc, unsigned int level_size)
|
||||
{
|
||||
uint64_t mask = GENMASK(47, PAGE_SIZE_SHIFT);
|
||||
bool aligned = !((desc & mask) & (level_size - 1));
|
||||
|
||||
if (!aligned) {
|
||||
MMU_DEBUG("misaligned desc 0x%016llx for block size 0x%x\n",
|
||||
desc, level_size);
|
||||
}
|
||||
|
||||
return aligned;
|
||||
}
|
||||
|
||||
static inline bool is_desc_superset(uint64_t desc1, uint64_t desc2,
|
||||
unsigned int level)
|
||||
{
|
||||
@@ -272,8 +259,7 @@ static int set_mapping(struct arm_mmu_ptables *ptables,
|
||||
goto move_on;
|
||||
}
|
||||
|
||||
if ((size < level_size) || (virt & (level_size - 1)) ||
|
||||
!is_desc_block_aligned(desc, level_size)) {
|
||||
if ((size < level_size) || (virt & (level_size - 1))) {
|
||||
/* Range doesn't fit, create subtable */
|
||||
table = expand_to_table(pte, level);
|
||||
if (!table) {
|
||||
@@ -668,14 +654,6 @@ static const struct arm_mmu_flat_range mmu_zephyr_ranges[] = {
|
||||
.start = __rodata_region_start,
|
||||
.end = __rodata_region_end,
|
||||
.attrs = MT_NORMAL | MT_P_RO_U_RO | MT_DEFAULT_SECURE_STATE },
|
||||
|
||||
#ifdef CONFIG_NOCACHE_MEMORY
|
||||
/* Mark nocache segment noncachable, read-write and execute-never */
|
||||
{ .name = "nocache_data",
|
||||
.start = _nocache_ram_start,
|
||||
.end = _nocache_ram_end,
|
||||
.attrs = MT_NORMAL_NC | MT_P_RW_U_RW | MT_DEFAULT_SECURE_STATE },
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void add_arm_mmu_flat_range(struct arm_mmu_ptables *ptables,
|
||||
@@ -951,33 +929,8 @@ int arch_page_phys_get(void *virt, uintptr_t *phys)
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t arch_virt_region_align(uintptr_t phys, size_t size)
|
||||
{
|
||||
size_t alignment = CONFIG_MMU_PAGE_SIZE;
|
||||
size_t level_size;
|
||||
int level;
|
||||
|
||||
for (level = XLAT_LAST_LEVEL; level >= BASE_XLAT_LEVEL; level--) {
|
||||
level_size = 1 << LEVEL_TO_VA_SIZE_SHIFT(level);
|
||||
|
||||
if (size < level_size) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((phys & (level_size - 1))) {
|
||||
break;
|
||||
}
|
||||
|
||||
alignment = level_size;
|
||||
}
|
||||
|
||||
return alignment;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
|
||||
static void z_arm64_swap_ptables(struct k_thread *incoming);
|
||||
|
||||
static inline bool is_ptable_active(struct arm_mmu_ptables *ptables)
|
||||
{
|
||||
return read_sysreg(ttbr0_el1) == (uintptr_t)ptables->base_xlat_table;
|
||||
@@ -1006,8 +959,8 @@ int arch_mem_domain_init(struct k_mem_domain *domain)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int private_map(struct arm_mmu_ptables *ptables, const char *name,
|
||||
uintptr_t phys, uintptr_t virt, size_t size, uint32_t attrs)
|
||||
static void private_map(struct arm_mmu_ptables *ptables, const char *name,
|
||||
uintptr_t phys, uintptr_t virt, size_t size, uint32_t attrs)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -1018,12 +971,10 @@ static int private_map(struct arm_mmu_ptables *ptables, const char *name,
|
||||
if (is_ptable_active(ptables)) {
|
||||
invalidate_tlb_all();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int reset_map(struct arm_mmu_ptables *ptables, const char *name,
|
||||
uintptr_t addr, size_t size)
|
||||
static void reset_map(struct arm_mmu_ptables *ptables, const char *name,
|
||||
uintptr_t addr, size_t size)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -1032,44 +983,40 @@ static int reset_map(struct arm_mmu_ptables *ptables, const char *name,
|
||||
if (is_ptable_active(ptables)) {
|
||||
invalidate_tlb_all();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int arch_mem_domain_partition_add(struct k_mem_domain *domain,
|
||||
uint32_t partition_id)
|
||||
void arch_mem_domain_partition_add(struct k_mem_domain *domain,
|
||||
uint32_t partition_id)
|
||||
{
|
||||
struct arm_mmu_ptables *domain_ptables = &domain->arch.ptables;
|
||||
struct k_mem_partition *ptn = &domain->partitions[partition_id];
|
||||
|
||||
return private_map(domain_ptables, "partition", ptn->start, ptn->start,
|
||||
ptn->size, ptn->attr.attrs | MT_NORMAL);
|
||||
private_map(domain_ptables, "partition", ptn->start, ptn->start,
|
||||
ptn->size, ptn->attr.attrs | MT_NORMAL);
|
||||
}
|
||||
|
||||
int arch_mem_domain_partition_remove(struct k_mem_domain *domain,
|
||||
uint32_t partition_id)
|
||||
void arch_mem_domain_partition_remove(struct k_mem_domain *domain,
|
||||
uint32_t partition_id)
|
||||
{
|
||||
struct arm_mmu_ptables *domain_ptables = &domain->arch.ptables;
|
||||
struct k_mem_partition *ptn = &domain->partitions[partition_id];
|
||||
|
||||
return reset_map(domain_ptables, "partition removal",
|
||||
ptn->start, ptn->size);
|
||||
reset_map(domain_ptables, "partition removal", ptn->start, ptn->size);
|
||||
}
|
||||
|
||||
static int map_thread_stack(struct k_thread *thread,
|
||||
struct arm_mmu_ptables *ptables)
|
||||
static void map_thread_stack(struct k_thread *thread,
|
||||
struct arm_mmu_ptables *ptables)
|
||||
{
|
||||
return private_map(ptables, "thread_stack", thread->stack_info.start,
|
||||
thread->stack_info.start, thread->stack_info.size,
|
||||
MT_P_RW_U_RW | MT_NORMAL);
|
||||
private_map(ptables, "thread_stack", thread->stack_info.start,
|
||||
thread->stack_info.start, thread->stack_info.size,
|
||||
MT_P_RW_U_RW | MT_NORMAL);
|
||||
}
|
||||
|
||||
int arch_mem_domain_thread_add(struct k_thread *thread)
|
||||
void arch_mem_domain_thread_add(struct k_thread *thread)
|
||||
{
|
||||
struct arm_mmu_ptables *old_ptables, *domain_ptables;
|
||||
struct k_mem_domain *domain;
|
||||
bool is_user, is_migration;
|
||||
int ret = 0;
|
||||
|
||||
domain = thread->mem_domain_info.mem_domain;
|
||||
domain_ptables = &domain->arch.ptables;
|
||||
@@ -1079,7 +1026,7 @@ int arch_mem_domain_thread_add(struct k_thread *thread)
|
||||
is_migration = (old_ptables != NULL) && is_user;
|
||||
|
||||
if (is_migration) {
|
||||
ret = map_thread_stack(thread, domain_ptables);
|
||||
map_thread_stack(thread, domain_ptables);
|
||||
}
|
||||
|
||||
thread->arch.ptables = domain_ptables;
|
||||
@@ -1090,19 +1037,17 @@ int arch_mem_domain_thread_add(struct k_thread *thread)
|
||||
} else {
|
||||
#ifdef CONFIG_SMP
|
||||
/* the thread could be running on another CPU right now */
|
||||
z_arm64_mem_cfg_ipi();
|
||||
z_arm64_ptable_ipi();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (is_migration) {
|
||||
ret = reset_map(old_ptables, __func__, thread->stack_info.start,
|
||||
reset_map(old_ptables, __func__, thread->stack_info.start,
|
||||
thread->stack_info.size);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int arch_mem_domain_thread_remove(struct k_thread *thread)
|
||||
void arch_mem_domain_thread_remove(struct k_thread *thread)
|
||||
{
|
||||
struct arm_mmu_ptables *domain_ptables;
|
||||
struct k_mem_domain *domain;
|
||||
@@ -1111,18 +1056,18 @@ int arch_mem_domain_thread_remove(struct k_thread *thread)
|
||||
domain_ptables = &domain->arch.ptables;
|
||||
|
||||
if ((thread->base.user_options & K_USER) == 0) {
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((thread->base.thread_state & _THREAD_DEAD) == 0) {
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
return reset_map(domain_ptables, __func__, thread->stack_info.start,
|
||||
thread->stack_info.size);
|
||||
reset_map(domain_ptables, __func__, thread->stack_info.start,
|
||||
thread->stack_info.size);
|
||||
}
|
||||
|
||||
static void z_arm64_swap_ptables(struct k_thread *incoming)
|
||||
void z_arm64_swap_ptables(struct k_thread *incoming)
|
||||
{
|
||||
struct arm_mmu_ptables *ptables = incoming->arch.ptables;
|
||||
|
||||
@@ -1131,7 +1076,7 @@ static void z_arm64_swap_ptables(struct k_thread *incoming)
|
||||
}
|
||||
}
|
||||
|
||||
void z_arm64_thread_mem_domains_init(struct k_thread *incoming)
|
||||
void z_arm64_thread_pt_init(struct k_thread *incoming)
|
||||
{
|
||||
struct arm_mmu_ptables *ptables;
|
||||
|
||||
@@ -1146,9 +1091,4 @@ void z_arm64_thread_mem_domains_init(struct k_thread *incoming)
|
||||
z_arm64_swap_ptables(incoming);
|
||||
}
|
||||
|
||||
void z_arm64_swap_mem_domains(struct k_thread *incoming)
|
||||
{
|
||||
z_arm64_swap_ptables(incoming);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user