mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
testing and plugin updates:
- various fixes for binfmt_misc docker images - add hexagon check-tcg support docker image - add tricore check-tcg support - refactor ppc docker images - add missing ppc64le tests - don't use host_cc for test fallback - check-tcg configure.sh tweaks for cross compile/clang - fix some memory leaks in plugins -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmCjfMEACgkQ+9DbCVqe KkQ+aQf/QX5prjX9IW64GzwmZLdgufrc9fwdbrhyNTglcS0gN/hti6is3gBhe9dU KynWvmjvnosDT1EI53ciVkSRrwDLptpyq3bz140RjmSmPFQvUP16yF3KTThBxXuO 1BZk7iq5jzv3jVHD4j4zQPyMRatyBBToKtIboSZntljq6WTomv8gWu8+vdlWGzeG 0ubW1k9YHZNnQ0Et5xjqQBgBbjoOQvbkLYwNyyDjkOem8p4oKFIyTcRP9PYSJ9t3 cq314LuFJVjW1TMywvgHOlZEwzqRqOtdzW1RC1EbVqYR+lifAgYRI/kTEwL3Ab7j Z+hybdzlfJdUPNiJ5Q4rjDpuKI+1Nw== =FYwg -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-and-plugin-updates-180521-2' into staging testing and plugin updates: - various fixes for binfmt_misc docker images - add hexagon check-tcg support docker image - add tricore check-tcg support - refactor ppc docker images - add missing ppc64le tests - don't use host_cc for test fallback - check-tcg configure.sh tweaks for cross compile/clang - fix some memory leaks in plugins # gpg: Signature made Tue 18 May 2021 09:37:21 BST # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-testing-and-plugin-updates-180521-2: (29 commits) configure: use cc, not host_cc to set cross_cc for build arch tests/tcg: don't allow clang as a cross compiler tests/tcg: fix missing return tests/tcg/ppc64le: tests for brh/brw/brd tests/docker: gcc-10 based images for ppc64{,le} tests tests/tcg/tricore: Add muls test tests/tcg/tricore: Add msub test tests/tcg/tricore: Add madd test tests/tcg/tricore: Add ftoi test tests/tcg/tricore: Add fmul test tests/tcg/tricore: Add fadd test tests/tcg/tricore: Add dvstep test tests/tcg/tricore: Add clz test tests/tcg/tricore: Add bmerge test tests/tcg/tricore: Add macros to create tests and first test 'abs' configure: Emit HOST_CC to config-host.mak tests/tcg/tricore: Add build infrastructure hw/tricore: Add testdevice for tests in tests/tcg/ tests/tcg: Run timeout cmds using --foreground tests/tcg: Add docker_as and docker_ld cmds ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
fea2ad71c3
38 changed files with 928 additions and 161 deletions
|
@ -1,5 +1,6 @@
|
|||
tricore_ss = ss.source_set()
|
||||
tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testboard.c'))
|
||||
tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testdevice.c'))
|
||||
tricore_ss.add(when: 'CONFIG_TRIBOARD', if_true: files('triboard.c'))
|
||||
tricore_ss.add(when: 'CONFIG_TC27X_SOC', if_true: files('tc27x_soc.c'))
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "hw/loader.h"
|
||||
#include "elf.h"
|
||||
#include "hw/tricore/tricore.h"
|
||||
#include "hw/tricore/tricore_testdevice.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
|
||||
|
@ -56,6 +57,7 @@ static void tricore_testboard_init(MachineState *machine, int board_id)
|
|||
{
|
||||
TriCoreCPU *cpu;
|
||||
CPUTriCoreState *env;
|
||||
TriCoreTestDeviceState *test_dev;
|
||||
|
||||
MemoryRegion *sysmem = get_system_memory();
|
||||
MemoryRegion *ext_cram = g_new(MemoryRegion, 1);
|
||||
|
@ -87,6 +89,12 @@ static void tricore_testboard_init(MachineState *machine, int board_id)
|
|||
memory_region_add_subregion(sysmem, 0xf0050000, pcp_data);
|
||||
memory_region_add_subregion(sysmem, 0xf0060000, pcp_text);
|
||||
|
||||
test_dev = g_new(TriCoreTestDeviceState, 1);
|
||||
object_initialize(test_dev, sizeof(TriCoreTestDeviceState),
|
||||
TYPE_TRICORE_TESTDEVICE);
|
||||
memory_region_add_subregion(sysmem, 0xf0000000, &test_dev->iomem);
|
||||
|
||||
|
||||
tricoretb_binfo.ram_size = machine->ram_size;
|
||||
tricoretb_binfo.kernel_filename = machine->kernel_filename;
|
||||
|
||||
|
|
82
hw/tricore/tricore_testdevice.c
Normal file
82
hw/tricore/tricore_testdevice.c
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2021 Bastian Koppelmann Paderborn University
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "hw/tricore/tricore_testdevice.h"
|
||||
|
||||
static void tricore_testdevice_write(void *opaque, hwaddr offset,
|
||||
uint64_t value, unsigned size)
|
||||
{
|
||||
exit(value);
|
||||
}
|
||||
|
||||
static uint64_t tricore_testdevice_read(void *opaque, hwaddr offset,
|
||||
unsigned size)
|
||||
{
|
||||
return 0xdeadbeef;
|
||||
}
|
||||
|
||||
static void tricore_testdevice_reset(DeviceState *dev)
|
||||
{
|
||||
}
|
||||
|
||||
static const MemoryRegionOps tricore_testdevice_ops = {
|
||||
.read = tricore_testdevice_read,
|
||||
.write = tricore_testdevice_write,
|
||||
.valid = {
|
||||
.min_access_size = 4,
|
||||
.max_access_size = 4,
|
||||
},
|
||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||
};
|
||||
|
||||
static void tricore_testdevice_init(Object *obj)
|
||||
{
|
||||
TriCoreTestDeviceState *s = TRICORE_TESTDEVICE(obj);
|
||||
/* map memory */
|
||||
memory_region_init_io(&s->iomem, OBJECT(s), &tricore_testdevice_ops, s,
|
||||
"tricore_testdevice", 0x4);
|
||||
}
|
||||
|
||||
static Property tricore_testdevice_properties[] = {
|
||||
DEFINE_PROP_END_OF_LIST()
|
||||
};
|
||||
|
||||
static void tricore_testdevice_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
device_class_set_props(dc, tricore_testdevice_properties);
|
||||
dc->reset = tricore_testdevice_reset;
|
||||
}
|
||||
|
||||
static const TypeInfo tricore_testdevice_info = {
|
||||
.name = TYPE_TRICORE_TESTDEVICE,
|
||||
.parent = TYPE_SYS_BUS_DEVICE,
|
||||
.instance_size = sizeof(TriCoreTestDeviceState),
|
||||
.instance_init = tricore_testdevice_init,
|
||||
.class_init = tricore_testdevice_class_init,
|
||||
};
|
||||
|
||||
static void tricore_testdevice_register_types(void)
|
||||
{
|
||||
type_register_static(&tricore_testdevice_info);
|
||||
}
|
||||
|
||||
type_init(tricore_testdevice_register_types)
|
Loading…
Add table
Add a link
Reference in a new issue