mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
target-arm queue:
* hw/arm/iotkit.c: fix minor memory leak * softfloat: fix wrong-exception-flags bug for multiply-add corner case * arm: isolate and clean up DTB generation * implement Arm v8.1-Atomics extension * Fix some bugs and missing instructions in the v8.2-FP16 extension -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCAAGBQJa9IUCAAoJEDwlJe0UNgzeEGMQAKKjVRzZ7MBgvxQj0FJSWhSP BZkATf3ktid255PRpIssBZiY9oM+uY6n+/IRozAGvfDBp9eQOkrZczZjfW5hpe0B YsQadtk5cUOXqQzRTegSMPOoMmz8f5GaGOk4R6AEXJEX+Rug/zbOn9Q8Yx7JTd7o yBvU1+fys3galSiB88cffA95B9fwGfLsM7rP6OC4yNdUBYwjHf3wtY53WsxtWqX9 oX4keEiROQkrOfbSy9wYPZzu/0iRo8v35+7wIZhvNSlf02k6yJ7a+w0C4EQIRhWm 5zciE+aMYr7nOGpj7AEJLrRekhwnD6Ppje6aUd15yrxfNRZkpk/FeECWnaOPDis7 QNijx5Zqg6+GyItQKi5U4vFVReMj09OB7xDyAq77xDeBj4l3lg2DNkRfRhqQZAcv 2r4EW+pfLNj76Ah1qtQ410fprw462Sopb6bHmeuFbf1QFbQvJ4CL1+7Jl3ExrDX4 2+iQb4sQghWDxhDLfRSLxQ7K+bX+mNfGdFW8h+jPShD/+JY42dTKkFZEl4ghNgMD mpj8FrQuIkSMqnDmPfoTG5MVTMERacqPU7GGM7/fxudIkByO3zTiLxJ/E+Iy8HvX 29xKoOBjKT5FJrwJABsN6VpA3EuyAARgQIZ/dd6N5GZdgn2KAIHuaI+RHFOesKFd dJGM6sdksnsAAz28aUEJ =uXY+ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180510' into staging target-arm queue: * hw/arm/iotkit.c: fix minor memory leak * softfloat: fix wrong-exception-flags bug for multiply-add corner case * arm: isolate and clean up DTB generation * implement Arm v8.1-Atomics extension * Fix some bugs and missing instructions in the v8.2-FP16 extension # gpg: Signature made Thu 10 May 2018 18:44:34 BST # gpg: using RSA key 3C2525ED14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" # gpg: aka "Peter Maydell <pmaydell@gmail.com>" # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20180510: (21 commits) target/arm: Clear SVE high bits for FMOV target/arm: Fix float16 to/from int16 target/arm: Implement vector shifted FCVT for fp16 target/arm: Implement vector shifted SCVF/UCVF for fp16 target/arm: Enable ARM_FEATURE_V8_ATOMICS for user-only target/arm: Implement CAS and CASP target/arm: Fill in disas_ldst_atomic target/arm: Introduce ARM_FEATURE_V8_ATOMICS and initial decode target/riscv: Use new atomic min/max expanders tcg: Use GEN_ATOMIC_HELPER_FN for opposite endian atomic add tcg: Introduce atomic helpers for integer min/max target/xtensa: Use new min/max expanders target/arm: Use new min/max expanders tcg: Introduce helpers for integer min/max atomic.h: Work around gcc spurious "unused value" warning make sure that we aren't overwriting mc->get_hotplug_handler by accident arm/boot: split load_dtb() from arm_load_kernel() platform-bus-device: use device plug callback instead of machine_done notifier pc: simplify MachineClass::get_hotplug_handler handling softfloat: Handle default NaN mode after pickNaNMulAdd, not before ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org> # Conflicts: # target/riscv/translate.c
This commit is contained in:
commit
f5583c527f
33 changed files with 934 additions and 504 deletions
|
@ -39,15 +39,6 @@ DeviceState *armv7m_init(MemoryRegion *system_memory, int mem_size, int num_irq,
|
|||
*/
|
||||
void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int mem_size);
|
||||
|
||||
/*
|
||||
* struct used as a parameter of the arm_load_kernel machine init
|
||||
* done notifier
|
||||
*/
|
||||
typedef struct {
|
||||
Notifier notifier; /* actual notifier */
|
||||
ARMCPU *cpu; /* handle to the first cpu object */
|
||||
} ArmLoadKernelNotifier;
|
||||
|
||||
/* arm_boot.c */
|
||||
struct arm_boot_info {
|
||||
uint64_t ram_size;
|
||||
|
@ -56,6 +47,13 @@ struct arm_boot_info {
|
|||
const char *initrd_filename;
|
||||
const char *dtb_filename;
|
||||
hwaddr loader_start;
|
||||
hwaddr dtb_start;
|
||||
hwaddr dtb_limit;
|
||||
/* If set to True, arm_load_kernel() will not load DTB.
|
||||
* It allows board to load DTB manually later.
|
||||
* (default: False)
|
||||
*/
|
||||
bool skip_dtb_autoload;
|
||||
/* multicore boards that use the default secondary core boot functions
|
||||
* need to put the address of the secondary boot code, the boot reg,
|
||||
* and the GIC address in the next 3 values, respectively. boards that
|
||||
|
@ -94,8 +92,6 @@ struct arm_boot_info {
|
|||
* the user it should implement this hook.
|
||||
*/
|
||||
void (*modify_dtb)(const struct arm_boot_info *info, void *fdt);
|
||||
/* machine init done notifier executing arm_load_dtb */
|
||||
ArmLoadKernelNotifier load_kernel_notifier;
|
||||
/* Used internally by arm_boot.c */
|
||||
int is_linux;
|
||||
hwaddr initrd_start;
|
||||
|
@ -143,6 +139,33 @@ struct arm_boot_info {
|
|||
*/
|
||||
void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info);
|
||||
|
||||
AddressSpace *arm_boot_address_space(ARMCPU *cpu,
|
||||
const struct arm_boot_info *info);
|
||||
|
||||
/**
|
||||
* arm_load_dtb() - load a device tree binary image into memory
|
||||
* @addr: the address to load the image at
|
||||
* @binfo: struct describing the boot environment
|
||||
* @addr_limit: upper limit of the available memory area at @addr
|
||||
* @as: address space to load image to
|
||||
*
|
||||
* Load a device tree supplied by the machine or by the user with the
|
||||
* '-dtb' command line option, and put it at offset @addr in target
|
||||
* memory.
|
||||
*
|
||||
* If @addr_limit contains a meaningful value (i.e., it is strictly greater
|
||||
* than @addr), the device tree is only loaded if its size does not exceed
|
||||
* the limit.
|
||||
*
|
||||
* Returns: the size of the device tree image on success,
|
||||
* 0 if the image size exceeds the limit,
|
||||
* -1 on errors.
|
||||
*
|
||||
* Note: Must not be called unless have_dtb(binfo) is true.
|
||||
*/
|
||||
int arm_load_dtb(hwaddr addr, const struct arm_boot_info *binfo,
|
||||
hwaddr addr_limit, AddressSpace *as);
|
||||
|
||||
/* Write a secure board setup routine with a dummy handler for SMCs */
|
||||
void arm_write_secure_board_setup_dummy_smc(ARMCPU *cpu,
|
||||
const struct arm_boot_info *info,
|
||||
|
|
|
@ -24,37 +24,14 @@
|
|||
#ifndef HW_ARM_SYSBUS_FDT_H
|
||||
#define HW_ARM_SYSBUS_FDT_H
|
||||
|
||||
#include "hw/arm/arm.h"
|
||||
#include "qemu-common.h"
|
||||
#include "hw/sysbus.h"
|
||||
|
||||
/*
|
||||
* struct that contains dimensioning parameters of the platform bus
|
||||
*/
|
||||
typedef struct {
|
||||
hwaddr platform_bus_base; /* start address of the bus */
|
||||
hwaddr platform_bus_size; /* size of the bus */
|
||||
int platform_bus_first_irq; /* first hwirq assigned to the bus */
|
||||
int platform_bus_num_irqs; /* number of hwirq assigned to the bus */
|
||||
} ARMPlatformBusSystemParams;
|
||||
|
||||
/*
|
||||
* struct that contains all relevant info to build the fdt nodes of
|
||||
* platform bus and attached dynamic sysbus devices
|
||||
* in the future might be augmented with additional info
|
||||
* such as PHY, CLK handles ...
|
||||
*/
|
||||
typedef struct {
|
||||
const ARMPlatformBusSystemParams *system_params;
|
||||
struct arm_boot_info *binfo;
|
||||
const char *intc; /* parent interrupt controller name */
|
||||
} ARMPlatformBusFDTParams;
|
||||
#include "exec/hwaddr.h"
|
||||
|
||||
/**
|
||||
* arm_register_platform_bus_fdt_creator - register a machine init done
|
||||
* notifier that creates the device tree nodes of the platform bus and
|
||||
* associated dynamic sysbus devices
|
||||
* platform_bus_add_all_fdt_nodes - create all the platform bus nodes
|
||||
*
|
||||
* builds the parent platform bus node and all the nodes of dynamic
|
||||
* sysbus devices attached to it.
|
||||
*/
|
||||
void arm_register_platform_bus_fdt_creator(ARMPlatformBusFDTParams *fdt_params);
|
||||
|
||||
void platform_bus_add_all_fdt_nodes(void *fdt, const char *intc, hwaddr addr,
|
||||
hwaddr bus_size, int irq_start);
|
||||
#endif
|
||||
|
|
|
@ -99,6 +99,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
MachineState parent;
|
||||
Notifier machine_done;
|
||||
DeviceState *platform_bus_dev;
|
||||
FWCfgState *fw_cfg;
|
||||
bool secure;
|
||||
bool highmem;
|
||||
|
|
|
@ -83,10 +83,6 @@ struct PCMachineState {
|
|||
/**
|
||||
* PCMachineClass:
|
||||
*
|
||||
* Methods:
|
||||
*
|
||||
* @get_hotplug_handler: pointer to parent class callback @get_hotplug_handler
|
||||
*
|
||||
* Compat fields:
|
||||
*
|
||||
* @enforce_aligned_dimm: check that DIMM's address/size is aligned by
|
||||
|
@ -106,10 +102,6 @@ struct PCMachineClass {
|
|||
|
||||
/*< public >*/
|
||||
|
||||
/* Methods: */
|
||||
HotplugHandler *(*get_hotplug_handler)(MachineState *machine,
|
||||
DeviceState *dev);
|
||||
|
||||
/* Device configuration: */
|
||||
bool pci_enabled;
|
||||
bool kvmclock_enabled;
|
||||
|
|
|
@ -37,8 +37,6 @@ typedef struct PlatformBusDevice PlatformBusDevice;
|
|||
struct PlatformBusDevice {
|
||||
/*< private >*/
|
||||
SysBusDevice parent_obj;
|
||||
Notifier notifier;
|
||||
bool done_gathering;
|
||||
|
||||
/*< public >*/
|
||||
uint32_t mmio_size;
|
||||
|
@ -54,4 +52,6 @@ int platform_bus_get_irqn(PlatformBusDevice *platform_bus, SysBusDevice *sbdev,
|
|||
hwaddr platform_bus_get_mmio_addr(PlatformBusDevice *pbus, SysBusDevice *sbdev,
|
||||
int n);
|
||||
|
||||
void platform_bus_link_device(PlatformBusDevice *pbus, SysBusDevice *sbdev);
|
||||
|
||||
#endif /* HW_PLATFORM_BUS_H */
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
/* Returns the eventual value, failed or not */
|
||||
#define atomic_cmpxchg__nocheck(ptr, old, new) ({ \
|
||||
typeof_strip_qual(*ptr) _old = (old); \
|
||||
__atomic_compare_exchange_n(ptr, &_old, new, false, \
|
||||
(void)__atomic_compare_exchange_n(ptr, &_old, new, false, \
|
||||
__ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); \
|
||||
_old; \
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue