hujun260 opened a new pull request, #17982:
URL: https://github.com/apache/nuttx/pull/17982
## Summary
Add two new address environment utility functions for ARMv7-A to support
address environment operations in common code. These functions provide
interfaces to query user space virtual address ranges and find physical pages
mapped to user virtual addresses, enabling better integration between
architecture-specific and common memory management code.
## Changes
- **arch/arm/src/armv7-a/arm_addrenv_pgmap.c**:
- Add `up_addrenv_find_page()` function to find physical page mapped to
user virtual address from address environment page directory (stub
implementation for future enhancement)
- Add `up_addrenv_user_vaddr()` function that checks if a virtual address
is in user virtual address space using arm_uservaddr()
- Both functions follow NuttX naming conventions for architecture-specific
interfaces
## Benefits & Technical Details
- **User space queries**: Enables common code to determine if addresses
belong to user space without architecture-specific knowledge
- **Page mapping lookup**: Provides infrastructure for future page table
lookups from address environments
- **Portability**: Abstracts ARMv7-A specific address space handling into
architecture-neutral interfaces
- **Extensibility**: up_addrenv_find_page() stub provides placeholder for
future implementation of virtual-to-physical translation
- **Consistency**: Follows existing up_addrenv_* function naming and patterns
## Testing
- Verified up_addrenv_user_vaddr() correctly identifies user space addresses
using arm_uservaddr()
- Confirmed up_addrenv_find_page() exists and returns 0 (stub implementation)
- Tested function signatures and calling conventions
- Validated no build regressions with new functions added
- Confirmed common code can successfully call these architecture interfaces
## Impact
- **Compatibility**: Fully backward compatible, pure addition of new
functions
- **Scope**: ARMv7-A architecture specific address environment utilities
- **Architecture**: Enables future common code features requiring user space
address queries
- **API**: New public interfaces for address environment operations
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]