@@ -12,6 +12,7 @@
#define HW_ARM_BOOT_H
#include "target/arm/cpu-qom.h"
+//#include "target/arm/psci.h"
#include "qemu/notify.h"
typedef enum {
@@ -100,7 +101,7 @@ struct arm_boot_info {
* as the conduit specifies calls should go to (eg guest firmware booted
* to EL3) then PSCI will not be enabled.
*/
- int psci_conduit;
+ int psci_conduit;//
/* Used internally by arm_boot.c */
int is_linux;
hwaddr initrd_start;
@@ -3098,11 +3098,8 @@ static inline bool bswap_code(bool sctlr_b)
#endif
}
-enum {
- QEMU_PSCI_CONDUIT_DISABLED = 0,
- QEMU_PSCI_CONDUIT_SMC = 1,
- QEMU_PSCI_CONDUIT_HVC = 2,
-};
+void cpu_get_tb_cpu_state(CPUARMState *env, vaddr *pc,
+ uint64_t *cs_base, uint32_t *flags);
#ifndef CONFIG_USER_ONLY
/* Return the address space index to use for a memory access */
new file mode 100644
@@ -0,0 +1,18 @@
+/*
+ * ARM Power State Coordination Interface (PSCI) definitions
+ *
+ * Copyright (c) 2003 Fabrice Bellard
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#ifndef TARGET_ARM_PSCI_H
+#define TARGET_ARM_PSCI_H
+
+enum {
+ QEMU_PSCI_CONDUIT_DISABLED = 0,
+ QEMU_PSCI_CONDUIT_SMC = 1,
+ QEMU_PSCI_CONDUIT_HVC = 2,
+};
+
+#endif
@@ -27,6 +27,7 @@
#include "hw/qdev-properties.h"
#include "hw/arm/allwinner-r40.h"
#include "hw/arm/boot.h"
+#include "target/arm/psci.h"
static struct arm_boot_info bpim2u_binfo;
@@ -29,6 +29,7 @@
#include "qemu/config-file.h"
#include "qemu/option.h"
#include "qemu/units.h"
+#include "target/arm/psci.h"
/* Kernel boot protocol is specified in the kernel docs
* Documentation/arm/Booting and Documentation/arm64/booting.txt
@@ -36,6 +36,7 @@
#include "qemu/log.h"
#include "qom/object.h"
#include "target/arm/cpu-qom.h"
+#include "target/arm/psci.h"
#define SMP_BOOT_ADDR 0x100
#define SMP_BOOT_REG 0x40
@@ -15,6 +15,7 @@
#include "system/qtest.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
+#include "target/arm/psci.h"
#include <libfdt.h>
static void imx8mp_evk_modify_dtb(const struct arm_boot_info *info, void *fdt)
@@ -18,6 +18,7 @@
#include "hw/qdev-properties.h"
#include "qemu/error-report.h"
#include "system/qtest.h"
+#include "target/arm/psci.h"
static void mcimx6ul_evk_init(MachineState *machine)
{
@@ -20,6 +20,7 @@
#include "hw/qdev-properties.h"
#include "qemu/error-report.h"
#include "system/qtest.h"
+#include "target/arm/psci.h"
static void mcimx7d_sabre_init(MachineState *machine)
{
@@ -26,6 +26,7 @@
#include "hw/qdev-properties.h"
#include "hw/arm/allwinner-h3.h"
#include "hw/arm/boot.h"
+#include "target/arm/psci.h"
static struct arm_boot_info orangepi_binfo;
@@ -53,6 +53,7 @@
#include "target/arm/cpu-qom.h"
#include "target/arm/gtimer.h"
#include "target/arm/multiprocessing.h"
+#include "target/arm/psci.h"
#define RAMLIMIT_GB 8192
#define RAMLIMIT_BYTES (RAMLIMIT_GB * GiB)
@@ -59,6 +59,7 @@
#include "hw/acpi/viot.h"
#include "hw/virtio/virtio-acpi.h"
#include "target/arm/multiprocessing.h"
+#include "target/arm/psci.h"
#define ARM_SPI_BASE 32
@@ -79,6 +79,7 @@
#include "target/arm/internals.h"
#include "target/arm/multiprocessing.h"
#include "target/arm/gtimer.h"
+#include "target/arm/psci.h"
#include "hw/mem/pc-dimm.h"
#include "hw/mem/nvdimm.h"
#include "hw/acpi/generic_event_device.h"
@@ -21,6 +21,7 @@
#include "hw/arm/xlnx-versal.h"
#include "hw/arm/boot.h"
#include "target/arm/multiprocessing.h"
+#include "target/arm/psci.h"
#include "qom/object.h"
#define TYPE_XLNX_VERSAL_VIRT_MACHINE MACHINE_TYPE_NAME("xlnx-versal-virt")
@@ -26,6 +26,7 @@
#include "qom/object.h"
#include "net/can_emu.h"
#include "audio/audio.h"
+#include "target/arm/psci.h"
struct XlnxZCU102 {
MachineState parent_obj;
@@ -53,6 +53,7 @@
#include "system/system.h"
#include "target/arm/gtimer.h"
#include "target/arm/multiprocessing.h"
+#include "target/arm/psci.h"
struct VMAppleMachineState {
MachineState parent;
@@ -34,6 +34,7 @@
#endif
#include "cpregs.h"
#include "target/arm/gtimer.h"
+#include "target/arm/psci.h"
#define HELPER_H "tcg/helper.h"
#include "exec/helper-proto.h.inc"
@@ -33,6 +33,7 @@
#include "target/arm/internals.h"
#include "target/arm/multiprocessing.h"
#include "target/arm/gtimer.h"
+#include "target/arm/psci.h"
#include "trace.h"
#include "migration/vmstate.h"
@@ -26,6 +26,7 @@
#include "accel/tcg/cpu-ldst.h"
#include "accel/tcg/probe.h"
#include "target/arm/gtimer.h"
+#include "target/arm/psci.h"
#include "cpregs.h"
#define SIGNBIT (uint32_t)0x80000000
@@ -25,6 +25,7 @@
#include "internals.h"
#include "arm-powerctl.h"
#include "target/arm/multiprocessing.h"
+#include "target/arm/psci.h"
bool arm_is_psci_call(ARMCPU *cpu, int excp_type)
{