-
Notifications
You must be signed in to change notification settings - Fork 36
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
USB FW Memory Carveout Marked as Useable #111
Comments
Thanks for the report, @pnewman-cti! We're looking into it. |
I dug into this a little more. Here are the output of the UEFI shell memmap command before and after my above fix: memmap_before_fix.txt Before removing the XUSB carveout from the "usable regions" it shows as "Reserved" when running memmap. This makes sense because T234AddBootloaderCarveouts() "Resource Descriptor Hob" with the "EfiReservedMemoryType". This should mean it cannot be used for memory allocation, however it clearly is being used according to ADDR field of the RAS error. I think the real bug is in the InstallDramWithCarveouts() function in Silicon/NVIDIA/Library/DramCarveoutLib/DramCarveoutLib.c. It adds all of the "UsableCarveoutRegions" to the "LargestRegions", then it calls BuildResourceDescriptorHob() on all the "LargestRegions". This creates a second EFI_RESOURCE_SYSTEM_MEMORY (NOT Reserved) "Resource Descriptor Hob" for all the "UsableCarveoutRegions".
Adding some prints to MemoryRegionInsert() I confirmed the "UsableCarveoutRegions" are being added to the "LargestRegions".
The following patch solves the issue (previous patch reverted). I think this is the correct way to solve the issue but it would be good for someone else to double check,
|
Thank you so much for your detailed analysis, @pnewman-cti! We think it's on target. We have been working this issue internally, too. I don't think we'll have a fix in time for the next release (uefi-202412.0), but will include it in the next point release (uefi-202412.1). |
Great! Thank you :). Let me know if you need anything else. |
As of commit f6b220e6550521bd2663062d1ad42ecd3a41bfe7 the XUSB Firmware memory carveout (CARVEOUT_XUSB) has been added to the "Usable Memory Regions" which allows UEFI to allocate memory from that region.
When this happens it triggers a "Carveout Uncorrectable Error", below is an example from Orin NX 16GB:
The same error happens on Orin NX 8GB but the ADDR value is 0x8000000272f02820 instead of 0x8000000472f02820 because the XUSB carveout is in a different location.
This error is fairly repeatable on the Orin NX platform when attempting to PXE boot. Enabling prints in DramCarveoutLib.c shows 0x472F00000 is a "Usable Carveout":
Making the following change fixes this issue:
However, I am not sure if this has other side effects.
I have attached a full serial debug log of attempting to PXE boot with an Orin NX 16GB:
pxe_boot_error_serial.log
The text was updated successfully, but these errors were encountered: