mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-18 10:27:06 +02:00
By default the Arm Ethos-N NPU will boot up in secure mode. In this mode the non-secure world cannot access the registers needed to use the NPU. To still allow the non-secure world to use the NPU, a SiP service has been added that can delegate non-secure access to the registers needed to use it. Only the HW_CONFIG for the Arm Juno platform has been updated to include the device tree for the NPU and the platform currently only loads the HW_CONFIG in AArch64 builds. Signed-off-by: Mikael Olsson <mikael.olsson@arm.com> Change-Id: I65dfd864042ed43faae0a259dcf319cbadb5f3d2
36 lines
787 B
C
36 lines
787 B
C
/*
|
|
* Copyright (c) 2021, Arm Limited. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef FCONF_ETHOSN_GETTER_H
|
|
#define FCONF_ETHOSN_GETTER_H
|
|
|
|
#include <assert.h>
|
|
|
|
#include <lib/fconf/fconf.h>
|
|
|
|
#define hw_config__ethosn_config_getter(prop) ethosn_config.prop
|
|
#define hw_config__ethosn_core_addr_getter(idx) __extension__ ({ \
|
|
assert(idx < ethosn_config.num_cores); \
|
|
ethosn_config.core_addr[idx]; \
|
|
})
|
|
|
|
#define ETHOSN_STATUS_DISABLED U(0)
|
|
#define ETHOSN_STATUS_ENABLED U(1)
|
|
|
|
#define ETHOSN_CORE_NUM_MAX U(64)
|
|
|
|
struct ethosn_config_t {
|
|
uint8_t status;
|
|
uint32_t num_cores;
|
|
uint64_t core_addr[ETHOSN_CORE_NUM_MAX];
|
|
};
|
|
|
|
int fconf_populate_arm_ethosn(uintptr_t config);
|
|
|
|
extern struct ethosn_config_t ethosn_config;
|
|
|
|
#endif /* FCONF_ETHOSN_GETTER_H */
|