RTEMS | cpukit: Create DHRL Library for DRAM Latency Mitigation (!1193)

Gedare Bloom (@gedare) gitlab at rtems.org
Fri May 22 14:56:28 UTC 2026




Gedare Bloom started a new discussion on cpukit/dhrl/dhrl.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1193#note_150838

 > +  /* Set fallback iterations if caller left the configuration at 0 */
 > +  iterations = ctx->active_config.calibration_iterations;
 > +  if ( iterations == 0 ) {
 > +    iterations = 5000;
 > +  }
 > +
 > +  best_bit = 6;
 > +  lowest_latency = UINT64_MAX;
 > +  max_safe_bit = 0;
 > +  safe_size = ctx->active_config.memory_region_size / 2;
 > +
 > +  if ( safe_size > 1 ) {
 > +    max_safe_bit = (uint8_t) ( ( sizeof( unsigned long long ) * 8 - 1 ) -
 > +                               __builtin_clzll(
 > +                                 (unsigned long long) safe_size
 > +                               ) );

a function call to wrap this might help, the logic is a bit complex for a single compound expression.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1193#note_150838
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260522/04275162/attachment-0001.htm>


More information about the bugs mailing list