Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soc/integration: Ensure the video framebuffer fits in main RAM #1915

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

davidar
Copy link
Contributor

@davidar davidar commented Apr 4, 2024

On targets with less than 20MiB of SDRAM, the default framebuffer region overflows the available address space, leading to errors like this:

litex> mem_list
Available memory regions:
ROM                0x00000000 0x20000 
SRAM               0x10000000 0x2000 
SPIFLASH           0x00800000 0x800000 
MAIN_RAM           0x40000000 0x800000 
VIDEO_FRAMEBUFFER  0x40c00000 0x800000 
CSR                0xf0000000 0x10000 

litex> mem_test 0x40000000 0x800000
Memtest at 0x40000000 (8.0MiB)...
  Write: 0x40000000-0x40800000 8.0MiB     
   Read: 0x40000000-0x40800000 8.0MiB     
Memtest OK

litex> mem_test 0x40c00000 0x800000
Memtest at 0x40c00000 (8.0MiB)...
memtest_access error @ 0x40c00000, exiting memtest.

This change resizes the framebuffer to occupy no more than half the available space and relocates it to before the end of the main_ram region on such targets.

@enjoy-digital
Copy link
Owner

Thanks @davidar, this make sense. I'll review it very soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants