Angel Pons | bbc99cf | 2020-04-04 18:51:23 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Lin Huang | fe7aa20 | 2016-03-19 22:44:39 +0800 | [diff] [blame] | 2 | |
Lin Huang | fe7aa20 | 2016-03-19 22:44:39 +0800 | [diff] [blame] | 3 | #include <arch/mmu.h> |
| 4 | #include <bootblock_common.h> |
Lin Huang | fe7aa20 | 2016-03-19 22:44:39 +0800 | [diff] [blame] | 5 | #include <soc/mmu_operations.h> |
| 6 | #include <symbols.h> |
| 7 | |
Julius Werner | 8f25a66 | 2018-05-14 11:43:30 -0700 | [diff] [blame] | 8 | void decompressor_soc_init(void) |
Lin Huang | fe7aa20 | 2016-03-19 22:44:39 +0800 | [diff] [blame] | 9 | { |
| 10 | mmu_init(); |
| 11 | |
| 12 | /* Set 0x0 to max sdram(4GiB) supported by RK3399 as device memory. |
| 13 | * We want to configure mmio space(start at 0xf8000000) to DEV_MEM, |
| 14 | * some boards may use 2GB sdram in future(who knows). |
| 15 | */ |
| 16 | mmu_config_range((void *)0, (uintptr_t)4 * GiB, DEV_MEM); |
| 17 | |
Julius Werner | 7e0dea6 | 2019-02-20 18:39:22 -0800 | [diff] [blame] | 18 | mmu_config_range(_sram, REGION_SIZE(sram), SECURE_MEM); |
Lin Huang | fe7aa20 | 2016-03-19 22:44:39 +0800 | [diff] [blame] | 19 | |
| 20 | mmu_enable(); |
| 21 | } |