Skip to content

raspberryPi-*: Increase malloc pool to 64 MiB (+env)#35

Merged
samueldr merged 1 commit intoTow-Boot:developmentfrom
samueldr:fix/raspberrypi-bmp-issue
Jun 26, 2021
Merged

raspberryPi-*: Increase malloc pool to 64 MiB (+env)#35
samueldr merged 1 commit intoTow-Boot:developmentfrom
samueldr:fix/raspberrypi-bmp-issue

Conversation

@samueldr
Copy link
Contributor

@samueldr samueldr commented Jun 23, 2021

This fixes the issue where the logo wouldn't show on the Raspberry Pi family of hardware.


This is not really an upstreamable change. Really this probably shouldn't be hardcoded per platform in header files, but rather some Kconfig option?

@samueldr
Copy link
Contributor Author

samueldr commented Jun 24, 2021

Found the reason.

Basically the Raspberry Pi family of hardware uses a tiny amount of space for malloc (4MiB). This probably is fine and by design due to the considerations listed beforehand. The early models with 256MiB of RAM, in which a chunk is reserved for the videocore chip.

We probably can and should look into fulfilling the TODO, and conditionally apply different sizes depending on the target Raspberry Pi. Though we might also just want to increase it outright?

TODO

  • Re-do by increasing CONFIG_SYS_MALLOC_LEN

@samueldr samueldr marked this pull request as draft June 24, 2021 19:41
@samueldr samueldr force-pushed the fix/raspberrypi-bmp-issue branch from 1e12b40 to 1add448 Compare June 26, 2021 05:17
This fixes the issue where the bitmap logo couldn't be used, as
`malloc()` would fail to allocate ~9MiB. After all *that* doesn't fit in
~4MiB!
@samueldr samueldr force-pushed the fix/raspberrypi-bmp-issue branch from 1add448 to e917694 Compare June 26, 2021 05:24
@samueldr samueldr changed the title tow-boot: Decrease memory set aside for bitmap raspberryPi-*: Increase malloc pool to 64 MiB (+env) Jun 26, 2021
@samueldr samueldr marked this pull request as ready for review June 26, 2021 05:24
@samueldr samueldr merged commit aea89d5 into Tow-Boot:development Jun 26, 2021
@samueldr samueldr deleted the fix/raspberrypi-bmp-issue branch June 26, 2021 05:26
@samueldr samueldr added this to the "next" milestone Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant