Hi all! We using W21H2-1-5-0-imx-windows-bsp to build BSP firmware, and burn to emmc on our custom board, u-boot is running normally. However, win-pe failed to install the image correctly and crashed, I suspect it's ddr, but I don't know how to make imx8mp support 4G ddr. Please help me. Thank you very much.
Our DDR datasheet:
log:
Hi ivychend
Has the problem been resolved? I am also facing the same problem here. Modifying DDR according to the patch has no effect。
Hi @ivychend,
the RAM available for windows is configured in the file mu_platform_nxp/NXP/MX8M_PLUS_EVK/MX8M_PLUS_EVK.dsc. To change RAM size from 6GB set for EVK to 4GB, you need to change this line:
giMX8TokenSpaceGuid.PcdBank1MemorySize|0x00000000C0000000
to
giMX8TokenSpaceGuid.PcdBank1MemorySize|0x0000000040000000
And to see correct value in task manager, it has to be also adjusted in mu_platform_nxp/NXP/MX8M_PLUS_EVK/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c in tabels mArmDefaultType16 and mArmDefaultType17.
Best Regards, Jakub
Thank you for your reply,but I've already made some changes,please look at this diff info.
git diff mu_platform_nxp/NXP/MX8M_PLUS_EVK/
diff --git a/mu_platform_nxp/NXP/MX8M_PLUS_EVK/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/mu_platform_nxp/NXP/MX8M_PLUS_EVK/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
index f9ddadb..0aca646 100644
--- a/mu_platform_nxp/NXP/MX8M_PLUS_EVK/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
+++ b/mu_platform_nxp/NXP/MX8M_PLUS_EVK/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
@@ -412,7 +412,8 @@ STATIC CONST ARM_TYPE16 mArmDefaultType16 = {
MemoryArrayLocationSystemBoard, //on motherboard
MemoryArrayUseSystemMemory, //system RAM
MemoryErrorCorrectionNone,
- 0x2000000, //8GB
+ //0x2000000, //8GB
+ 0x1000000, //4GB
0xFFFE, //No error information structure
0x1, //soldered memory
},
@@ -431,7 +432,8 @@ STATIC CONST ARM_TYPE17 mArmDefaultType17 = {
0xFFFE, //no errors
0xFFFF, // unknown total width
0xFFFF, // unknown data width
- 0x1800, // 6GB
+ //0x1800, // 6GB
+ 0x1000, //4GB
0x05, // Chip
0, //not part of a set
1, //Device locator
diff --git a/mu_platform_nxp/NXP/MX8M_PLUS_EVK/MX8M_PLUS_EVK.dsc b/mu_platform_nxp/NXP/MX8M_PLUS_EVK/MX8M_PLUS_EVK.dsc
index 05e9358..30ffb5b 100644
--- a/mu_platform_nxp/NXP/MX8M_PLUS_EVK/MX8M_PLUS_EVK.dsc
+++ b/mu_platform_nxp/NXP/MX8M_PLUS_EVK/MX8M_PLUS_EVK.dsc
@@ -170,14 +170,15 @@
gArmTokenSpaceGuid.PcdSystemMemorySize|0xB1F00000
!endif
!else
- gArmTokenSpaceGuid.PcdSystemMemorySize|0xC0000000
+ #gArmTokenSpaceGuid.PcdSystemMemorySize|0xC0000000
+ gArmTokenSpaceGuid.PcdSystemMemorySize|0x80000000
!endif
# 3GB in the 5GB bank of memory above 32 bit address space
giMX8TokenSpaceGuid.PcdBank1MemoryBase|0x0000000100000000
#TODO: se the "Bank1 Size" to 4G to enable RAM above 4G, USB is not working with upper RAM
- giMX8TokenSpaceGuid.PcdBank1MemorySize|0x00000000C0000000
-# giMX8TokenSpaceGuid.PcdBank1MemorySize|0x000000000000000
+# giMX8TokenSpaceGuid.PcdBank1MemorySize|0x00000000C0000000
+ giMX8TokenSpaceGuid.PcdBank1MemorySize|0x0000000040000000
# GOP driver memory
!if $(CONFIG_HEADLESS) == TRUE
The problem still exist, is there anything else that needs to be revised? Thank you again.
Hi @ivychend,
1/ just to be sure, do you have correct DDR timing file prepared for your custom board?
For 4GB you need a different timing file than the one which is in the BSP. We have a tool for that - put the data according to the datasheet and it generates the timing file:
https://www.nxp.com/design/design-center/development-boards/i-mx-evaluation-and-development-boards/c...
User's Guide is included.
2/ Please leave PcdSystemMemorySize as it is in BSP with value 0xC0000000, which means 3GB. We have tested 4GB DDR with this setting in configuration 3GB PcdSystemMemorySize + 1GB PcdBank1MemorySize.
By setting the PcdSystemMemorySize to 2GB, the areas with GPU and Trust zone memory will find itself out of the System Memory, which is not correct. You can check the Mini or Nano dsc file, there you can see, that for 2GB DDR, the addresses of GPU and Trust zone areas are shifted 1GB down to fit in the Windows System memory.
Best Regards, Jakub
Hi @ivychend,
two rank and two channel LPDDR4 should work with i.MX8M Plus:
When one is not sure if memory is working correctly, u-boot md command can be used from u-boot shell. E.g. :
usb start; fatload usb 0:1 0x0000000100000000 some_file_one_USB_stick.bin ; md 0x0000000100000000
it will start USB, read file from USB to memory location given by address, and then it will show content of target memory location with md command.
Or Memtest86+ arm64 variant can be use, please check: https://community.nxp.com/t5/i-MX-Processors/Cannot-boot-into-WinPe-for-Windows-10-IoT/m-p/1717890/h...
A have attached patch for BSP 1.4.1 for MP with 4GB. It has only changes needed for Windows, DDR timing file is not changed, as it is only for demonstration with EVK.
I have also once did that error, that I was not building firmware with -c argument and only built changed files. I have copied timing file for different DDR into existing and previously build project folder and did not notice, that it's file date is older than my last time of build. That way I had the correct timing file in project, but it was not used for build.
Best Regards, Jakub