* [PATCH 1/6] target/ppc/mmu_common: Log which effective address had no TLB entry found
2022-12-16 14:57 [PATCH 0/6] Trivial PPC cleanups Bernhard Beschow
@ 2022-12-16 14:57 ` Bernhard Beschow
2022-12-16 16:24 ` Philippe Mathieu-Daudé
2022-12-16 14:57 ` [PATCH 2/6] target/ppc/mmu_common: Fix table layout of "info tlb" HMP command Bernhard Beschow
` (6 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Bernhard Beschow @ 2022-12-16 14:57 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz,
Cédric Le Goater, Bernhard Beschow
Let's not leave developers in the dark where this log message comes
from.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
target/ppc/mmu_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 89107a6af2..49067c05e6 100644
--- a/target/ppc/mmu_common.c
+++ b/target/ppc/mmu_common.c
@@ -811,7 +811,8 @@ static int mmubooke206_check_tlb(CPUPPCState *env, ppcmas_tlb_t *tlb,
}
}
- qemu_log_mask(CPU_LOG_MMU, "%s: TLB entry not found\n", __func__);
+ qemu_log_mask(CPU_LOG_MMU, "%s: No TLB entry found for effective address "
+ "0x" TARGET_FMT_lx "\n", __func__, address);
return -1;
found_tlb:
--
2.39.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 1/6] target/ppc/mmu_common: Log which effective address had no TLB entry found
2022-12-16 14:57 ` [PATCH 1/6] target/ppc/mmu_common: Log which effective address had no TLB entry found Bernhard Beschow
@ 2022-12-16 16:24 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 20+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-16 16:24 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz,
Cédric Le Goater
On 16/12/22 15:57, Bernhard Beschow wrote:
> Let's not leave developers in the dark where this log message comes
> from.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> target/ppc/mmu_common.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 2/6] target/ppc/mmu_common: Fix table layout of "info tlb" HMP command
2022-12-16 14:57 [PATCH 0/6] Trivial PPC cleanups Bernhard Beschow
2022-12-16 14:57 ` [PATCH 1/6] target/ppc/mmu_common: Log which effective address had no TLB entry found Bernhard Beschow
@ 2022-12-16 14:57 ` Bernhard Beschow
2022-12-16 16:24 ` Philippe Mathieu-Daudé
2022-12-16 14:57 ` [PATCH 3/6] hw/ppc/virtex_ml507: Prefer local over global variable Bernhard Beschow
` (5 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Bernhard Beschow @ 2022-12-16 14:57 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz,
Cédric Le Goater, Bernhard Beschow
Starting with the URWX columns the columns didn't line up.
Before:
QEMU 7.2.50 monitor - type 'help' for more information
(qemu) info tlb
TLB0:
Effective Physical Size TID TS SRWX URWX WIMGE U0123
0x0000000000a80000 0x000000000105d000 4K 117 0 SR--UR-- --M-- U----
0x0000000000100000 0x000000000114e000 4K 117 0 SR--UR-- --M-- U----
<snip
TLB1:
Effective Physical Size TID TS SRWX URWX WIMGE U0123
0x00000000c0000000 0x0000000000000000 16M 0 0 SR-XU--- --M-- U----
0x00000000c1000000 0x0000000001000000 16M 0 0 SRW-U--- --M-- U----
<snip>
(qemu)
After:
QEMU 7.2.50 monitor - type 'help' for more information
(qemu) info tlb
TLB0:
Effective Physical Size TID TS SRWX URWX WIMGE U0123
0x00000000b7a00000 0x000000000fcf5000 4K 18 0 SR-- UR-- --M-- U----
0x0000000000800000 0x000000000fd73000 4K 18 0 SR-- UR-X --M-- U----
<snip>
TLB1:
Effective Physical Size TID TS SRWX URWX WIMGE U0123
0x00000000c0000000 0x0000000000000000 16M 0 0 SR-X U--- --M-- U----
0x00000000c1000000 0x0000000001000000 16M 0 0 SRW- U--- --M-- U----
<snip>
(qemu)
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
target/ppc/mmu_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 49067c05e6..8901f4d134 100644
--- a/target/ppc/mmu_common.c
+++ b/target/ppc/mmu_common.c
@@ -980,7 +980,7 @@ static void mmubooke206_dump_one_tlb(CPUPPCState *env, int tlbn, int offset,
pa = entry->mas7_3 & ~(size - 1);
qemu_printf("0x%016" PRIx64 " 0x%016" PRIx64 " %4s %-5u %1u S%c%c%c"
- "U%c%c%c %c%c%c%c%c U%c%c%c%c\n",
+ " U%c%c%c %c%c%c%c%c U%c%c%c%c\n",
(uint64_t)ea, (uint64_t)pa,
book3e_tsize_to_str[tsize],
(entry->mas1 & MAS1_TID_MASK) >> MAS1_TID_SHIFT,
--
2.39.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 2/6] target/ppc/mmu_common: Fix table layout of "info tlb" HMP command
2022-12-16 14:57 ` [PATCH 2/6] target/ppc/mmu_common: Fix table layout of "info tlb" HMP command Bernhard Beschow
@ 2022-12-16 16:24 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 20+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-16 16:24 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz,
Cédric Le Goater
On 16/12/22 15:57, Bernhard Beschow wrote:
> Starting with the URWX columns the columns didn't line up.
> Before:
>
> QEMU 7.2.50 monitor - type 'help' for more information
> (qemu) info tlb
>
> TLB0:
> Effective Physical Size TID TS SRWX URWX WIMGE U0123
> 0x0000000000a80000 0x000000000105d000 4K 117 0 SR--UR-- --M-- U----
> 0x0000000000100000 0x000000000114e000 4K 117 0 SR--UR-- --M-- U----
> <snip
>
> TLB1:
> Effective Physical Size TID TS SRWX URWX WIMGE U0123
> 0x00000000c0000000 0x0000000000000000 16M 0 0 SR-XU--- --M-- U----
> 0x00000000c1000000 0x0000000001000000 16M 0 0 SRW-U--- --M-- U----
> <snip>
> (qemu)
>
> After:
>
> QEMU 7.2.50 monitor - type 'help' for more information
> (qemu) info tlb
>
> TLB0:
> Effective Physical Size TID TS SRWX URWX WIMGE U0123
> 0x00000000b7a00000 0x000000000fcf5000 4K 18 0 SR-- UR-- --M-- U----
> 0x0000000000800000 0x000000000fd73000 4K 18 0 SR-- UR-X --M-- U----
> <snip>
>
> TLB1:
> Effective Physical Size TID TS SRWX URWX WIMGE U0123
> 0x00000000c0000000 0x0000000000000000 16M 0 0 SR-X U--- --M-- U----
> 0x00000000c1000000 0x0000000001000000 16M 0 0 SRW- U--- --M-- U----
> <snip>
> (qemu)
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> target/ppc/mmu_common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 3/6] hw/ppc/virtex_ml507: Prefer local over global variable
2022-12-16 14:57 [PATCH 0/6] Trivial PPC cleanups Bernhard Beschow
2022-12-16 14:57 ` [PATCH 1/6] target/ppc/mmu_common: Log which effective address had no TLB entry found Bernhard Beschow
2022-12-16 14:57 ` [PATCH 2/6] target/ppc/mmu_common: Fix table layout of "info tlb" HMP command Bernhard Beschow
@ 2022-12-16 14:57 ` Bernhard Beschow
2022-12-16 15:54 ` Edgar E. Iglesias
2022-12-16 16:28 ` Philippe Mathieu-Daudé
2022-12-16 14:57 ` [PATCH 4/6] hw/ppc/e500: Prefer local variable over qdev_get_machine() Bernhard Beschow
` (4 subsequent siblings)
7 siblings, 2 replies; 20+ messages in thread
From: Bernhard Beschow @ 2022-12-16 14:57 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz,
Cédric Le Goater, Bernhard Beschow
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/ppc/virtex_ml507.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index 13cace229b..f2f81bd425 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -157,7 +157,7 @@ static int xilinx_load_device_tree(MachineState *machine,
int r;
const char *dtb_filename;
- dtb_filename = current_machine->dtb;
+ dtb_filename = machine->dtb;
if (dtb_filename) {
fdt = load_device_tree(dtb_filename, &fdt_size);
if (!fdt) {
--
2.39.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 3/6] hw/ppc/virtex_ml507: Prefer local over global variable
2022-12-16 14:57 ` [PATCH 3/6] hw/ppc/virtex_ml507: Prefer local over global variable Bernhard Beschow
@ 2022-12-16 15:54 ` Edgar E. Iglesias
2022-12-16 16:28 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 20+ messages in thread
From: Edgar E. Iglesias @ 2022-12-16 15:54 UTC (permalink / raw)
To: Bernhard Beschow
Cc: qemu-devel, qemu-ppc, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz,
Cédric Le Goater
On Fri, Dec 16, 2022 at 03:57:06PM +0100, Bernhard Beschow wrote:
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
> ---
> hw/ppc/virtex_ml507.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
> index 13cace229b..f2f81bd425 100644
> --- a/hw/ppc/virtex_ml507.c
> +++ b/hw/ppc/virtex_ml507.c
> @@ -157,7 +157,7 @@ static int xilinx_load_device_tree(MachineState *machine,
> int r;
> const char *dtb_filename;
>
> - dtb_filename = current_machine->dtb;
> + dtb_filename = machine->dtb;
> if (dtb_filename) {
> fdt = load_device_tree(dtb_filename, &fdt_size);
> if (!fdt) {
> --
> 2.39.0
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/6] hw/ppc/virtex_ml507: Prefer local over global variable
2022-12-16 14:57 ` [PATCH 3/6] hw/ppc/virtex_ml507: Prefer local over global variable Bernhard Beschow
2022-12-16 15:54 ` Edgar E. Iglesias
@ 2022-12-16 16:28 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 20+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-16 16:28 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz,
Cédric Le Goater
On 16/12/22 15:57, Bernhard Beschow wrote:
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> hw/ppc/virtex_ml507.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
> index 13cace229b..f2f81bd425 100644
> --- a/hw/ppc/virtex_ml507.c
> +++ b/hw/ppc/virtex_ml507.c
> @@ -157,7 +157,7 @@ static int xilinx_load_device_tree(MachineState *machine,
> int r;
> const char *dtb_filename;
>
> - dtb_filename = current_machine->dtb;
> + dtb_filename = machine->dtb;
https://lore.kernel.org/qemu-devel/20200109152133.23649-1-philmd@redhat.com/
\o/
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 4/6] hw/ppc/e500: Prefer local variable over qdev_get_machine()
2022-12-16 14:57 [PATCH 0/6] Trivial PPC cleanups Bernhard Beschow
` (2 preceding siblings ...)
2022-12-16 14:57 ` [PATCH 3/6] hw/ppc/virtex_ml507: Prefer local over global variable Bernhard Beschow
@ 2022-12-16 14:57 ` Bernhard Beschow
2022-12-16 15:06 ` BALATON Zoltan
2022-12-16 16:30 ` Philippe Mathieu-Daudé
2022-12-16 14:57 ` [PATCH 5/6] hw/ppc/e500: Resolve variable shadowing Bernhard Beschow
` (3 subsequent siblings)
7 siblings, 2 replies; 20+ messages in thread
From: Bernhard Beschow @ 2022-12-16 14:57 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz,
Cédric Le Goater, Bernhard Beschow
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/ppc/e500.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 2fe496677c..ad83924004 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -959,7 +959,7 @@ void ppce500_init(MachineState *machine)
memory_region_add_subregion(address_space_mem, 0, machine->ram);
dev = qdev_new("e500-ccsr");
- object_property_add_child(qdev_get_machine(), "e500-ccsr",
+ object_property_add_child(OBJECT(machine), "e500-ccsr",
OBJECT(dev));
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
ccsr = CCSR(dev);
@@ -1002,7 +1002,7 @@ void ppce500_init(MachineState *machine)
/* PCI */
dev = qdev_new("e500-pcihost");
- object_property_add_child(qdev_get_machine(), "pci-host", OBJECT(dev));
+ object_property_add_child(OBJECT(machine), "pci-host", OBJECT(dev));
qdev_prop_set_uint32(dev, "first_slot", pmc->pci_first_slot);
qdev_prop_set_uint32(dev, "first_pin_irq", pci_irq_nrs[0]);
s = SYS_BUS_DEVICE(dev);
--
2.39.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 4/6] hw/ppc/e500: Prefer local variable over qdev_get_machine()
2022-12-16 14:57 ` [PATCH 4/6] hw/ppc/e500: Prefer local variable over qdev_get_machine() Bernhard Beschow
@ 2022-12-16 15:06 ` BALATON Zoltan
2022-12-16 16:30 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 20+ messages in thread
From: BALATON Zoltan @ 2022-12-16 15:06 UTC (permalink / raw)
To: Bernhard Beschow
Cc: qemu-devel, qemu-ppc, Edgar E. Iglesias, Laurent Vivier,
David Gibson, Michael Tokarev, qemu-trivial,
Daniel Henrique Barboza, Greg Kurz, Cédric Le Goater
On Fri, 16 Dec 2022, Bernhard Beschow wrote:
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> hw/ppc/e500.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
> index 2fe496677c..ad83924004 100644
> --- a/hw/ppc/e500.c
> +++ b/hw/ppc/e500.c
> @@ -959,7 +959,7 @@ void ppce500_init(MachineState *machine)
> memory_region_add_subregion(address_space_mem, 0, machine->ram);
>
> dev = qdev_new("e500-ccsr");
> - object_property_add_child(qdev_get_machine(), "e500-ccsr",
> + object_property_add_child(OBJECT(machine), "e500-ccsr",
> OBJECT(dev));
Cen the line break removed too? Looks like it fit in one line even before
this change so not sure why was written in two lines. Maybe had some
longer stuff there before qdev_get_machine().
Regards,
BALATON Zoltan
> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
> ccsr = CCSR(dev);
> @@ -1002,7 +1002,7 @@ void ppce500_init(MachineState *machine)
>
> /* PCI */
> dev = qdev_new("e500-pcihost");
> - object_property_add_child(qdev_get_machine(), "pci-host", OBJECT(dev));
> + object_property_add_child(OBJECT(machine), "pci-host", OBJECT(dev));
> qdev_prop_set_uint32(dev, "first_slot", pmc->pci_first_slot);
> qdev_prop_set_uint32(dev, "first_pin_irq", pci_irq_nrs[0]);
> s = SYS_BUS_DEVICE(dev);
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 4/6] hw/ppc/e500: Prefer local variable over qdev_get_machine()
2022-12-16 14:57 ` [PATCH 4/6] hw/ppc/e500: Prefer local variable over qdev_get_machine() Bernhard Beschow
2022-12-16 15:06 ` BALATON Zoltan
@ 2022-12-16 16:30 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 20+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-16 16:30 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz,
Cédric Le Goater
On 16/12/22 15:57, Bernhard Beschow wrote:
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> hw/ppc/e500.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
> index 2fe496677c..ad83924004 100644
> --- a/hw/ppc/e500.c
> +++ b/hw/ppc/e500.c
> @@ -959,7 +959,7 @@ void ppce500_init(MachineState *machine)
> memory_region_add_subregion(address_space_mem, 0, machine->ram);
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 5/6] hw/ppc/e500: Resolve variable shadowing
2022-12-16 14:57 [PATCH 0/6] Trivial PPC cleanups Bernhard Beschow
` (3 preceding siblings ...)
2022-12-16 14:57 ` [PATCH 4/6] hw/ppc/e500: Prefer local variable over qdev_get_machine() Bernhard Beschow
@ 2022-12-16 14:57 ` Bernhard Beschow
2022-12-16 14:57 ` [PATCH 6/6] hw/ppc/e500: Move comment to more appropriate place Bernhard Beschow
` (2 subsequent siblings)
7 siblings, 0 replies; 20+ messages in thread
From: Bernhard Beschow @ 2022-12-16 14:57 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz,
Cédric Le Goater, Bernhard Beschow
Assign to the outer variable instead which even saves some code.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/ppc/e500.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index ad83924004..104a85ad22 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -883,7 +883,7 @@ void ppce500_init(MachineState *machine)
bool kernel_as_payload;
hwaddr bios_entry = 0;
target_long payload_size;
- struct boot_info *boot_info;
+ struct boot_info *boot_info = NULL;
int dt_size;
int i;
unsigned int smp_cpus = machine->smp.cpus;
@@ -938,7 +938,6 @@ void ppce500_init(MachineState *machine)
/* Register reset handler */
if (!i) {
/* Primary CPU */
- struct boot_info *boot_info;
boot_info = g_new0(struct boot_info, 1);
qemu_register_reset(ppce500_cpu_reset, cpu);
env->load_info = boot_info;
@@ -1217,7 +1216,6 @@ void ppce500_init(MachineState *machine)
}
assert(dt_size < DTB_MAX_SIZE);
- boot_info = env->load_info;
boot_info->entry = bios_entry;
boot_info->dt_base = dt_base;
boot_info->dt_size = dt_size;
--
2.39.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 6/6] hw/ppc/e500: Move comment to more appropriate place
2022-12-16 14:57 [PATCH 0/6] Trivial PPC cleanups Bernhard Beschow
` (4 preceding siblings ...)
2022-12-16 14:57 ` [PATCH 5/6] hw/ppc/e500: Resolve variable shadowing Bernhard Beschow
@ 2022-12-16 14:57 ` Bernhard Beschow
2022-12-16 15:32 ` [PATCH 0/6] Trivial PPC cleanups Cédric Le Goater
2022-12-16 17:50 ` Daniel Henrique Barboza
7 siblings, 0 replies; 20+ messages in thread
From: Bernhard Beschow @ 2022-12-16 14:57 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz,
Cédric Le Goater, Bernhard Beschow
The TLB entries are set up in mmubooke_create_initial_mapping(), not in
booke206_page_size_to_tlb().
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/ppc/e500.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 104a85ad22..c6aeccce7a 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -692,7 +692,6 @@ static int ppce500_prep_device_tree(PPCE500MachineState *machine,
kernel_base, kernel_size, true);
}
-/* Create -kernel TLB entries for BookE. */
hwaddr booke206_page_size_to_tlb(uint64_t size)
{
return 63 - clz64(size / KiB);
@@ -723,6 +722,7 @@ static uint64_t mmubooke_initial_mapsize(CPUPPCState *env)
return (1ULL << 10 << tsize);
}
+/* Create -kernel TLB entries for BookE. */
static void mmubooke_create_initial_mapping(CPUPPCState *env)
{
ppcmas_tlb_t *tlb = booke206_get_tlbm(env, 1, 0, 0);
--
2.39.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 0/6] Trivial PPC cleanups
2022-12-16 14:57 [PATCH 0/6] Trivial PPC cleanups Bernhard Beschow
` (5 preceding siblings ...)
2022-12-16 14:57 ` [PATCH 6/6] hw/ppc/e500: Move comment to more appropriate place Bernhard Beschow
@ 2022-12-16 15:32 ` Cédric Le Goater
2022-12-16 16:04 ` Bernhard Beschow
2022-12-16 17:50 ` Daniel Henrique Barboza
7 siblings, 1 reply; 20+ messages in thread
From: Cédric Le Goater @ 2022-12-16 15:32 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz
On 12/16/22 15:57, Bernhard Beschow wrote:
> These are some patches which helped me when getting a u-boot image to run on ppce500 machine.
Nice. Did you simply use the qemu-ppce500_defconfig ? or an u-boot old image ?
We could update the qemu_ppc_e500mc_defconfig in buildroot to generate the
uboot.bin if that worked.
>
> Testing done:
> - `make check`
> - `make check-avocado`
>
> Bernhard Beschow (6):
> target/ppc/mmu_common: Log which effective address had no TLB entry
> found
> target/ppc/mmu_common: Fix table layout of "info tlb" HMP command
> hw/ppc/virtex_ml507: Prefer local over global variable
> hw/ppc/e500: Prefer local variable over qdev_get_machine()
> hw/ppc/e500: Resolve variable shadowing
> hw/ppc/e500: Move comment to more appropriate place
>
> hw/ppc/e500.c | 10 ++++------
> hw/ppc/virtex_ml507.c | 2 +-
> target/ppc/mmu_common.c | 5 +++--
> 3 files changed, 8 insertions(+), 9 deletions(-)
>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Thanks,
C.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/6] Trivial PPC cleanups
2022-12-16 15:32 ` [PATCH 0/6] Trivial PPC cleanups Cédric Le Goater
@ 2022-12-16 16:04 ` Bernhard Beschow
0 siblings, 0 replies; 20+ messages in thread
From: Bernhard Beschow @ 2022-12-16 16:04 UTC (permalink / raw)
To: Cédric Le Goater, qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Daniel Henrique Barboza, Greg Kurz
Am 16. Dezember 2022 15:32:00 UTC schrieb "Cédric Le Goater" <clg@kaod.org>:
>On 12/16/22 15:57, Bernhard Beschow wrote:
>> These are some patches which helped me when getting a u-boot image to run on ppce500 machine.
>
>Nice. Did you simply use the qemu-ppce500_defconfig ? or an u-boot old image ?
I used P1020RDB-PC_NAND_defconfig from the u-boot repository plus my branch https://github.com/shentok/qemu/commits/e500-u-boot . I had to comment out the fdt handling in u-boot for now since I didn't figure out yet how to include the dt blob in the elf binary. Anyway, with this I get a u-boot shell!
>
>We could update the qemu_ppc_e500mc_defconfig in buildroot to generate the
>uboot.bin if that worked.
I haven't looked into that yet but this sounds interesting!
Best regards,
Bernhard
>
>
>>
>> Testing done:
>> - `make check`
>> - `make check-avocado`
>>
>> Bernhard Beschow (6):
>> target/ppc/mmu_common: Log which effective address had no TLB entry
>> found
>> target/ppc/mmu_common: Fix table layout of "info tlb" HMP command
>> hw/ppc/virtex_ml507: Prefer local over global variable
>> hw/ppc/e500: Prefer local variable over qdev_get_machine()
>> hw/ppc/e500: Resolve variable shadowing
>> hw/ppc/e500: Move comment to more appropriate place
>>
>> hw/ppc/e500.c | 10 ++++------
>> hw/ppc/virtex_ml507.c | 2 +-
>> target/ppc/mmu_common.c | 5 +++--
>> 3 files changed, 8 insertions(+), 9 deletions(-)
>>
>
>
>Reviewed-by: Cédric Le Goater <clg@kaod.org>
>
>Thanks,
>
>C.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/6] Trivial PPC cleanups
2022-12-16 14:57 [PATCH 0/6] Trivial PPC cleanups Bernhard Beschow
` (6 preceding siblings ...)
2022-12-16 15:32 ` [PATCH 0/6] Trivial PPC cleanups Cédric Le Goater
@ 2022-12-16 17:50 ` Daniel Henrique Barboza
2022-12-20 22:40 ` Bernhard Beschow
7 siblings, 1 reply; 20+ messages in thread
From: Daniel Henrique Barboza @ 2022-12-16 17:50 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Greg Kurz, Cédric Le Goater
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,
Daniel
On 12/16/22 11:57, Bernhard Beschow wrote:
> These are some patches which helped me when getting a u-boot image to run on ppce500 machine.
>
> Testing done:
> - `make check`
> - `make check-avocado`
>
> Bernhard Beschow (6):
> target/ppc/mmu_common: Log which effective address had no TLB entry
> found
> target/ppc/mmu_common: Fix table layout of "info tlb" HMP command
> hw/ppc/virtex_ml507: Prefer local over global variable
> hw/ppc/e500: Prefer local variable over qdev_get_machine()
> hw/ppc/e500: Resolve variable shadowing
> hw/ppc/e500: Move comment to more appropriate place
>
> hw/ppc/e500.c | 10 ++++------
> hw/ppc/virtex_ml507.c | 2 +-
> target/ppc/mmu_common.c | 5 +++--
> 3 files changed, 8 insertions(+), 9 deletions(-)
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/6] Trivial PPC cleanups
2022-12-16 17:50 ` Daniel Henrique Barboza
@ 2022-12-20 22:40 ` Bernhard Beschow
2022-12-20 22:53 ` Bernhard Beschow
0 siblings, 1 reply; 20+ messages in thread
From: Bernhard Beschow @ 2022-12-20 22:40 UTC (permalink / raw)
To: Daniel Henrique Barboza, qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Greg Kurz, Cédric Le Goater
Am 16. Dezember 2022 17:50:41 UTC schrieb Daniel Henrique Barboza <danielhb413@gmail.com>:
>Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,
Thanks Daniel!
Is there a way we could accomodate for Zoltan's comment still? It's just cosmetics, so should be pretty simple.
Best regards,
Bernhard
>
>
>Daniel
>
>On 12/16/22 11:57, Bernhard Beschow wrote:
>> These are some patches which helped me when getting a u-boot image to run on ppce500 machine.
>>
>> Testing done:
>> - `make check`
>> - `make check-avocado`
>>
>> Bernhard Beschow (6):
>> target/ppc/mmu_common: Log which effective address had no TLB entry
>> found
>> target/ppc/mmu_common: Fix table layout of "info tlb" HMP command
>> hw/ppc/virtex_ml507: Prefer local over global variable
>> hw/ppc/e500: Prefer local variable over qdev_get_machine()
>> hw/ppc/e500: Resolve variable shadowing
>> hw/ppc/e500: Move comment to more appropriate place
>>
>> hw/ppc/e500.c | 10 ++++------
>> hw/ppc/virtex_ml507.c | 2 +-
>> target/ppc/mmu_common.c | 5 +++--
>> 3 files changed, 8 insertions(+), 9 deletions(-)
>>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/6] Trivial PPC cleanups
2022-12-20 22:40 ` Bernhard Beschow
@ 2022-12-20 22:53 ` Bernhard Beschow
2022-12-21 10:27 ` Daniel Henrique Barboza
0 siblings, 1 reply; 20+ messages in thread
From: Bernhard Beschow @ 2022-12-20 22:53 UTC (permalink / raw)
To: Daniel Henrique Barboza, qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Greg Kurz, Cédric Le Goater
Am 20. Dezember 2022 22:40:25 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>
>
>Am 16. Dezember 2022 17:50:41 UTC schrieb Daniel Henrique Barboza <danielhb413@gmail.com>:
>>Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,
>
>Thanks Daniel!
>
>Is there a way we could accomodate for Zoltan's comment still? It's just cosmetics, so should be pretty simple.
Yeah, you sent a pull request already! Thanks!
I''ll address Zoltan's comment in a future series since I'm working on e500 anyway.
Best regards,
Bernhard
>
>Best regards,
>Bernhard
>>
>>
>>Daniel
>>
>>On 12/16/22 11:57, Bernhard Beschow wrote:
>>> These are some patches which helped me when getting a u-boot image to run on ppce500 machine.
>>>
>>> Testing done:
>>> - `make check`
>>> - `make check-avocado`
>>>
>>> Bernhard Beschow (6):
>>> target/ppc/mmu_common: Log which effective address had no TLB entry
>>> found
>>> target/ppc/mmu_common: Fix table layout of "info tlb" HMP command
>>> hw/ppc/virtex_ml507: Prefer local over global variable
>>> hw/ppc/e500: Prefer local variable over qdev_get_machine()
>>> hw/ppc/e500: Resolve variable shadowing
>>> hw/ppc/e500: Move comment to more appropriate place
>>>
>>> hw/ppc/e500.c | 10 ++++------
>>> hw/ppc/virtex_ml507.c | 2 +-
>>> target/ppc/mmu_common.c | 5 +++--
>>> 3 files changed, 8 insertions(+), 9 deletions(-)
>>>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/6] Trivial PPC cleanups
2022-12-20 22:53 ` Bernhard Beschow
@ 2022-12-21 10:27 ` Daniel Henrique Barboza
2022-12-21 17:04 ` Bernhard Beschow
0 siblings, 1 reply; 20+ messages in thread
From: Daniel Henrique Barboza @ 2022-12-21 10:27 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Greg Kurz, Cédric Le Goater
On 12/20/22 19:53, Bernhard Beschow wrote:
>
>
> Am 20. Dezember 2022 22:40:25 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>>
>>
>> Am 16. Dezember 2022 17:50:41 UTC schrieb Daniel Henrique Barboza <danielhb413@gmail.com>:
>>> Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,
>>
>> Thanks Daniel!
>>
>> Is there a way we could accomodate for Zoltan's comment still? It's just cosmetics, so should be pretty simple.
>
> Yeah, you sent a pull request already! Thanks!
>
> I''ll address Zoltan's comment in a future series since I'm working on e500 anyway.
I'll have to respin the pull request due to a clang error. I'll take the
opportunity to amend patch 4 with mister Balaton's suggestion.
Daniel
>
> Best regards,
> Bernhard
>
>>
>> Best regards,
>> Bernhard
>>>
>>>
>>> Daniel
>>>
>>> On 12/16/22 11:57, Bernhard Beschow wrote:
>>>> These are some patches which helped me when getting a u-boot image to run on ppce500 machine.
>>>>
>>>> Testing done:
>>>> - `make check`
>>>> - `make check-avocado`
>>>>
>>>> Bernhard Beschow (6):
>>>> target/ppc/mmu_common: Log which effective address had no TLB entry
>>>> found
>>>> target/ppc/mmu_common: Fix table layout of "info tlb" HMP command
>>>> hw/ppc/virtex_ml507: Prefer local over global variable
>>>> hw/ppc/e500: Prefer local variable over qdev_get_machine()
>>>> hw/ppc/e500: Resolve variable shadowing
>>>> hw/ppc/e500: Move comment to more appropriate place
>>>>
>>>> hw/ppc/e500.c | 10 ++++------
>>>> hw/ppc/virtex_ml507.c | 2 +-
>>>> target/ppc/mmu_common.c | 5 +++--
>>>> 3 files changed, 8 insertions(+), 9 deletions(-)
>>>>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/6] Trivial PPC cleanups
2022-12-21 10:27 ` Daniel Henrique Barboza
@ 2022-12-21 17:04 ` Bernhard Beschow
0 siblings, 0 replies; 20+ messages in thread
From: Bernhard Beschow @ 2022-12-21 17:04 UTC (permalink / raw)
To: Daniel Henrique Barboza, qemu-devel
Cc: qemu-ppc, Edgar E. Iglesias, Laurent Vivier, David Gibson,
Michael Tokarev, qemu-trivial, Greg Kurz, Cédric Le Goater
Am 21. Dezember 2022 10:27:51 UTC schrieb Daniel Henrique Barboza <danielhb413@gmail.com>:
>
>
>On 12/20/22 19:53, Bernhard Beschow wrote:
>>
>>
>> Am 20. Dezember 2022 22:40:25 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>>>
>>>
>>> Am 16. Dezember 2022 17:50:41 UTC schrieb Daniel Henrique Barboza <danielhb413@gmail.com>:
>>>> Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,
>>>
>>> Thanks Daniel!
>>>
>>> Is there a way we could accomodate for Zoltan's comment still? It's just cosmetics, so should be pretty simple.
>>
>> Yeah, you sent a pull request already! Thanks!
>>
>> I''ll address Zoltan's comment in a future series since I'm working on e500 anyway.
>
>I'll have to respin the pull request due to a clang error. I'll take the
>opportunity to amend patch 4 with mister Balaton's suggestion.
Yay!
Best regards,
Bernhard
>
>
>Daniel
>
>>
>> Best regards,
>> Bernhard
>>
>>>
>>> Best regards,
>>> Bernhard
>>>>
>>>>
>>>> Daniel
>>>>
>>>> On 12/16/22 11:57, Bernhard Beschow wrote:
>>>>> These are some patches which helped me when getting a u-boot image to run on ppce500 machine.
>>>>>
>>>>> Testing done:
>>>>> - `make check`
>>>>> - `make check-avocado`
>>>>>
>>>>> Bernhard Beschow (6):
>>>>> target/ppc/mmu_common: Log which effective address had no TLB entry
>>>>> found
>>>>> target/ppc/mmu_common: Fix table layout of "info tlb" HMP command
>>>>> hw/ppc/virtex_ml507: Prefer local over global variable
>>>>> hw/ppc/e500: Prefer local variable over qdev_get_machine()
>>>>> hw/ppc/e500: Resolve variable shadowing
>>>>> hw/ppc/e500: Move comment to more appropriate place
>>>>>
>>>>> hw/ppc/e500.c | 10 ++++------
>>>>> hw/ppc/virtex_ml507.c | 2 +-
>>>>> target/ppc/mmu_common.c | 5 +++--
>>>>> 3 files changed, 8 insertions(+), 9 deletions(-)
>>>>>
^ permalink raw reply [flat|nested] 20+ messages in thread