mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 02:54:58 -06:00
target-arm queue:
* Fix the CBAR register implementation for Cortex-A53, Cortex-A57, Cortex-A72 * Fix direct booting of Linux kernels on emulated CPUs which have an AArch32 EL3 (incorrect NSACR settings meant they could not access the FPU) * semihosting cleanup: do more work at translate time and less work at runtime -----BEGIN PGP SIGNATURE----- iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAl2OHYsZHHBldGVyLm1h eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3oHlD/4iD57WzVkf2EagPg61EbqV KJU0bloj6lpfhI410zv6RLfSxRhuJKj1voBPl0wh/uWz4kIHBjcYZgRQGZz5+Fem XE4j7bLfgXlbYkjl6CFo3oqZJM+iVmMofKVbpj7nEnO6cB9nW2O4Uk88vPTqCRUp uip/ZveoQ3WvzyM8ERWiIiGZrvCRPnfTFvWGNEDd+ESx3ACmNbeAHilMURESkXR8 3iRt83bzL+H7xRpVEmLvUAbjJlf+4dzyftJSwTDquLsu+g4I45BDe1ki7ip9U06B EvgNZ0TKchNI2kn6I4R0XAYAdZyKRONWqYTPE3xEtweihLwOKYsKfQViSHkhYxuE upqMfsSzpT2ivqMb5myFU8JbG6jZZGTguAZ40MQT073gckgFoFfWjAtzR0fWa/Cy VJ79fWIfOXrRsc76UDBeDuJ3CFEliFMSzDJWwglxlp9JX6ckfHH0Vwfmj9NPcuRw AeAkI7Xh+emNKftJzNtC+6Ba7jMhMLLDBoe1r3NQYK1BFg/JRtkGCja3UAswotXH hEYMicbMnkhOGEKxjKL0jbl33XKKAVq3pens2tT0QIz3Xqzh9iIcceCnv4MsddK9 MPU8yfQYcj6eNxVBLofhuRGURMK4BpQzj2Rxg03G3dRpFuNEwneUrx64q8lEv4Y5 EWSFxOoBPEpooiMCoboZ/A== =/0m2 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190927' into staging target-arm queue: * Fix the CBAR register implementation for Cortex-A53, Cortex-A57, Cortex-A72 * Fix direct booting of Linux kernels on emulated CPUs which have an AArch32 EL3 (incorrect NSACR settings meant they could not access the FPU) * semihosting cleanup: do more work at translate time and less work at runtime # gpg: Signature made Fri 27 Sep 2019 15:32:43 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-20190927: hw/arm/boot: Use the IEC binary prefix definitions hw/arm/boot.c: Set NSACR.{CP11,CP10} for NS kernel boots tests/tcg: add linux-user semihosting smoke test for ARM target/arm: remove run-time semihosting checks for linux-user target/arm: remove run time semihosting checks target/arm: handle A-profile semihosting at translate time target/arm: handle M-profile semihosting at translate time tests/tcg: clean-up some comments after the de-tangling target/arm: fix CBAR register for AArch64 CPUs Signed-off-by: Peter Maydell <peter.maydell@linaro.org> # Conflicts: # tests/tcg/arm/Makefile.target
This commit is contained in:
commit
786d36ad41
9 changed files with 131 additions and 106 deletions
|
@ -8,7 +8,6 @@ ARM_SRC=$(SRC_PATH)/tests/tcg/arm
|
|||
# Set search path for all sources
|
||||
VPATH += $(ARM_SRC)
|
||||
|
||||
# Multiarch Tests
|
||||
float_madds: CFLAGS+=-mfpu=neon-vfpv4
|
||||
|
||||
# Basic Hello World
|
||||
|
@ -30,6 +29,11 @@ run-fcvt: fcvt
|
|||
$(call run-test,fcvt,$(QEMU) $<,"$< on $(TARGET_NAME)")
|
||||
$(call diff-out,fcvt,$(ARM_SRC)/fcvt.ref)
|
||||
|
||||
# Semihosting smoke test for linux-user
|
||||
ARM_TESTS += semihosting
|
||||
run-semihosting: semihosting
|
||||
$(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)")
|
||||
|
||||
TESTS += $(ARM_TESTS)
|
||||
|
||||
# On ARM Linux only supports 4k pages
|
||||
|
|
45
tests/tcg/arm/semihosting.c
Normal file
45
tests/tcg/arm/semihosting.c
Normal file
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* linux-user semihosting checks
|
||||
*
|
||||
* Copyright (c) 2019
|
||||
* Written by Alex Bennée <alex.bennee@linaro.org>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define SYS_WRITE0 0x04
|
||||
#define SYS_REPORTEXC 0x18
|
||||
|
||||
void __semi_call(uintptr_t type, uintptr_t arg0)
|
||||
{
|
||||
#if defined(__arm__)
|
||||
register uintptr_t t asm("r0") = type;
|
||||
register uintptr_t a0 asm("r1") = arg0;
|
||||
asm("svc 0xab"
|
||||
: /* no return */
|
||||
: "r" (t), "r" (a0));
|
||||
#else
|
||||
register uintptr_t t asm("x0") = type;
|
||||
register uintptr_t a0 asm("x1") = arg0;
|
||||
asm("hlt 0xf000"
|
||||
: /* no return */
|
||||
: "r" (t), "r" (a0));
|
||||
#endif
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[argc])
|
||||
{
|
||||
#if defined(__arm__)
|
||||
uintptr_t exit_code = 0x20026;
|
||||
#else
|
||||
uintptr_t exit_block[2] = {0x20026, 0};
|
||||
uintptr_t exit_code = (uintptr_t) &exit_block;
|
||||
#endif
|
||||
|
||||
__semi_call(SYS_WRITE0, (uintptr_t) "Hello World");
|
||||
__semi_call(SYS_REPORTEXC, exit_code);
|
||||
/* if we get here we failed */
|
||||
return -1;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue