| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#include <platform_def.h> |
| 9 |
|
| 10 |
#include <bl1/bl1.h> |
| 11 |
#include <common/bl_common.h> |
| 12 |
#include <common/debug.h> |
| 13 |
#include <drivers/arm/sp805.h> |
| 14 |
#include <drivers/console.h> |
| 15 |
#include <plat/common/platform.h> |
| 16 |
|
| 17 |
#include <plat_marvell.h> |
| 18 |
|
| 19 |
|
| 20 |
#pragma weak bl1_early_platform_setup |
| 21 |
#pragma weak bl1_plat_arch_setup |
| 22 |
#pragma weak bl1_platform_setup |
| 23 |
#pragma weak bl1_plat_sec_mem_layout |
| 24 |
|
| 25 |
|
| 26 |
static meminfo_t bl1_ram_layout; |
| 27 |
|
| 28 |
meminfo_t *bl1_plat_sec_mem_layout(void) |
| 29 |
{ |
| 30 |
return &bl1_ram_layout; |
| 31 |
} |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
void marvell_bl1_early_platform_setup(void) |
| 37 |
{ |
| 38 |
|
| 39 |
marvell_console_boot_init(); |
| 40 |
|
| 41 |
|
| 42 |
bl1_ram_layout.total_base = MARVELL_BL_RAM_BASE; |
| 43 |
bl1_ram_layout.total_size = MARVELL_BL_RAM_SIZE; |
| 44 |
} |
| 45 |
|
| 46 |
void bl1_early_platform_setup(void) |
| 47 |
{ |
| 48 |
marvell_bl1_early_platform_setup(); |
| 49 |
} |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
void marvell_bl1_plat_arch_setup(void) |
| 58 |
{ |
| 59 |
marvell_setup_page_tables(bl1_ram_layout.total_base, |
| 60 |
bl1_ram_layout.total_size, |
| 61 |
BL1_RO_BASE, |
| 62 |
BL1_RO_LIMIT, |
| 63 |
BL1_RO_DATA_BASE, |
| 64 |
BL1_RO_DATA_END |
| 65 |
#if USE_COHERENT_MEM |
| 66 |
, BL_COHERENT_RAM_BASE, |
| 67 |
BL_COHERENT_RAM_END |
| 68 |
#endif |
| 69 |
); |
| 70 |
enable_mmu_el3(0); |
| 71 |
} |
| 72 |
|
| 73 |
void bl1_plat_arch_setup(void) |
| 74 |
{ |
| 75 |
marvell_bl1_plat_arch_setup(); |
| 76 |
} |
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
void marvell_bl1_platform_setup(void) |
| 83 |
{ |
| 84 |
|
| 85 |
plat_marvell_io_setup(); |
| 86 |
} |
| 87 |
|
| 88 |
void bl1_platform_setup(void) |
| 89 |
{ |
| 90 |
marvell_bl1_platform_setup(); |
| 91 |
} |
| 92 |
|
| 93 |
void bl1_plat_prepare_exit(entry_point_info_t *ep_info) |
| 94 |
{ |
| 95 |
#ifdef EL3_PAYLOAD_BASE |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
marvell_program_trusted_mailbox(ep_info->pc); |
| 102 |
dsbsy(); |
| 103 |
sev(); |
| 104 |
#endif |
| 105 |
} |