-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hal: AArch64/ZynqMP port #635
base: master
Are you sure you want to change the base?
Conversation
Due to exiting on different stack than current's thread in fork in child the return value was not set by threads_setupUserReturn. JIRA: RTOS-979
hal/aarch64/aarch64.h
Outdated
__asm__ volatile ( \ | ||
"msr " #sysreg ", %0" \ | ||
: \ | ||
: "r"(__v) \ | ||
: "memory"); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
__asm__ volatile ( \ | |
"msr " #sysreg ", %0" \ | |
: \ | |
: "r"(__v) \ | |
: "memory"); \ | |
__asm__ volatile( \ | |
"msr " #sysreg ", %0" \ | |
: \ | |
: "r"(__v) \ | |
: "memory"); \ |
hal/aarch64/aarch64.h
Outdated
__asm__ volatile ( \ | ||
"mrs %0, " #sysreg \ | ||
: "=r"(__v) \ | ||
: \ | ||
: "memory"); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
__asm__ volatile ( \ | |
"mrs %0, " #sysreg \ | |
: "=r"(__v) \ | |
: \ | |
: "memory"); \ | |
__asm__ volatile( \ | |
"mrs %0, " #sysreg \ | |
: "=r"(__v) \ | |
: \ | |
: "memory"); \ |
hal/aarch64/aarch64.h
Outdated
|
||
static inline void hal_cpuDataMemoryBarrier(void) | ||
{ | ||
__asm__ volatile ("dmb ish"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
__asm__ volatile ("dmb ish"); | |
__asm__ volatile("dmb ish"); |
hal/aarch64/aarch64.h
Outdated
|
||
static inline void hal_cpuDataSyncBarrier(void) | ||
{ | ||
__asm__ volatile ("dsb ish"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
__asm__ volatile ("dsb ish"); | |
__asm__ volatile("dsb ish"); |
hal/aarch64/aarch64.h
Outdated
|
||
static inline void hal_cpuDataSyncBarrierSys(void) | ||
{ | ||
__asm__ volatile ("dsb sy"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
__asm__ volatile ("dsb sy"); | |
__asm__ volatile("dsb sy"); |
hal/aarch64/aarch64.h
Outdated
static inline void hal_tlbInvalVA_IS(ptr_t vaddr) | ||
{ | ||
u64 arg = (vaddr >> 12) & ((1uL << 44) - 1); | ||
__asm__ volatile ("tlbi vaae1is, %0" : : "r"(arg)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
__asm__ volatile ("tlbi vaae1is, %0" : : "r"(arg)); | |
__asm__ volatile("tlbi vaae1is, %0" : : "r"(arg)); |
hal/aarch64/aarch64.h
Outdated
static inline void hal_tlbInvalVAASID_IS(ptr_t vaddr, asid_t asid) | ||
{ | ||
u64 arg = ((vaddr >> 12) & ((1uL << 44) - 1)) | ((u64)asid << 48); | ||
__asm__ volatile ("tlbi vae1is, %0" : : "r"(arg)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
__asm__ volatile ("tlbi vae1is, %0" : : "r"(arg)); | |
__asm__ volatile("tlbi vae1is, %0" : : "r"(arg)); |
hal/aarch64/aarch64.h
Outdated
/* Invalidate entire Unified TLB (broadcast to Inner Shareable domain) */ | ||
static inline void hal_tlbInvalAll_IS(void) | ||
{ | ||
__asm__ volatile ("tlbi vmalle1is"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
__asm__ volatile ("tlbi vmalle1is"); | |
__asm__ volatile("tlbi vmalle1is"); |
hal/aarch64/aarch64.h
Outdated
|
||
struct aarch64_proc_id { | ||
u64 mmfr0; /* ID_AA64MMFR0_EL1 */ | ||
u64 pfr0; /* ID_AA64PFR0_EL1 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
u64 pfr0; /* ID_AA64PFR0_EL1 */ | |
u64 pfr0; /* ID_AA64PFR0_EL1 */ |
hal/aarch64/aarch64.h
Outdated
u32 dfr0; /* ID_AA64DFR0_EL1 */ | ||
u32 midr; /* MIDR_EL1 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
u32 dfr0; /* ID_AA64DFR0_EL1 */ | |
u32 midr; /* MIDR_EL1 */ | |
u32 dfr0; /* ID_AA64DFR0_EL1 */ | |
u32 midr; /* MIDR_EL1 */ |
_exceptions_checkFPUTrap: | ||
#ifndef __SOFTFP__ | ||
lsr w26, W_ESR_EL1, #26 | ||
cmp w26, #0x7 /* SME, SVE, SIMD or FP trapped due to CPACR_EL1 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[codespell] reported by reviewdog 🐶
SME ==> SAME, SEME, SOME, SMS
case 0b000110: | ||
return "Trapped LDC/STC access"; | ||
case 0b000111: | ||
return "Trapped SME, SVE, Advanced SIMD or floating-point functionality due to CPACR_ELx.FPEN"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[codespell] reported by reviewdog 🐶
SME ==> SAME, SEME, SOME, SMS
case 0b011100: | ||
return "(FEAT_FPAC) Exception from a PAC Fail"; | ||
case 0b011101: | ||
return "(FEAT_SME) Access to SME functionality trapped"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[codespell] reported by reviewdog 🐶
SME ==> SAME, SEME, SOME, SMS
hal/aarch64/pmap.c
Outdated
} | ||
} | ||
|
||
/* Set code to read-only, everthing else XN and remove mappings past the end */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[codespell] reported by reviewdog 🐶
everthing ==> everything
hal/aarch64/arch/pmap.h
Outdated
|
||
#include "hal/types.h" | ||
|
||
/* Predefined virtual adresses */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[codespell] reported by reviewdog 🐶
adresses ==> addresses
hal/aarch64/arch/pmap.h
Outdated
#define VADDR_DTB 0xfffffffffff00000 /* Last 1 MB of virtual space */ | ||
|
||
|
||
/* Architecure dependent page attributes */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[codespell] reported by reviewdog 🐶
Architecure ==> Architecture
80df916
to
357c395
Compare
hal/aarch64/aarch64.h
Outdated
/* Invalidate all instruction caches to PoU */ | ||
static inline void hal_cpuInvalInstrCacheAll(void) | ||
{ | ||
__asm__ volatile ("dsb ish\n ic iallu\n dsb ish\n isb\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
__asm__ volatile ("dsb ish\n ic iallu\n dsb ish\n isb\n"); | |
__asm__ volatile("dsb ish\n ic iallu\n dsb ish\n isb\n"); |
Previously loop counters were counting the number of pages, while the count limit was in bytes, potentially causing a buffer overrun. JIRA: RTOS-949
Add support for ZynqMP platform. JIRA: RTOS-949
Set stack size of usrv message thread to SIZE_KSTACK. The default stack size of 2048 was insufficient on AArch64. JIRA: RTOS-949
357c395
to
dd3cc03
Compare
|
||
static inline void hal_cpuDisableInterrupts(void) | ||
{ | ||
__asm__ volatile ("msr daifSet, #3\n dsb ish \n isb"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
__asm__ volatile ("msr daifSet, #3\n dsb ish \n isb"); | |
__asm__ volatile("msr daifSet, #3\n dsb ish \n isb"); |
|
||
static inline void hal_cpuEnableInterrupts(void) | ||
{ | ||
__asm__ volatile ("msr daifClr, #3\n dsb ish \n isb"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix
__asm__ volatile ("msr daifClr, #3\n dsb ish \n isb"); | |
__asm__ volatile("msr daifClr, #3\n dsb ish \n isb"); |
Port plo to AArch64 architecture and Zynq Ultrascale platform.
Description
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment