mbox series

[0/6] Trivial PPC cleanups

Message ID 20221216145709.271940-1-shentey@gmail.com (mailing list archive)
Headers show
Series Trivial PPC cleanups | expand

Message

Bernhard Beschow Dec. 16, 2022, 2:57 p.m. UTC
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(-)

Comments

Cédric Le Goater Dec. 16, 2022, 3:32 p.m. UTC | #1
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.
Bernhard Beschow Dec. 16, 2022, 4:04 p.m. UTC | #2
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.
Daniel Henrique Barboza Dec. 16, 2022, 5:50 p.m. UTC | #3
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(-)
>
Bernhard Beschow Dec. 20, 2022, 10:40 p.m. UTC | #4
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(-)
>>
Bernhard Beschow Dec. 20, 2022, 10:53 p.m. UTC | #5
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(-)
>>>
Daniel Henrique Barboza Dec. 21, 2022, 10:27 a.m. UTC | #6
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(-)
>>>>
Bernhard Beschow Dec. 21, 2022, 5:04 p.m. UTC | #7
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(-)
>>>>>