-
Notifications
You must be signed in to change notification settings - Fork 8k
dt-bindings: riscv: Add macros for IO PMP attributes #97141
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
Conversation
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.
I think this change should be a part of #96241, decode these bitfields and translate them into PMP configuration.
596f6ac
to
8d62a38
Compare
|
Introduce new macros to define bitfields for RISC-V Physical Memory Protection (PMP) attributes, specifically for specifying Read, Write, and Execute permissions for IO memory regions in device tree bindings. The following macros are added: - ATTR_RISCV_TYPE_IO_R: Read access - ATTR_RISCV_TYPE_IO_W: Write access - ATTR_RISCV_TYPE_IO_X: Execute access Corresponding macros for device tree usage are also added: - DT_MEM_RISCV_TYPE_IO_R - DT_MEM_RISCV_TYPE_IO_W - DT_MEM_RISCV_TYPE_IO_X These macros allow device tree source files to precisely describe the intended access permissions for memory-mapped IO regions, enhancing the system's memory protection configuration. Signed-off-by: Firas Sammoura <[email protected]>
8d62a38
to
22c1bbe
Compare
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.
Useful for #96241, PMP region declarations via zephyr,memory-attr
. Thanks.
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.
LGTM
Introduce new macros to define bitfields for RISC-V Physical Memory Protection (PMP) attributes, specifically for specifying Read, Write, and Execute permissions for IO memory regions in device tree bindings.
The following macros are added:
Corresponding macros for device tree usage are also added:
These macros allow device tree source files to precisely describe the intended access permissions for memory-mapped IO regions, enhancing the system's memory protection configuration.