mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-10-15 15:32:51 +00:00
Fixes for rc4:
* Fix compile failures of C++ files with new glib headers * mps3-an547: Use correct Cortex-M55 CPU and don't disable its FPU * accel/tcg: Fix assertion failure executing from non-RAM with -icount -----BEGIN PGP SIGNATURE----- iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmB7OY4ZHHBldGVyLm1h eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3tG9EACDzCnu0pfeizTDmemgdoxR aWYcr/vl0sPpA1wXlGFurtRX1dTeVcX+aA0qH752jLXzfNYYR7X1QDCqOn4XTMJk hACCyDBc1J0lHCrvgAEkx6A8yoSn2yaT27uoMvgeU5qX88/wOBIeZbH5Gti/BrIr hg5yg0IiQnCqFu897WPo4+F8sjvOaJEcPy7E0LhUzES6IiKWGfonKQh+QNI/1hsz Q4wtSSQSsACrnWIL9kcmjtNjrO0nY4tk3v7hgeLJq7bMZ2yOQ/h6A570o//AfUti pr1XaviCtpJDjeP3/gmyEPtIhjGzPX1GDdaX9+Ptr0qmwDj7Ygzel9NJrQklWvHY EDN5JeGp9yrashCYrgQHNO236f3+8OvXhVSNEcnlViV8naSaw4XL8vAAQN6Qp8tB BVuV+r+i5DQxl3O2ILu5mLdhi65sAzaRdHGPhQXeUb0OWviWDBX7G4scnWik2qSy LwUWSAtU+G7/4nY+AvA1d2Q+/viTZ4IgpAm/AvAlcUevCOGcF2LT7hCnk1isdX2S nZ0UPmi3DbUG358ipi8nZKvgRCTHofsMJXxmx3p+WPy9AEnKep9SEYFeH33bfnNP cSlBRn9JjHvr7vO0cOmRAmvjQMK4ioxCl7LlDR1/KPEwWFzdZAD1Yx3JhqXaxpcw g+PADYJHQej3JDpHyRtsZA== =/6nB -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210417' into staging Fixes for rc4: * Fix compile failures of C++ files with new glib headers * mps3-an547: Use correct Cortex-M55 CPU and don't disable its FPU * accel/tcg: Fix assertion failure executing from non-RAM with -icount # gpg: Signature made Sat 17 Apr 2021 20:39:58 BST # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20210417: accel/tcg: avoid re-translating one-shot instructions target/arm: drop CF_LAST_IO/dc->condjump check hw/arm/armsse: Make SSE-300 use Cortex-M55 hw/arm/armsse: Give SSE-300 its own Property array include/qemu/osdep.h: Move system includes to top osdep: protect qemu/osdep.h with extern "C" osdep: include glib-compat.h before other QEMU headers Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
0c5393a134
|
@ -1863,7 +1863,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
|
||||||
|
|
||||||
if (phys_pc == -1) {
|
if (phys_pc == -1) {
|
||||||
/* Generate a one-shot TB with 1 insn in it */
|
/* Generate a one-shot TB with 1 insn in it */
|
||||||
cflags = (cflags & ~CF_COUNT_MASK) | 1;
|
cflags = (cflags & ~CF_COUNT_MASK) | CF_LAST_IO | 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
max_insns = cflags & CF_COUNT_MASK;
|
max_insns = cflags & CF_COUNT_MASK;
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
|
extern "C" {
|
||||||
#include "disas/dis-asm.h"
|
#include "disas/dis-asm.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
* Reference Manual", Revision 01.01, April 27, 2018
|
* Reference Manual", Revision 01.01, April 27, 2018
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
|
extern "C" {
|
||||||
#include "disas/dis-asm.h"
|
#include "disas/dis-asm.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ typedef struct ARMSSEDeviceInfo {
|
||||||
|
|
||||||
struct ARMSSEInfo {
|
struct ARMSSEInfo {
|
||||||
const char *name;
|
const char *name;
|
||||||
|
const char *cpu_type;
|
||||||
uint32_t sse_version;
|
uint32_t sse_version;
|
||||||
int sram_banks;
|
int sram_banks;
|
||||||
int num_cpus;
|
int num_cpus;
|
||||||
|
@ -84,7 +85,7 @@ static Property iotkit_properties[] = {
|
||||||
DEFINE_PROP_END_OF_LIST()
|
DEFINE_PROP_END_OF_LIST()
|
||||||
};
|
};
|
||||||
|
|
||||||
static Property armsse_properties[] = {
|
static Property sse200_properties[] = {
|
||||||
DEFINE_PROP_LINK("memory", ARMSSE, board_memory, TYPE_MEMORY_REGION,
|
DEFINE_PROP_LINK("memory", ARMSSE, board_memory, TYPE_MEMORY_REGION,
|
||||||
MemoryRegion *),
|
MemoryRegion *),
|
||||||
DEFINE_PROP_UINT32("EXP_NUMIRQ", ARMSSE, exp_numirq, 64),
|
DEFINE_PROP_UINT32("EXP_NUMIRQ", ARMSSE, exp_numirq, 64),
|
||||||
|
@ -97,6 +98,17 @@ static Property armsse_properties[] = {
|
||||||
DEFINE_PROP_END_OF_LIST()
|
DEFINE_PROP_END_OF_LIST()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static Property sse300_properties[] = {
|
||||||
|
DEFINE_PROP_LINK("memory", ARMSSE, board_memory, TYPE_MEMORY_REGION,
|
||||||
|
MemoryRegion *),
|
||||||
|
DEFINE_PROP_UINT32("EXP_NUMIRQ", ARMSSE, exp_numirq, 64),
|
||||||
|
DEFINE_PROP_UINT32("SRAM_ADDR_WIDTH", ARMSSE, sram_addr_width, 15),
|
||||||
|
DEFINE_PROP_UINT32("init-svtor", ARMSSE, init_svtor, 0x10000000),
|
||||||
|
DEFINE_PROP_BOOL("CPU0_FPU", ARMSSE, cpu_fpu[0], true),
|
||||||
|
DEFINE_PROP_BOOL("CPU0_DSP", ARMSSE, cpu_dsp[0], true),
|
||||||
|
DEFINE_PROP_END_OF_LIST()
|
||||||
|
};
|
||||||
|
|
||||||
static const ARMSSEDeviceInfo iotkit_devices[] = {
|
static const ARMSSEDeviceInfo iotkit_devices[] = {
|
||||||
{
|
{
|
||||||
.name = "timer0",
|
.name = "timer0",
|
||||||
|
@ -490,6 +502,7 @@ static const ARMSSEInfo armsse_variants[] = {
|
||||||
{
|
{
|
||||||
.name = TYPE_IOTKIT,
|
.name = TYPE_IOTKIT,
|
||||||
.sse_version = ARMSSE_IOTKIT,
|
.sse_version = ARMSSE_IOTKIT,
|
||||||
|
.cpu_type = ARM_CPU_TYPE_NAME("cortex-m33"),
|
||||||
.sram_banks = 1,
|
.sram_banks = 1,
|
||||||
.num_cpus = 1,
|
.num_cpus = 1,
|
||||||
.sys_version = 0x41743,
|
.sys_version = 0x41743,
|
||||||
|
@ -508,6 +521,7 @@ static const ARMSSEInfo armsse_variants[] = {
|
||||||
{
|
{
|
||||||
.name = TYPE_SSE200,
|
.name = TYPE_SSE200,
|
||||||
.sse_version = ARMSSE_SSE200,
|
.sse_version = ARMSSE_SSE200,
|
||||||
|
.cpu_type = ARM_CPU_TYPE_NAME("cortex-m33"),
|
||||||
.sram_banks = 4,
|
.sram_banks = 4,
|
||||||
.num_cpus = 2,
|
.num_cpus = 2,
|
||||||
.sys_version = 0x22041743,
|
.sys_version = 0x22041743,
|
||||||
|
@ -519,13 +533,14 @@ static const ARMSSEInfo armsse_variants[] = {
|
||||||
.has_cpuid = true,
|
.has_cpuid = true,
|
||||||
.has_cpu_pwrctrl = false,
|
.has_cpu_pwrctrl = false,
|
||||||
.has_sse_counter = false,
|
.has_sse_counter = false,
|
||||||
.props = armsse_properties,
|
.props = sse200_properties,
|
||||||
.devinfo = sse200_devices,
|
.devinfo = sse200_devices,
|
||||||
.irq_is_common = sse200_irq_is_common,
|
.irq_is_common = sse200_irq_is_common,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = TYPE_SSE300,
|
.name = TYPE_SSE300,
|
||||||
.sse_version = ARMSSE_SSE300,
|
.sse_version = ARMSSE_SSE300,
|
||||||
|
.cpu_type = ARM_CPU_TYPE_NAME("cortex-m55"),
|
||||||
.sram_banks = 2,
|
.sram_banks = 2,
|
||||||
.num_cpus = 1,
|
.num_cpus = 1,
|
||||||
.sys_version = 0x7e00043b,
|
.sys_version = 0x7e00043b,
|
||||||
|
@ -537,7 +552,7 @@ static const ARMSSEInfo armsse_variants[] = {
|
||||||
.has_cpuid = true,
|
.has_cpuid = true,
|
||||||
.has_cpu_pwrctrl = true,
|
.has_cpu_pwrctrl = true,
|
||||||
.has_sse_counter = true,
|
.has_sse_counter = true,
|
||||||
.props = armsse_properties,
|
.props = sse300_properties,
|
||||||
.devinfo = sse300_devices,
|
.devinfo = sse300_devices,
|
||||||
.irq_is_common = sse300_irq_is_common,
|
.irq_is_common = sse300_irq_is_common,
|
||||||
},
|
},
|
||||||
|
@ -708,8 +723,7 @@ static void armsse_init(Object *obj)
|
||||||
name = g_strdup_printf("armv7m%d", i);
|
name = g_strdup_printf("armv7m%d", i);
|
||||||
object_initialize_child(OBJECT(&s->cluster[i]), name, &s->armv7m[i],
|
object_initialize_child(OBJECT(&s->cluster[i]), name, &s->armv7m[i],
|
||||||
TYPE_ARMV7M);
|
TYPE_ARMV7M);
|
||||||
qdev_prop_set_string(DEVICE(&s->armv7m[i]), "cpu-type",
|
qdev_prop_set_string(DEVICE(&s->armv7m[i]), "cpu-type", info->cpu_type);
|
||||||
ARM_CPU_TYPE_NAME("cortex-m33"));
|
|
||||||
g_free(name);
|
g_free(name);
|
||||||
name = g_strdup_printf("arm-sse-cpu-container%d", i);
|
name = g_strdup_printf("arm-sse-cpu-container%d", i);
|
||||||
memory_region_init(&s->cpu_container[i], obj, name, UINT64_MAX);
|
memory_region_init(&s->cpu_container[i], obj, name, UINT64_MAX);
|
||||||
|
|
|
@ -11,6 +11,12 @@
|
||||||
#define QEMU_STATIC_ANALYSIS 1
|
#define QEMU_STATIC_ANALYSIS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#define QEMU_EXTERN_C extern "C"
|
||||||
|
#else
|
||||||
|
#define QEMU_EXTERN_C extern
|
||||||
|
#endif
|
||||||
|
|
||||||
#define QEMU_NORETURN __attribute__ ((__noreturn__))
|
#define QEMU_NORETURN __attribute__ ((__noreturn__))
|
||||||
|
|
||||||
#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
#define daemon qemu_fake_daemon_function
|
#define daemon qemu_fake_daemon_function
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#undef daemon
|
#undef daemon
|
||||||
extern int daemon(int, int);
|
QEMU_EXTERN_C int daemon(int, int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -104,6 +104,15 @@ extern int daemon(int, int);
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_IOVEC
|
||||||
|
#include <sys/uio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__linux__) && defined(__sparc__)
|
||||||
|
/* The SPARC definition of QEMU_VMALLOC_ALIGN needs SHMLBA */
|
||||||
|
#include <sys/shm.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#else
|
#else
|
||||||
|
@ -111,6 +120,21 @@ extern int daemon(int, int);
|
||||||
#define WEXITSTATUS(x) (x)
|
#define WEXITSTATUS(x) (x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <AvailabilityMacros.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is somewhat like a system header; it must be outside any extern "C"
|
||||||
|
* block because it includes system headers itself, including glib.h,
|
||||||
|
* which will not compile if inside an extern "C" block.
|
||||||
|
*/
|
||||||
|
#include "glib-compat.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "sysemu/os-win32.h"
|
#include "sysemu/os-win32.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -119,11 +143,6 @@ extern int daemon(int, int);
|
||||||
#include "sysemu/os-posix.h"
|
#include "sysemu/os-posix.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
#include <AvailabilityMacros.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "glib-compat.h"
|
|
||||||
#include "qemu/typedefs.h"
|
#include "qemu/typedefs.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -459,7 +478,6 @@ void qemu_anon_ram_free(void *ptr, size_t size);
|
||||||
/* Use 1 MiB (segment size) alignment so gmap can be used by KVM. */
|
/* Use 1 MiB (segment size) alignment so gmap can be used by KVM. */
|
||||||
# define QEMU_VMALLOC_ALIGN (256 * 4096)
|
# define QEMU_VMALLOC_ALIGN (256 * 4096)
|
||||||
#elif defined(__linux__) && defined(__sparc__)
|
#elif defined(__linux__) && defined(__sparc__)
|
||||||
#include <sys/shm.h>
|
|
||||||
# define QEMU_VMALLOC_ALIGN MAX(qemu_real_host_page_size, SHMLBA)
|
# define QEMU_VMALLOC_ALIGN MAX(qemu_real_host_page_size, SHMLBA)
|
||||||
#else
|
#else
|
||||||
# define QEMU_VMALLOC_ALIGN qemu_real_host_page_size
|
# define QEMU_VMALLOC_ALIGN qemu_real_host_page_size
|
||||||
|
@ -539,8 +557,6 @@ struct iovec {
|
||||||
|
|
||||||
ssize_t readv(int fd, const struct iovec *iov, int iov_cnt);
|
ssize_t readv(int fd, const struct iovec *iov, int iov_cnt);
|
||||||
ssize_t writev(int fd, const struct iovec *iov, int iov_cnt);
|
ssize_t writev(int fd, const struct iovec *iov, int iov_cnt);
|
||||||
#else
|
|
||||||
#include <sys/uio.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -722,4 +738,8 @@ static inline int platform_does_not_support_system(const char *command)
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_SYSTEM_FUNCTION */
|
#endif /* !HAVE_SYSTEM_FUNCTION */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9199,11 +9199,6 @@ static void arm_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
|
||||||
{
|
{
|
||||||
DisasContext *dc = container_of(dcbase, DisasContext, base);
|
DisasContext *dc = container_of(dcbase, DisasContext, base);
|
||||||
|
|
||||||
if (tb_cflags(dc->base.tb) & CF_LAST_IO && dc->condjmp) {
|
|
||||||
/* FIXME: This can theoretically happen with self-modifying code. */
|
|
||||||
cpu_abort(cpu, "IO on conditional branch instruction");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* At this stage dc->condjmp will only be set when the skipped
|
/* At this stage dc->condjmp will only be set when the skipped
|
||||||
instruction was a conditional branch or trap, and the PC has
|
instruction was a conditional branch or trap, and the PC has
|
||||||
already been written. */
|
already been written. */
|
||||||
|
|
Loading…
Reference in a new issue