mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-03 17:11:01 +00:00
ppc patch queue 2018-04-10
Here's a rather late pull request with a handful of fixes for 2.12. These have been blocked for some time, because I wasn't able to complete my usual test set due to the SCSI problem fixed in37c5174
"scsi-disk: Don't enlarge min_io_size to max_io_size". Since we're in hard freeze, these are all bugfixes. Most are also regressions, although in one case it's only a "regression" because a longstanding bug has been exposed by a new machine type (sam460ex) in the testcases. There are also a couple of sam460ex fixes that aren't regressions since the board didn't exist before. On the flipside though, they're low risk because they only touch board specific code for a board that doesn't exist in any released version. -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlrMZDAACgkQbDjKyiDZ s5ITgg/9F4IXYPu7/wW+pBgnC+ZNV7s498K2FQqOVPHQEAh98SyBcxLTCWCWwQhW eOxHFfcKMv6HTWNVyXReFpXJJez33sZ3a0qD3u0a5w0uFSkDYVbCOM7S5qPjFU94 r7KZWg6IAN3cMAuy0bqfl+Jo5gRolZ8pdo3dSwKLitJfLpOsUclc9DimHiVQfLmW ve6e8ILlZCKmY646gO4+t1EXCDAK4JthcP5FqSMOSzHnFT0hu/j+Wt3sZ2kr2EZC GblEG86dW2n9f1uVIjpmRDqJJNljAutWO1eLmplK1k6pRdmjjGrBSHdF3V7s9yoN kMllr6mthoucNHg55AbjsC6owgNJAXxJz6BnnKMycTRW/7z4exg/MaMlPhMFxZ9w 94gr1p9EdEW0Uvxjm+bYdZVrxskogoDo7HxzBs8HoMmTmCvpXRi7i86XZA87seKz F/4SNHtZLlt6W20sfcCAtDwo3rw3rkiV9/WbhJSFV9u1lYUJR5x3tq4c4EyLQt66 k3DwMxWyvcS2Uni0ni8eYoM7xtDG3xYtEmspKt7eN6OnHQcmz6FoAXcbqTtyr65D MmAYm/mplr0dDVvCLjUbwFqRtQSnpePY9quc4vk+dXVH8atf1OMlDS+rA/jwLIuo 7LdfolpLiXBzgIFpBuJ8o/KW0B+zu1u3qwzzJ4OUq8nNgp53UM4= =VDFg -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.12-20180410' into staging ppc patch queue 2018-04-10 Here's a rather late pull request with a handful of fixes for 2.12. These have been blocked for some time, because I wasn't able to complete my usual test set due to the SCSI problem fixed in37c5174
"scsi-disk: Don't enlarge min_io_size to max_io_size". Since we're in hard freeze, these are all bugfixes. Most are also regressions, although in one case it's only a "regression" because a longstanding bug has been exposed by a new machine type (sam460ex) in the testcases. There are also a couple of sam460ex fixes that aren't regressions since the board didn't exist before. On the flipside though, they're low risk because they only touch board specific code for a board that doesn't exist in any released version. # gpg: Signature made Tue 10 Apr 2018 08:13:52 BST # gpg: using RSA key 6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.12-20180410: roms/u-boot-sam460ex: Change to qemu git mirror and update sam460ex: Fix timer frequency and clock multipliers tests/boot-serial: Test the sam460ex board spapr: Initialize reserved areas list in FDT in H_CAS handler target/ppc: Fix backwards migration of msr_mask hw/misc/macio: Fix crash when listing device properties of macio device target/ppc: Initialize lazy_tlb_flush correctly Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
69550301ec
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -45,4 +45,4 @@
|
||||
url = git://github.com/hdeller/seabios-hppa.git
|
||||
[submodule "roms/u-boot-sam460ex"]
|
||||
path = roms/u-boot-sam460ex
|
||||
url = git://github.com/zbalaton/u-boot-sam460ex
|
||||
url = git://git.qemu.org/u-boot-sam460ex.git
|
||||
|
@ -115,6 +115,13 @@ static void macio_common_realize(PCIDevice *d, Error **errp)
|
||||
memory_region_add_subregion(&s->bar, 0x16000,
|
||||
sysbus_mmio_get_region(sysbus_dev, 0));
|
||||
|
||||
qdev_prop_set_uint32(DEVICE(&s->escc), "disabled", 0);
|
||||
qdev_prop_set_uint32(DEVICE(&s->escc), "frequency", ESCC_CLOCK);
|
||||
qdev_prop_set_uint32(DEVICE(&s->escc), "it_shift", 4);
|
||||
qdev_prop_set_chr(DEVICE(&s->escc), "chrA", serial_hds[0]);
|
||||
qdev_prop_set_chr(DEVICE(&s->escc), "chrB", serial_hds[1]);
|
||||
qdev_prop_set_uint32(DEVICE(&s->escc), "chnBtype", escc_serial);
|
||||
qdev_prop_set_uint32(DEVICE(&s->escc), "chnAtype", escc_serial);
|
||||
object_property_set_bool(OBJECT(&s->escc), true, "realized", &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
@ -341,13 +348,6 @@ static void macio_instance_init(Object *obj)
|
||||
object_property_add_child(obj, "dbdma", OBJECT(&s->dbdma), NULL);
|
||||
|
||||
object_initialize(&s->escc, sizeof(s->escc), TYPE_ESCC);
|
||||
qdev_prop_set_uint32(DEVICE(&s->escc), "disabled", 0);
|
||||
qdev_prop_set_uint32(DEVICE(&s->escc), "frequency", ESCC_CLOCK);
|
||||
qdev_prop_set_uint32(DEVICE(&s->escc), "it_shift", 4);
|
||||
qdev_prop_set_chr(DEVICE(&s->escc), "chrA", serial_hds[0]);
|
||||
qdev_prop_set_chr(DEVICE(&s->escc), "chrB", serial_hds[1]);
|
||||
qdev_prop_set_uint32(DEVICE(&s->escc), "chnBtype", escc_serial);
|
||||
qdev_prop_set_uint32(DEVICE(&s->escc), "chnAtype", escc_serial);
|
||||
qdev_set_parent_bus(DEVICE(&s->escc), sysbus_get_default());
|
||||
object_property_add_child(obj, "escc", OBJECT(&s->escc), NULL);
|
||||
}
|
||||
|
@ -392,8 +392,7 @@ static uint32_t dcr_read_sdr(void *opaque, int dcrn)
|
||||
case SDR0_CFGDATA:
|
||||
switch (sdr->addr) {
|
||||
case SDR0_STRP0:
|
||||
/* FIXME: Is this correct? This breaks timing in U-Boot */
|
||||
ret = 0; /*(0xb5 << 8) | (1 << 4) | 9 */
|
||||
ret = (0xb5 << 8) | (1 << 4) | 9;
|
||||
break;
|
||||
case SDR0_STRP1:
|
||||
ret = (5 << 29) | (2 << 26) | (1 << 24);
|
||||
|
@ -67,6 +67,7 @@
|
||||
IRQ12 = SM502_INT
|
||||
*/
|
||||
|
||||
#define CPU_FREQ 1150000000
|
||||
#define SDRAM_NR_BANKS 4
|
||||
|
||||
/* FIXME: See u-boot.git 8ac41e, also fix in ppc440_uc.c */
|
||||
@ -253,8 +254,8 @@ static int sam460ex_load_device_tree(hwaddr addr,
|
||||
char *filename;
|
||||
int fdt_size;
|
||||
void *fdt;
|
||||
uint32_t tb_freq = 50000000;
|
||||
uint32_t clock_freq = 50000000;
|
||||
uint32_t tb_freq = CPU_FREQ;
|
||||
uint32_t clock_freq = CPU_FREQ;
|
||||
|
||||
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE);
|
||||
if (!filename) {
|
||||
@ -416,7 +417,7 @@ static void sam460ex_init(MachineState *machine)
|
||||
boot_info = g_malloc0(sizeof(*boot_info));
|
||||
env->load_info = boot_info;
|
||||
|
||||
ppc_booke_timers_init(cpu, 50000000, 0);
|
||||
ppc_booke_timers_init(cpu, CPU_FREQ, 0);
|
||||
ppc_dcr_init(env, NULL, NULL);
|
||||
|
||||
/* PLB arbitrer */
|
||||
|
@ -865,6 +865,7 @@ int spapr_h_cas_compose_response(sPAPRMachineState *spapr,
|
||||
/* Create skeleton */
|
||||
fdt_skel = g_malloc0(size);
|
||||
_FDT((fdt_create(fdt_skel, size)));
|
||||
_FDT((fdt_finish_reservemap(fdt_skel)));
|
||||
_FDT((fdt_begin_node(fdt_skel, "")));
|
||||
_FDT((fdt_end_node(fdt_skel)));
|
||||
_FDT((fdt_finish(fdt_skel)));
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 119aa277f74a4a2d3f7ab6c9471292308eba14e4
|
||||
Subproject commit 8ee007c4216fd6a0d760589e8405ce4494497aa0
|
@ -190,7 +190,15 @@ static int cpu_pre_save(void *opaque)
|
||||
|
||||
/* Hacks for migration compatibility between 2.6, 2.7 & 2.8 */
|
||||
if (cpu->pre_2_8_migration) {
|
||||
cpu->mig_msr_mask = env->msr_mask;
|
||||
/* Mask out bits that got added to msr_mask since the versions
|
||||
* which stupidly included it in the migration stream. */
|
||||
target_ulong metamask = 0
|
||||
#if defined(TARGET_PPC64)
|
||||
| (1ULL << MSR_TS0)
|
||||
| (1ULL << MSR_TS1)
|
||||
#endif
|
||||
;
|
||||
cpu->mig_msr_mask = env->msr_mask & ~metamask;
|
||||
cpu->mig_insns_flags = env->insns_flags & insns_compat_mask;
|
||||
cpu->mig_insns_flags2 = env->insns_flags2 & insns_compat_mask2;
|
||||
cpu->mig_nb_BATs = env->nb_BATs;
|
||||
|
@ -7237,10 +7237,9 @@ static int ppc_tr_init_disas_context(DisasContextBase *dcbase,
|
||||
ctx->sf_mode = msr_is_64bit(env, env->msr);
|
||||
ctx->has_cfar = !!(env->flags & POWERPC_FLAG_CFAR);
|
||||
#endif
|
||||
if (env->mmu_model == POWERPC_MMU_32B ||
|
||||
env->mmu_model == POWERPC_MMU_601 ||
|
||||
(env->mmu_model & POWERPC_MMU_64B))
|
||||
ctx->lazy_tlb_flush = true;
|
||||
ctx->lazy_tlb_flush = env->mmu_model == POWERPC_MMU_32B
|
||||
|| env->mmu_model == POWERPC_MMU_601
|
||||
|| (env->mmu_model & POWERPC_MMU_64B);
|
||||
|
||||
ctx->fpu_enabled = !!msr_fp;
|
||||
if ((env->flags & POWERPC_FLAG_SPE) && msr_spe)
|
||||
|
@ -79,12 +79,14 @@ static testdef_t tests[] = {
|
||||
{ "ppc", "40p", "-boot d", "Booting from device d" },
|
||||
{ "ppc", "g3beige", "", "PowerPC,750" },
|
||||
{ "ppc", "mac99", "", "PowerPC,G4" },
|
||||
{ "ppc", "sam460ex", "-m 256", "DRAM: 256 MiB" },
|
||||
{ "ppc64", "ppce500", "", "U-Boot" },
|
||||
{ "ppc64", "prep", "-boot e", "Booting from device e" },
|
||||
{ "ppc64", "40p", "-m 192", "Memory size: 192 MB" },
|
||||
{ "ppc64", "mac99", "", "PowerPC,970FX" },
|
||||
{ "ppc64", "pseries", "", "Open Firmware" },
|
||||
{ "ppc64", "powernv", "-cpu POWER8", "OPAL" },
|
||||
{ "ppc64", "sam460ex", "-device e1000", "8086 100e" },
|
||||
{ "i386", "isapc", "-cpu qemu32 -device sga", "SGABIOS" },
|
||||
{ "i386", "pc", "-device sga", "SGABIOS" },
|
||||
{ "i386", "q35", "-device sga", "SGABIOS" },
|
||||
|
Loading…
Reference in New Issue
Block a user