blob: 159c44f7a51a208eab49cab4195cce1e233c08b7 [file] [log] [blame]
Jens Wiklander52c798e2015-12-07 14:37:10 +01001/*
Ruchika Gupta5c172532022-04-08 13:14:44 +05302 * Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved.
Jens Wiklander52c798e2015-12-07 14:37:10 +01003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Jens Wiklander52c798e2015-12-07 14:37:10 +01005 */
6
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef QEMU_PRIVATE_H
8#define QEMU_PRIVATE_H
Jens Wiklander52c798e2015-12-07 14:37:10 +01009
Antonio Nino Diaz4b32e622018-08-16 16:52:57 +010010#include <stdint.h>
Jens Wiklander52c798e2015-12-07 14:37:10 +010011
Antonio Nino Diaz099b0b12018-09-26 09:29:45 +010012void qemu_configure_mmu_svc_mon(unsigned long total_base,
Etienne Carriere911de8c2018-02-02 13:23:22 +010013 unsigned long total_size,
Michalis Pappasba861122018-02-28 14:36:03 +080014 unsigned long code_start, unsigned long code_limit,
Etienne Carriere911de8c2018-02-02 13:23:22 +010015 unsigned long ro_start, unsigned long ro_limit,
16 unsigned long coh_start, unsigned long coh_limit);
17
Jens Wiklander52c798e2015-12-07 14:37:10 +010018void qemu_configure_mmu_el1(unsigned long total_base, unsigned long total_size,
Michalis Pappasba861122018-02-28 14:36:03 +080019 unsigned long code_start, unsigned long code_limit,
Jens Wiklander52c798e2015-12-07 14:37:10 +010020 unsigned long ro_start, unsigned long ro_limit,
21 unsigned long coh_start, unsigned long coh_limit);
22
23void qemu_configure_mmu_el3(unsigned long total_base, unsigned long total_size,
Michalis Pappasba861122018-02-28 14:36:03 +080024 unsigned long code_start, unsigned long code_limit,
Jens Wiklander52c798e2015-12-07 14:37:10 +010025 unsigned long ro_start, unsigned long ro_limit,
26 unsigned long coh_start, unsigned long coh_limit);
27
28void plat_qemu_io_setup(void);
Jens Wiklandera43c1282022-11-22 14:39:26 +010029int qemu_io_register_sp_pkg(const char *name, const char *uuid,
30 uintptr_t load_addr);
Jens Wiklander52c798e2015-12-07 14:37:10 +010031unsigned int plat_qemu_calc_core_pos(u_register_t mpidr);
32
Michalis Pappascca6cb72018-03-04 15:43:38 +080033void qemu_console_init(void);
Michalis Pappascca6cb72018-03-04 15:43:38 +080034
Hongbo Zhang32338ec2018-04-19 13:06:07 +080035void plat_qemu_gic_init(void);
36void qemu_pwr_gic_on_finish(void);
Andrew Walbran8fe72b92020-01-23 16:22:44 +000037void qemu_pwr_gic_off(void);
Hongbo Zhang32338ec2018-04-19 13:06:07 +080038
Ruchika Gupta5c172532022-04-08 13:14:44 +053039int qemu_set_tos_fw_info(uintptr_t config_base, uintptr_t log_addr,
40 size_t log_size);
41
42int qemu_set_nt_fw_info(
43/*
44 * Currently OP-TEE does not support reading DTBs from Secure memory
45 * and this option should be removed when feature is supported.
46 */
47#ifdef SPD_opteed
48 uintptr_t log_addr,
49#endif
50 size_t log_size,
51 uintptr_t *ns_log_addr);
52
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000053#endif /* QEMU_PRIVATE_H */