void bl1_plat_set_ep_info(unsigned int image_id, entry_point_info_t *ep_info) { unsigned int data = 0; uintptr_t tmp = HIKEY960_NS_TMP_OFFSET; if (image_id != NS_BL1U_IMAGE_ID) panic(); /* Copy NS BL1U from 0x1AC1_8000 to 0x1AC9_8000 */ memcpy((void *)tmp, (void *)HIKEY960_NS_IMAGE_OFFSET, NS_BL1U_SIZE); memcpy((void *)NS_BL1U_BASE, (void *)tmp, NS_BL1U_SIZE); inv_dcache_range(NS_BL1U_BASE, NS_BL1U_SIZE); /* Initialize the GIC driver, cpu and distributor interfaces */ gicv2_driver_init(&hikey960_gic_data); gicv2_distif_init(); gicv2_pcpu_distif_init(); gicv2_cpuif_enable(); /* CNTFRQ is read-only in EL1 */ write_cntfrq_el0(plat_get_syscnt_freq2()); data = read_cpacr_el1(); do { data |= 3 << 20; write_cpacr_el1(data); data = read_cpacr_el1(); } while ((data & (3 << 20)) != (3 << 20)); INFO("cpacr_el1:0x%x\n", data); ep_info->args.arg0 = 0xffff & read_mpidr(); ep_info->spsr = SPSR_64(MODE_EL1, MODE_SP_ELX, DISABLE_ALL_EXCEPTIONS); }
/******************************************************************************* * Perform platform specific setup placeholder ******************************************************************************/ void tsp_platform_setup(void) { uint32_t gicc_base, gicd_base; /* Initialize the GIC driver, cpu and distributor interfaces */ get_gic_offset(&gicc_base, &gicd_base); ls_gic_data.gicd_base = (uintptr_t)gicd_base; ls_gic_data.gicc_base = (uintptr_t)gicc_base; gicv2_driver_init(&ls_gic_data); gicv2_distif_init(); gicv2_pcpu_distif_init(); gicv2_cpuif_enable(); }
/****************************************************************************** * ARM common helper to initialize the GICv2 only driver. *****************************************************************************/ void plat_arm_gic_driver_init(void) { gicv2_driver_init(&arm_gic_data); }
/****************************************************************************** * RockChip common helper to initialize the GICv2 only driver. *****************************************************************************/ void plat_rockchip_gic_driver_init(void) { gicv2_driver_init(&rockchip_gic_data); }
/* * ARM common helper to initialize the GICv2 only driver. */ void plat_marvell_gic_driver_init(void) { gicv2_driver_init(&marvell_gic_data); }