> From: Alessandro Pistocchi <[email protected]>
> Date: Tue, 26 May 2026 18:35:42 +0100
> 
> Hi all,
> 
> I am writing a custom, non-uefi bootloader for the raspberry pi4.

I have no interest in supporting this.

> It all works fine except for the following.
> 
> dma_constraint is set to 0x0-0x3bffffff as in uefi bootloader.
> 
> One driver using bus_dma_alloc gets physical page 0 as dma memory.
> 
> I map that memory into userspace for some custom usage.
> 
> That causes a segfault in userspace when writing to that memory and an uvm 
> panic when I reboot.
> 
> The weird thing is that if I set dma_constraint to 0x1000-0x3bffffff, 
> excluding page 0, everything works perfectly as if I was using the usual uefi 
> bootloader.
> 
> What could cause this? Is the first page of physical memory special? If so, 
> why is it not excluded from dma_constraint in the uefi bootloader?
> 
> Thank you all in advance for your help,
> Alessandro 
> 
> Sent from my iPhone
> 

Reply via email to