You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "tmedicci (via GitHub)" <gi...@apache.org> on 2024/11/01 18:45:36 UTC

[PR] libs/modlib: Load data using `up_textheap_data_address` [nuttx]

tmedicci opened a new pull request, #14600:
URL: https://github.com/apache/nuttx/pull/14600

   ## Summary
   
   * libs/modlib: Load data using `up_textheap_data_address`
   
   Some chips have different memory addressing spaces for the same region. This is true, for instance, for ESP32-S3: the same memory region can be accessed using the data bus or the data bus using different address ranges. The instruction bus, however, requires word-aligned access. That being said, it is recommended to use the data bus while copying sections to the text heap to avoid any illegal access using the instruction bus address which will be later used to run the program.
   
   ## Impact
   
   Fix https://github.com/apache/nuttx/issues/14487
   
   ## Testing
   
   Internal CI testing + ESP32-S3-DevKitC-1 v1.0:
   
   Build steps:
   
   ```
   make -j distclean && ./tools/configure.sh esp32s3-devkit:elf && make flash ESPTOOL_PORT=/dev/ttyUSB0 -s -j$(nproc) && minicom -D /dev/ttyUSB0
   ```
   
   And, then, run elf example:
   ```
   nsh> elf
   ```


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] libs/modlib: Load data using `up_textheap_data_address` [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #14600:
URL: https://github.com/apache/nuttx/pull/14600


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] libs/modlib: Load data using `up_textheap_data_address` [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #14600:
URL: https://github.com/apache/nuttx/pull/14600#issuecomment-2452850756

   @tmedicci some chip need provide the dummy up_textheap_data_address implementation


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] libs/modlib: Load data using `up_textheap_data_address` [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #14600:
URL: https://github.com/apache/nuttx/pull/14600#issuecomment-2452976342

   @tmedicci I think it will break ELF for some arch that doesn't use CONFIG_ARCH_USE_TEXT_HEAP see:
   
   ```
   #if defined(CONFIG_ARCH_USE_TEXT_HEAP)
   #if defined(CONFIG_ARCH_HAVE_TEXT_HEAP_SEPARATE_DATA_ADDRESS)
   FAR void *up_textheap_data_address(FAR void *p);
   #else
   #define up_textheap_data_address(p) ((FAR void *)p)
   #endif
   #endif
   ```
   
   Note that up_textheap_data_address() doesn't exist case CONFIG_ARCH_USE_TEXT_HEAP is not defined


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org