Merge "fix(intel): this patch is used to solve DDR and VAB" into integration

This commit is contained in:
Mark Dykes 2025-03-14 16:34:14 +01:00 committed by TrustedFirmware Code Review
commit af74739f2a
4 changed files with 17 additions and 12 deletions

View file

@ -1,7 +1,7 @@
/* /*
* Copyright (c) 2019-2022, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2019-2022, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2019-2023, Intel Corporation. All rights reserved. * Copyright (c) 2019-2023, Intel Corporation. All rights reserved.
* Copyright (c) 2024, Altera Corporation. All rights reserved. * Copyright (c) 2024-2025, Altera Corporation. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -190,6 +190,7 @@ int bl2_plat_handle_post_image_load(unsigned int image_id)
ret = socfpga_vab_init(image_id); ret = socfpga_vab_init(image_id);
if (ret < 0) { if (ret < 0) {
ERROR("SOCFPGA VAB Authentication failed\n"); ERROR("SOCFPGA VAB Authentication failed\n");
while (1)
wfi(); wfi();
} }
#endif #endif

View file

@ -61,6 +61,10 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
console_16550_register(PLAT_INTEL_UART_BASE, PLAT_UART_CLOCK, console_16550_register(PLAT_INTEL_UART_BASE, PLAT_UART_CLOCK,
PLAT_BAUDRATE, &console); PLAT_BAUDRATE, &console);
/* Enable TF-A BL31 logs when running from non-secure world also. */
console_set_scope(&console,
(CONSOLE_FLAG_BOOT | CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH));
setup_smmu_stream_id(); setup_smmu_stream_id();
/* /*
@ -290,7 +294,7 @@ void bl31_plat_set_secondary_cpu_off(void)
void bl31_plat_runtime_setup(void) void bl31_plat_runtime_setup(void)
{ {
console_switch_state(CONSOLE_FLAG_RUNTIME|CONSOLE_FLAG_BOOT); /* Dummy override function. */
} }
void bl31_plat_enable_mmu(uint32_t flags) void bl31_plat_enable_mmu(uint32_t flags)

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2024, Altera Corporation. All rights reserved. * Copyright (c) 2024-2025, Altera Corporation. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -370,10 +370,10 @@ int agilex5_ddr_init(handoff *hoff_ptr)
/* DDR size queried from the IOSSM controller */ /* DDR size queried from the IOSSM controller */
hw_ddr_size = (phys_size_t)io96b_ctrl.overall_size * SZ_1G / SZ_8; hw_ddr_size = (phys_size_t)io96b_ctrl.overall_size * SZ_1G / SZ_8;
/* TODO: Hard code 1GB as of now, and DDR start and end address */ /* TODO: To update config_ddr_size by using FDT in the future. */
config_ddr_size = 0x40000000; config_ddr_size = 0x80000000;
ddr_info_set[0].start = 0x80000000; ddr_info_set[0].start = DRAM_BASE;
ddr_info_set[0].size = 0x40000000; ddr_info_set[0].size = hw_ddr_size;
if (config_ddr_size != hw_ddr_size) { if (config_ddr_size != hw_ddr_size) {
WARN("DDR: DDR size configured is (%lld MiB)\n", config_ddr_size >> 20); WARN("DDR: DDR size configured is (%lld MiB)\n", config_ddr_size >> 20);

View file

@ -1,7 +1,7 @@
/* /*
* Copyright (c) 2019, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2019, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2019-2023, Intel Corporation. All rights reserved. * Copyright (c) 2019-2023, Intel Corporation. All rights reserved.
* Copyright (c) 2024, Altera Corporation. All rights reserved. * Copyright (c) 2024-2025, Altera Corporation. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -113,10 +113,10 @@ int socfpga_vab_authentication(void **p_image, size_t *p_size)
VERBOSE("mbox_data_addr = %lx mbox_data_sz = %d\n", mbox_data_addr, mbox_data_sz); VERBOSE("mbox_data_addr = %lx mbox_data_sz = %d\n", mbox_data_addr, mbox_data_sz);
memcpy_s(mbox_relocate_data_addr, mbox_data_sz * sizeof(uint32_t), memcpy_s(mbox_relocate_data_addr, (mbox_data_sz * sizeof(uint32_t)) / MBOX_WORD_BYTE,
(uint8_t *)mbox_data_addr, mbox_data_sz * sizeof(uint32_t)); (uint8_t *)mbox_data_addr, (mbox_data_sz * sizeof(uint32_t)) / MBOX_WORD_BYTE);
*((unsigned int *)mbox_relocate_data_addr) = CCERT_CMD_TEST_PGM_MASK; *((unsigned int *)mbox_relocate_data_addr) = 0;
do { do {
/* Invoke SMC call to ATF to send the VAB certificate to SDM */ /* Invoke SMC call to ATF to send the VAB certificate to SDM */