blob: c90da367ef2f78e95a30932317d028388c4c175a [file] [log] [blame]
Raef Coles15a37f82021-12-07 15:59:14 +00001/*
Raef Colesf8426362024-01-15 12:38:10 +00002 * Copyright (c) 2022-2024, Arm Limited. All rights reserved.
Raef Coles15a37f82021-12-07 15:59:14 +00003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#include "image.h"
9
10#include "Driver_Flash.h"
11#include "flash_layout.h"
12#include "region_defs.h"
13#include "fih.h"
14
15extern ARM_DRIVER_FLASH FLASH_DEV_NAME;
16
17fih_int bl1_read_bl1_2_image(uint8_t *image)
18{
Raef Coles15a37f82021-12-07 15:59:14 +000019 fih_int fih_rc;
20
21 fih_rc = fih_int_encode(FLASH_DEV_NAME.ReadData(BL1_2_IMAGE_FLASH_OFFSET,
22 image,
23 BL1_2_CODE_SIZE);
24
25 FIH_RET(fih_rc);
26}