Nexus Embedded Platform 0.1.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
nonsecure.h File Reference

Explicit NonSecure unprivileged address permission checks. More...

#include "nexus/arch/features.h"
#include <stddef.h>

Go to the source code of this file.

Enumerations

enum  nx_arch_nonsecure_access_t { NX_ARCH_NONSECURE_READ = 0 , NX_ARCH_NONSECURE_READWRITE = 1 }
 Requested NonSecure unprivileged CPU access, never execute access. More...

Functions

nx_arch_result_t nx_arch_nonsecure_check (const void *address, size_t bytes, nx_arch_nonsecure_access_t access)
 Check current NonSecure unprivileged access to a full span.

Detailed Description

Explicit NonSecure unprivileged address permission checks.

Author
Nexus Team

Definition in file nonsecure.h.

Enumeration Type Documentation

◆ nx_arch_nonsecure_access_t

Requested NonSecure unprivileged CPU access, never execute access.

Enumerator
NX_ARCH_NONSECURE_READ 
NX_ARCH_NONSECURE_READWRITE 

Definition at line 14 of file nonsecure.h.

Function Documentation

◆ nx_arch_nonsecure_check()

nx_arch_result_t nx_arch_nonsecure_check ( const void * address,
size_t bytes,
nx_arch_nonsecure_access_t access )

Check current NonSecure unprivileged access to a full span.

Parameters
[in]addressNon-null start; never dereferenced by this API.
[in]bytesPositive length with a representable inclusive end.
[in]accessExact READ or READWRITE access, never a bit mask.
Returns
OK for complete current access; INVALID for malformed or denied spans; CONTEXT outside privileged Secure Thread; UNSUPPORTED in Native, single-state or NonSecure images.
Note
Allocation-free permission observation only. Hardware CMSE checks both security attribution and NonSecure MPU rights as an unprivileged caller. Adjacent permitted regions may be conservatively rejected. No memory is copied, pinned or borrowed. Success neither authenticates a gateway caller nor proves RAM, DMA reachability, lifetime or fault safety. The integrating owner must exclude MMIO through its SoC RAM policy and prevent attribution/mapping changes through the subsequent access. Interrupts, another world, DMA and faults are not excluded here; no masks or hardware policy are changed. A gateway must separately snapshot its input and validate output before any irreversible operation.