blob: c313cb63f2a823b76d86004f0f6dcf229c2337af [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);
29unsigned int plat_qemu_calc_core_pos(u_register_t mpidr);
30
Michalis Pappascca6cb72018-03-04 15:43:38 +080031void qemu_console_init(void);
Michalis Pappascca6cb72018-03-04 15:43:38 +080032
Hongbo Zhang32338ec2018-04-19 13:06:07 +080033void plat_qemu_gic_init(void);
34void qemu_pwr_gic_on_finish(void);
Andrew Walbran8fe72b92020-01-23 16:22:44 +000035void qemu_pwr_gic_off(void);
Hongbo Zhang32338ec2018-04-19 13:06:07 +080036
Ruchika Gupta5c172532022-04-08 13:14:44 +053037int qemu_set_tos_fw_info(uintptr_t config_base, uintptr_t log_addr,
38 size_t log_size);
39
40int qemu_set_nt_fw_info(
41/*
42 * Currently OP-TEE does not support reading DTBs from Secure memory
43 * and this option should be removed when feature is supported.
44 */
45#ifdef SPD_opteed
46 uintptr_t log_addr,
47#endif
48 size_t log_size,
49 uintptr_t *ns_log_addr);
50
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000051#endif /* QEMU_PRIVATE_H */