diff options
| author | Nathan Rossi <nathan@nathanrossi.com> | 2016-02-26 23:04:03 +1000 |
|---|---|---|
| committer | Nathan Rossi <nathan@nathanrossi.com> | 2016-02-29 22:44:30 +1000 |
| commit | f83fdd7bd745a77ee9dab221bc59229510e248dd (patch) | |
| tree | a1d918e4c9cb772ea0d06f42d8b54d9adeb463ee | |
| parent | a171295e3f4ae87dd7048562ba0f8b2868376cb9 (diff) | |
| download | meta-xilinx-f83fdd7bd745a77ee9dab221bc59229510e248dd.tar.gz | |
qemu_2.5%.bbappend: Create bbappend for arm64 patches
Backport patches from post 2.5 QEMU which implement certain registers on
arm64 which are probed by newer kernels and are required in order to
boot newer (4.4+) kernels.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
4 files changed, 185 insertions, 0 deletions
diff --git a/recipes-zynqmp/qemu/files/4054bfa9e7986c9b7d2bf70f9e10af9647e376fc.patch b/recipes-zynqmp/qemu/files/4054bfa9e7986c9b7d2bf70f9e10af9647e376fc.patch new file mode 100644 index 00000000..a8b4ffe7 --- /dev/null +++ b/recipes-zynqmp/qemu/files/4054bfa9e7986c9b7d2bf70f9e10af9647e376fc.patch | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | From 4054bfa9e7986c9b7d2bf70f9e10af9647e376fc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alistair Francis <alistair.francis@xilinx.com> | ||
| 3 | Date: Thu, 18 Feb 2016 14:16:17 +0000 | ||
| 4 | Subject: [PATCH] target-arm: Add the pmceid0 and pmceid1 registers | ||
| 5 | |||
| 6 | Signed-off-by: Aaron Lindsay <alindsay@codeaurora.org> | ||
| 7 | Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> | ||
| 8 | Tested-by: Nathan Rossi <nathan@nathanrossi.com> | ||
| 9 | Message-id: da0563119a9f56fd5fbdc26e7ed19a8a8457c5b9.1455060548.git.alistair.francis@xilinx.com | ||
| 10 | [PMM: Use 0 for PMCEID0 values for A15 and A57 since our PMU | ||
| 11 | does not currently implement any events.] | ||
| 12 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
| 13 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
| 14 | Upstream-Status: Backport | ||
| 15 | --- | ||
| 16 | target-arm/cpu-qom.h | 2 ++ | ||
| 17 | target-arm/cpu.c | 2 ++ | ||
| 18 | target-arm/cpu64.c | 2 ++ | ||
| 19 | target-arm/helper.c | 16 ++++++++++++++++ | ||
| 20 | 4 files changed, 22 insertions(+), 0 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/target-arm/cpu-qom.h b/target-arm/cpu-qom.h | ||
| 23 | index 07c0a71..1cc4502 100644 | ||
| 24 | --- a/target-arm/cpu-qom.h | ||
| 25 | +++ b/target-arm/cpu-qom.h | ||
| 26 | @@ -148,6 +148,8 @@ typedef struct ARMCPU { | ||
| 27 | uint32_t id_pfr0; | ||
| 28 | uint32_t id_pfr1; | ||
| 29 | uint32_t id_dfr0; | ||
| 30 | + uint32_t pmceid0; | ||
| 31 | + uint32_t pmceid1; | ||
| 32 | uint32_t id_afr0; | ||
| 33 | uint32_t id_mmfr0; | ||
| 34 | uint32_t id_mmfr1; | ||
| 35 | diff --git a/target-arm/cpu.c b/target-arm/cpu.c | ||
| 36 | index f2393cd..e95b030 100644 | ||
| 37 | --- a/target-arm/cpu.c | ||
| 38 | +++ b/target-arm/cpu.c | ||
| 39 | @@ -1156,6 +1156,8 @@ static void cortex_a15_initfn(Object *obj) | ||
| 40 | cpu->id_pfr0 = 0x00001131; | ||
| 41 | cpu->id_pfr1 = 0x00011011; | ||
| 42 | cpu->id_dfr0 = 0x02010555; | ||
| 43 | + cpu->pmceid0 = 0x0000000; | ||
| 44 | + cpu->pmceid1 = 0x00000000; | ||
| 45 | cpu->id_afr0 = 0x00000000; | ||
| 46 | cpu->id_mmfr0 = 0x10201105; | ||
| 47 | cpu->id_mmfr1 = 0x20000000; | ||
| 48 | diff --git a/target-arm/cpu64.c b/target-arm/cpu64.c | ||
| 49 | index c5bc19a..fa5eda2 100644 | ||
| 50 | --- a/target-arm/cpu64.c | ||
| 51 | +++ b/target-arm/cpu64.c | ||
| 52 | @@ -135,6 +135,8 @@ static void aarch64_a57_initfn(Object *obj) | ||
| 53 | cpu->id_isar5 = 0x00011121; | ||
| 54 | cpu->id_aa64pfr0 = 0x00002222; | ||
| 55 | cpu->id_aa64dfr0 = 0x10305106; | ||
| 56 | + cpu->pmceid0 = 0x00000000; | ||
| 57 | + cpu->pmceid1 = 0x00000000; | ||
| 58 | cpu->id_aa64isar0 = 0x00011120; | ||
| 59 | cpu->id_aa64mmfr0 = 0x00001124; | ||
| 60 | cpu->dbgdidr = 0x3516d000; | ||
| 61 | diff --git a/target-arm/helper.c b/target-arm/helper.c | ||
| 62 | index a420a2a..6a4ec01 100644 | ||
| 63 | --- a/target-arm/helper.c | ||
| 64 | +++ b/target-arm/helper.c | ||
| 65 | @@ -4380,6 +4380,22 @@ void register_cp_regs_for_features(ARMCPU *cpu) | ||
| 66 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 2, | ||
| 67 | .access = PL1_R, .type = ARM_CP_CONST, | ||
| 68 | .resetvalue = cpu->mvfr2 }, | ||
| 69 | + { .name = "PMCEID0", .state = ARM_CP_STATE_AA32, | ||
| 70 | + .cp = 15, .opc1 = 0, .crn = 9, .crm = 12, .opc2 = 6, | ||
| 71 | + .access = PL0_R, .accessfn = pmreg_access, .type = ARM_CP_CONST, | ||
| 72 | + .resetvalue = cpu->pmceid0 }, | ||
| 73 | + { .name = "PMCEID0_EL0", .state = ARM_CP_STATE_AA64, | ||
| 74 | + .opc0 = 3, .opc1 = 3, .crn = 9, .crm = 12, .opc2 = 6, | ||
| 75 | + .access = PL0_R, .accessfn = pmreg_access, .type = ARM_CP_CONST, | ||
| 76 | + .resetvalue = cpu->pmceid0 }, | ||
| 77 | + { .name = "PMCEID1", .state = ARM_CP_STATE_AA32, | ||
| 78 | + .cp = 15, .opc1 = 0, .crn = 9, .crm = 12, .opc2 = 7, | ||
| 79 | + .access = PL0_R, .accessfn = pmreg_access, .type = ARM_CP_CONST, | ||
| 80 | + .resetvalue = cpu->pmceid1 }, | ||
| 81 | + { .name = "PMCEID1_EL0", .state = ARM_CP_STATE_AA64, | ||
| 82 | + .opc0 = 3, .opc1 = 3, .crn = 9, .crm = 12, .opc2 = 7, | ||
| 83 | + .access = PL0_R, .accessfn = pmreg_access, .type = ARM_CP_CONST, | ||
| 84 | + .resetvalue = cpu->pmceid1 }, | ||
| 85 | REGINFO_SENTINEL | ||
| 86 | }; | ||
| 87 | /* RVBAR_EL1 is only implemented if EL1 is the highest EL */ | ||
| 88 | -- | ||
| 89 | 1.7.0.4 | ||
| 90 | |||
diff --git a/recipes-zynqmp/qemu/files/8a83ffc2dafad3499b87a736b17ab1b203fdb00b.patch b/recipes-zynqmp/qemu/files/8a83ffc2dafad3499b87a736b17ab1b203fdb00b.patch new file mode 100644 index 00000000..f5fb581c --- /dev/null +++ b/recipes-zynqmp/qemu/files/8a83ffc2dafad3499b87a736b17ab1b203fdb00b.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From 8a83ffc2dafad3499b87a736b17ab1b203fdb00b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alistair Francis <alistair.francis@xilinx.com> | ||
| 3 | Date: Thu, 18 Feb 2016 14:16:17 +0000 | ||
| 4 | Subject: [PATCH] target-arm: Add PMUSERENR_EL0 register | ||
| 5 | |||
| 6 | The Linux kernel accesses this register early in its setup. | ||
| 7 | |||
| 8 | Signed-off-by: Christopher Covington <christopher.covington@linaro.org> | ||
| 9 | Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> | ||
| 10 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
| 11 | Message-id: b30d536cb16ec57b4412172bb6dbc3f00d293e7d.1455060548.git.alistair.francis@xilinx.com | ||
| 12 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
| 13 | Upstream-Status: Backport | ||
| 14 | --- | ||
| 15 | target-arm/helper.c | 6 ++++++ | ||
| 16 | 1 files changed, 6 insertions(+), 0 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/target-arm/helper.c b/target-arm/helper.c | ||
| 19 | index 9e47f3d..5a0447b 100644 | ||
| 20 | --- a/target-arm/helper.c | ||
| 21 | +++ b/target-arm/helper.c | ||
| 22 | @@ -1105,6 +1105,12 @@ static const ARMCPRegInfo v7_cp_reginfo[] = { | ||
| 23 | .fieldoffset = offsetof(CPUARMState, cp15.c9_pmuserenr), | ||
| 24 | .resetvalue = 0, | ||
| 25 | .writefn = pmuserenr_write, .raw_writefn = raw_write }, | ||
| 26 | + { .name = "PMUSERENR_EL0", .state = ARM_CP_STATE_AA64, | ||
| 27 | + .opc0 = 3, .opc1 = 3, .crn = 9, .crm = 14, .opc2 = 0, | ||
| 28 | + .access = PL0_R | PL1_RW, .type = ARM_CP_ALIAS, | ||
| 29 | + .fieldoffset = offsetof(CPUARMState, cp15.c9_pmuserenr), | ||
| 30 | + .resetvalue = 0, | ||
| 31 | + .writefn = pmuserenr_write, .raw_writefn = raw_write }, | ||
| 32 | { .name = "PMINTENSET", .cp = 15, .crn = 9, .crm = 14, .opc1 = 0, .opc2 = 1, | ||
| 33 | .access = PL1_RW, | ||
| 34 | .fieldoffset = offsetof(CPUARMState, cp15.c9_pminten), | ||
| 35 | -- | ||
| 36 | 1.7.0.4 | ||
| 37 | |||
diff --git a/recipes-zynqmp/qemu/files/978364f12adebb4b8d90fdeb71242cb3c1405740.patch b/recipes-zynqmp/qemu/files/978364f12adebb4b8d90fdeb71242cb3c1405740.patch new file mode 100644 index 00000000..8465deec --- /dev/null +++ b/recipes-zynqmp/qemu/files/978364f12adebb4b8d90fdeb71242cb3c1405740.patch | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | From 978364f12adebb4b8d90fdeb71242cb3c1405740 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alistair Francis <alistair.francis@xilinx.com> | ||
| 3 | Date: Thu, 18 Feb 2016 14:16:17 +0000 | ||
| 4 | Subject: [PATCH] target-arm: Add the pmovsclr_el0 and pmintenclr_el1 registers | ||
| 5 | |||
| 6 | Signed-off-by: Aaron Lindsay <alindsay@codeaurora.org> | ||
| 7 | Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> | ||
| 8 | Tested-by: Nathan Rossi <nathan@nathanrossi.com> | ||
| 9 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
| 10 | Message-id: 50deeafb24958a5b6d7f594b5dda399a022c0e5b.1455060548.git.alistair.francis@xilinx.com | ||
| 11 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
| 12 | Upstream-Status: Backport | ||
| 13 | --- | ||
| 14 | target-arm/helper.c | 12 ++++++++++++ | ||
| 15 | 1 files changed, 12 insertions(+), 0 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/target-arm/helper.c b/target-arm/helper.c | ||
| 18 | index 6a4ec01..9e47f3d 100644 | ||
| 19 | --- a/target-arm/helper.c | ||
| 20 | +++ b/target-arm/helper.c | ||
| 21 | @@ -1057,6 +1057,13 @@ static const ARMCPRegInfo v7_cp_reginfo[] = { | ||
| 22 | .accessfn = pmreg_access, | ||
| 23 | .writefn = pmovsr_write, | ||
| 24 | .raw_writefn = raw_write }, | ||
| 25 | + { .name = "PMOVSCLR_EL0", .state = ARM_CP_STATE_AA64, | ||
| 26 | + .opc0 = 3, .opc1 = 3, .crn = 9, .crm = 12, .opc2 = 3, | ||
| 27 | + .access = PL0_RW, .accessfn = pmreg_access, | ||
| 28 | + .type = ARM_CP_ALIAS, | ||
| 29 | + .fieldoffset = offsetof(CPUARMState, cp15.c9_pmovsr), | ||
| 30 | + .writefn = pmovsr_write, | ||
| 31 | + .raw_writefn = raw_write }, | ||
| 32 | /* Unimplemented so WI. */ | ||
| 33 | { .name = "PMSWINC", .cp = 15, .crn = 9, .crm = 12, .opc1 = 0, .opc2 = 4, | ||
| 34 | .access = PL0_W, .accessfn = pmreg_access, .type = ARM_CP_NOP }, | ||
| 35 | @@ -1107,6 +1114,11 @@ static const ARMCPRegInfo v7_cp_reginfo[] = { | ||
| 36 | .access = PL1_RW, .type = ARM_CP_ALIAS, | ||
| 37 | .fieldoffset = offsetof(CPUARMState, cp15.c9_pminten), | ||
| 38 | .writefn = pmintenclr_write, }, | ||
| 39 | + { .name = "PMINTENCLR_EL1", .state = ARM_CP_STATE_AA64, | ||
| 40 | + .opc0 = 3, .opc1 = 0, .crn = 9, .crm = 14, .opc2 = 2, | ||
| 41 | + .access = PL1_RW, .type = ARM_CP_ALIAS, | ||
| 42 | + .fieldoffset = offsetof(CPUARMState, cp15.c9_pminten), | ||
| 43 | + .writefn = pmintenclr_write }, | ||
| 44 | { .name = "VBAR", .state = ARM_CP_STATE_BOTH, | ||
| 45 | .opc0 = 3, .crn = 12, .crm = 0, .opc1 = 0, .opc2 = 0, | ||
| 46 | .access = PL1_RW, .writefn = vbar_write, | ||
| 47 | -- | ||
| 48 | 1.7.0.4 | ||
| 49 | |||
diff --git a/recipes-zynqmp/qemu/qemu_2.5%.bbappend b/recipes-zynqmp/qemu/qemu_2.5%.bbappend new file mode 100644 index 00000000..6f7cb506 --- /dev/null +++ b/recipes-zynqmp/qemu/qemu_2.5%.bbappend | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | |||
| 2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
| 3 | |||
| 4 | SRC_URI += " \ | ||
| 5 | file://4054bfa9e7986c9b7d2bf70f9e10af9647e376fc.patch \ | ||
| 6 | file://8a83ffc2dafad3499b87a736b17ab1b203fdb00b.patch \ | ||
| 7 | file://978364f12adebb4b8d90fdeb71242cb3c1405740.patch \ | ||
| 8 | " | ||
| 9 | |||
