Add two fields that will hold TARGET_PAGE_BITS,
TARGET_PAGE_BITS_VARY, TARGET_PAGE_BITS_LEGACY.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <
20260217095106.598486-3-richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
#include "qemu/target-info-impl.h"
#include "hw/arm/machines-qom.h"
#include "target/arm/cpu-qom.h"
+#include "target/arm/cpu-param.h"
static const TargetInfo target_info_aarch64_system = {
.target_name = "aarch64",
.cpu_type = TYPE_ARM_CPU,
.machine_typename = TYPE_TARGET_AARCH64_MACHINE,
.endianness = ENDIAN_MODE_LITTLE,
+ .page_bits_vary = true,
+ .page_bits_init = TARGET_PAGE_BITS_LEGACY,
};
const TargetInfo *target_info(void)
#include "qemu/target-info-impl.h"
#include "hw/arm/machines-qom.h"
#include "target/arm/cpu-qom.h"
+#include "target/arm/cpu-param.h"
static const TargetInfo target_info_arm_system = {
.target_name = "arm",
.cpu_type = TYPE_ARM_CPU,
.machine_typename = TYPE_TARGET_ARM_MACHINE,
.endianness = ENDIAN_MODE_LITTLE,
+ .page_bits_vary = true,
+ .page_bits_init = TARGET_PAGE_BITS_LEGACY,
};
const TargetInfo *target_info(void)
const char *machine_typename;
/* related to TARGET_BIG_ENDIAN definition */
EndianMode endianness;
+ /*
+ * runtime equivalent of
+ * TARGET_PAGE_BITS_VARY ? TARGET_PAGE_BITS_LEGACY : TARGET_PAGE_BITS
+ */
+ unsigned page_bits_init;
+ /* runtime equivalent of TARGET_PAGE_BITS_VARY definition */
+ bool page_bits_vary;
} TargetInfo;
/**
.cpu_type = CPU_RESOLVING_TYPE,
.machine_typename = TYPE_MACHINE,
.endianness = TARGET_BIG_ENDIAN ? ENDIAN_MODE_BIG : ENDIAN_MODE_LITTLE,
+#ifdef TARGET_PAGE_BITS_VARY
+ .page_bits_vary = true,
+# ifdef TARGET_PAGE_BITS_LEGACY
+ .page_bits_init = TARGET_PAGE_BITS_LEGACY,
+# endif
+#else
+ .page_bits_vary = false,
+ .page_bits_init = TARGET_PAGE_BITS,
+#endif
};
const TargetInfo *target_info(void)