mirror of
https://github.com/memtest86plus/memtest86plus
synced 2025-03-13 01:13:11 +03:00
system/loongarch: Fix a bug about the memory boundary. (#447)
In LoongArch, the addresses from 0x30000000 to 0x80000000 are 32-bit PCI memory space, If the BAR happens start at 0x30000000, a mapping error will occur according to the old logic, and 0x30000000 should also be mapped, so fix it. Signed-off-by: Chao Li <lichao@loongson.cn>
This commit is contained in:
parent
f34a85ce07
commit
a52ad6aa61
@ -29,7 +29,7 @@ extern uint8_t highest_map_bit;
|
||||
|
||||
uintptr_t map_region(uintptr_t base_addr, size_t size __attribute__((unused)), bool only_for_startup __attribute__((unused)))
|
||||
{
|
||||
if (((base_addr < 0x80000000) && (base_addr > 0x30000000)) || ((base_addr & PCI_IO_PERFIX) != 0x0)) {
|
||||
if (((base_addr < 0x80000000) && (base_addr >= 0x30000000)) || ((base_addr & PCI_IO_PERFIX) != 0x0)) {
|
||||
return MMIO_BASE | base_addr;
|
||||
} else if ((base_addr < 0x20000000) && (base_addr > 0x10000000)) {
|
||||
return DMW0_BASE | base_addr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user