royzah commented on PR #20192: URL: https://github.com/apache/nuttx/pull/20192#issuecomment-5747065568
Ran it, rather than only building it. `qemu-armv8a:knsh` is the closest config in tree to what this is for: `CONFIG_BUILD_KERNEL`, `CONFIG_ARCH_ADDRENV` and `CONFIG_ARCH_USE_MMU`, and it does not select `CONFIG_DEV_SIMPLE_ADDRENV`, so this file is the one built. A probe in `board_late_initialize()`, on QEMU 11.1.0 with `-cpu cortex-a53 -smp 4`: ``` VATOPA kernel data va=0x402bc080 pa=402bc080 VATOPA kernel text va=0x4028645c pa=4028645c VATOPA unmapped pa=0 (want 0) VATOPA offset preserved: yes ``` The kernel mapping on this board is flat, so the first two lines on their own would also pass for an implementation that just returned its argument. The third is what separates them: `0xdead0000dead0000` comes back as zero, so `PAR_EL1.F` is being read and the translation really is asked of the MMU. The fourth covers the offset composition, `va + 5` giving `pa + 5`. Not covered: a mapping where the virtual and physical addresses differ. That needs a user address environment, which needs a root filesystem this boot does not have. -- 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]
