[PATCH 0/6] Trivial PPC cleanups

Bernhard Beschow posted 6 patches 1 year, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221216145709.271940-1-shentey@gmail.com
Maintainers: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>
hw/ppc/e500.c           | 10 ++++------
hw/ppc/virtex_ml507.c   |  2 +-
target/ppc/mmu_common.c |  5 +++--
3 files changed, 8 insertions(+), 9 deletions(-)
[PATCH 0/6] Trivial PPC cleanups
Posted by Bernhard Beschow 1 year, 4 months ago
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(-)

-- 
2.39.0

Re: [PATCH 0/6] Trivial PPC cleanups
Posted by Daniel Henrique Barboza 1 year, 4 months ago
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(-)
>
Re: [PATCH 0/6] Trivial PPC cleanups
Posted by Bernhard Beschow 1 year, 4 months ago

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(-)
>> 
Re: [PATCH 0/6] Trivial PPC cleanups
Posted by Bernhard Beschow 1 year, 4 months ago

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(-)
>>> 
Re: [PATCH 0/6] Trivial PPC cleanups
Posted by Daniel Henrique Barboza 1 year, 4 months ago

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(-)
>>>>
Re: [PATCH 0/6] Trivial PPC cleanups
Posted by Bernhard Beschow 1 year, 4 months ago

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(-)
>>>>> 
Re: [PATCH 0/6] Trivial PPC cleanups
Posted by Cédric Le Goater 1 year, 4 months ago
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.

Re: [PATCH 0/6] Trivial PPC cleanups
Posted by Bernhard Beschow 1 year, 4 months ago

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.