123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- #include <assert.h>
- #include <platform_def.h>
- #include <common/bl_common.h>
- #include <common/debug.h>
- #include <common/desc_image_load.h>
- #include <drivers/console.h>
- #include <drivers/generic_delay_timer.h>
- #include <drivers/ti/uart/uart_16550.h>
- #include <lib/mmio.h>
- #include <plat_private.h>
- #include <plat/common/platform.h>
- static entry_point_info_t bl32_ep_info;
- static entry_point_info_t bl33_ep_info;
- entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type)
- {
- entry_point_info_t *next_image_info;
- next_image_info = (type == NON_SECURE) ? &bl33_ep_info : &bl32_ep_info;
- assert(next_image_info->h.type == PARAM_EP);
-
- if (next_image_info->pc)
- return next_image_info;
- else
- return NULL;
- }
- #pragma weak params_early_setup
- void params_early_setup(u_register_t plat_param_from_bl2)
- {
- }
- void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- u_register_t arg2, u_register_t arg3)
- {
- static console_t console;
- params_early_setup(arg1);
- if (rockchip_get_uart_base() != 0)
- console_16550_register(rockchip_get_uart_base(),
- rockchip_get_uart_clock(),
- rockchip_get_uart_baudrate(), &console);
- VERBOSE("bl31_setup\n");
- bl31_params_parse_helper(arg0, &bl32_ep_info, &bl33_ep_info);
- }
- void bl31_platform_setup(void)
- {
- generic_delay_timer_init();
- plat_rockchip_soc_init();
-
- plat_rockchip_gic_driver_init();
- plat_rockchip_gic_init();
- plat_rockchip_pmu_init();
- }
- void bl31_plat_arch_setup(void)
- {
- plat_cci_init();
- plat_cci_enable();
- #if USE_COHERENT_MEM
- plat_configure_mmu_el3(BL_CODE_BASE,
- BL_COHERENT_RAM_END - BL_CODE_BASE,
- BL_CODE_BASE,
- BL_CODE_END,
- BL_COHERENT_RAM_BASE,
- BL_COHERENT_RAM_END);
- #else
- plat_configure_mmu_el3(BL31_START,
- BL31_END - BL31_START,
- BL_CODE_BASE,
- BL_CODE_END,
- 0,
- 0);
- #endif
- }
|