Re: [PATCH 00/11] ppc/e500: Add support for two types of flash, cleanup

2022-09-18 Thread Philippe Mathieu-Daudé via

On 15/9/22 17:25, Bernhard Beschow wrote:

This series adds support for -pflash and direct SD card access to the
PPC e500 boards. The idea is to increase compatibility with "real" firmware
images where only the bare minimum of drivers is compiled in.

The series is structured as follows:

Patches 1-3 perform some general cleanup which paves the way for the rest of
the series.

Patches 4-7 add -pflash handling where memory-mapped flash can be added on
user's behalf. That is, the flash memory region is only added if the -pflash
argument is supplied. Note that the cfi01 device model becomes stricter in
checking the size of the emulated flash space.

Patches 8-11 add a new device model - the Freescale eSDHC - to the e500
boards which was missing so far.

User documentation is also added as the new features become available.


Future possible cleanup: Looking at the e500 component, the MPC8544 GUTS
added in commit b0fb84236d ("PPC: E500: Implement reboot controller")
was used in hw/ppce500_mpc8544ds.c board, but in a later refactor
(commit 4a18e7c92a "PPC: e500: rename mpc8544ds into generic file")
this file got renamed as hw/ppc/e500.c; having a MPC8544 specific piece
in the common e500 seems odd.



Re: [PATCH 00/11] ppc/e500: Add support for two types of flash, cleanup

2022-09-16 Thread Bernhard Beschow
On Fri, Sep 16, 2022 at 5:27 PM Bin Meng  wrote:

> Hi Bernhard,
>

Hi Bin,


> On Thu, Sep 15, 2022 at 11:25 PM Bernhard Beschow 
> wrote:
> >
> > This series adds support for -pflash and direct SD card access to the
> > PPC e500 boards. The idea is to increase compatibility with "real"
> firmware
> > images where only the bare minimum of drivers is compiled in.
> >
> > The series is structured as follows:
> >
> > Patches 1-3 perform some general cleanup which paves the way for the
> rest of
> > the series.
> >
> > Patches 4-7 add -pflash handling where memory-mapped flash can be added
> on
> > user's behalf. That is, the flash memory region is only added if the
> -pflash
> > argument is supplied. Note that the cfi01 device model becomes stricter
> in
> > checking the size of the emulated flash space.
> >
> > Patches 8-11 add a new device model - the Freescale eSDHC - to the e500
> > boards which was missing so far.
> >
> > User documentation is also added as the new features become available.
> >
> > Tesing done:
> > * `qemu-system-ppc -M ppce500 -cpu e500mc -m 256 -kernel uImage -append
> > "console=ttyS0 rootwait root=/dev/mtdblock0 nokaslr" -drive
> > if=pflash,file=rootfs.ext2,format=raw`
> > * `qemu-system-ppc -M ppce500 -cpu e500mc -m 256 -kernel uImage -append
> > "console=ttyS0 rootwait root=/dev/mmcblk0" -device sd-card,drive=mydrive
> -drive
> > id=mydrive,if=none,file=rootfs.ext2,format=raw`
>
> Thanks for the patches!
>

My obligation!


> Did you get a chance to test the U-Boot image to work with pflash and
> eSDHC?
>

 No, unfortunately not. Testing U-Boot would involve familiarizing myself
with it first which will probably come at some point. Right now, however,
my focus is on running a proprietary firmware flash image.

Best regards,
Bernhard

> >
> > The load was created using latest Buildroot with `make
> > qemu_ppc_e500mc_defconfig` where the rootfs was configured to be of ext2
> type.
> > In both cases it was possible to log in and explore the root file system.
> >
>
> Regards,
> Bin
>


Re: [PATCH 00/11] ppc/e500: Add support for two types of flash, cleanup

2022-09-16 Thread Bin Meng
Hi Bernhard,

On Thu, Sep 15, 2022 at 11:25 PM Bernhard Beschow  wrote:
>
> This series adds support for -pflash and direct SD card access to the
> PPC e500 boards. The idea is to increase compatibility with "real" firmware
> images where only the bare minimum of drivers is compiled in.
>
> The series is structured as follows:
>
> Patches 1-3 perform some general cleanup which paves the way for the rest of
> the series.
>
> Patches 4-7 add -pflash handling where memory-mapped flash can be added on
> user's behalf. That is, the flash memory region is only added if the -pflash
> argument is supplied. Note that the cfi01 device model becomes stricter in
> checking the size of the emulated flash space.
>
> Patches 8-11 add a new device model - the Freescale eSDHC - to the e500
> boards which was missing so far.
>
> User documentation is also added as the new features become available.
>
> Tesing done:
> * `qemu-system-ppc -M ppce500 -cpu e500mc -m 256 -kernel uImage -append
> "console=ttyS0 rootwait root=/dev/mtdblock0 nokaslr" -drive
> if=pflash,file=rootfs.ext2,format=raw`
> * `qemu-system-ppc -M ppce500 -cpu e500mc -m 256 -kernel uImage -append
> "console=ttyS0 rootwait root=/dev/mmcblk0" -device sd-card,drive=mydrive 
> -drive
> id=mydrive,if=none,file=rootfs.ext2,format=raw`

Thanks for the patches!

Did you get a chance to test the U-Boot image to work with pflash and eSDHC?

>
> The load was created using latest Buildroot with `make
> qemu_ppc_e500mc_defconfig` where the rootfs was configured to be of ext2 type.
> In both cases it was possible to log in and explore the root file system.
>

Regards,
Bin