diff --git a/edk2-rockchip/Silicon/Rockchip/RK3588/Library/PlatformLib/Rk3588Mem.c b/edk2-rockchip/Silicon/Rockchip/RK3588/Library/PlatformLib/Rk3588Mem.c index 35eaf322d..aa2ab389c 100644 --- a/edk2-rockchip/Silicon/Rockchip/RK3588/Library/PlatformLib/Rk3588Mem.c +++ b/edk2-rockchip/Silicon/Rockchip/RK3588/Library/PlatformLib/Rk3588Mem.c @@ -81,7 +81,7 @@ ArmPlatformGetVirtualMemoryMap ( // Base System RAM VirtualMemoryTable[Index].PhysicalBase = mSystemMemoryBase; VirtualMemoryTable[Index].VirtualBase = VirtualMemoryTable[Index].PhysicalBase; - VirtualMemoryTable[Index].Length = MIN (mSystemMemorySize, 0xF0000000UL); + VirtualMemoryTable[Index].Length = MIN (mSystemMemorySize, 0xF0000000UL - mSystemMemoryBase); VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK; VirtualMemoryInfo[Index].Type = RK3588_MEM_BASIC_REGION; VirtualMemoryInfo[Index++].Name = L"System RAM";