Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-12 Thread David Gibson
On Thu, Jan 09, 2020 at 05:31:24PM +1100, Alexey Kardashevskiy wrote: > > > On 09/01/2020 15:07, David Gibson wrote: > > On Wed, Jan 08, 2020 at 03:07:41PM +1100, Alexey Kardashevskiy wrote: > >> > >> > >> On 07/01/2020 16:26, David Gibson wrote: > >> > +static uint32_t client_setprop(Sp

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-08 Thread Alexey Kardashevskiy
On 09/01/2020 15:07, David Gibson wrote: > On Wed, Jan 08, 2020 at 03:07:41PM +1100, Alexey Kardashevskiy wrote: >> >> >> On 07/01/2020 16:26, David Gibson wrote: >> +static uint32_t client_setprop(SpaprMachineState *sm, + uint32_t nodeph, uint32_t

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-08 Thread David Gibson
On Wed, Jan 08, 2020 at 03:07:41PM +1100, Alexey Kardashevskiy wrote: > > > On 07/01/2020 16:26, David Gibson wrote: > > >> +static uint32_t client_setprop(SpaprMachineState *sm, > >> + uint32_t nodeph, uint32_t pname, > >> +

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-08 Thread David Gibson
On Wed, Jan 08, 2020 at 04:53:06PM +1100, Alexey Kardashevskiy wrote: > > > On 08/01/2020 15:20, Alexey Kardashevskiy wrote: > > > > > > On 07/01/2020 16:54, David Gibson wrote: > >> On Tue, Jan 07, 2020 at 03:44:35PM +1100, Alexey Kardashevskiy wrote: > >>> > >>> > >>> On 06/01/2020 15:19, Dav

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-08 Thread David Gibson
On Wed, Jan 08, 2020 at 03:20:22PM +1100, Alexey Kardashevskiy wrote: > > > On 07/01/2020 16:54, David Gibson wrote: > > On Tue, Jan 07, 2020 at 03:44:35PM +1100, Alexey Kardashevskiy wrote: > >> > >> > >> On 06/01/2020 15:19, David Gibson wrote: > + > +static uint32_t client_package_to

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-07 Thread Alexey Kardashevskiy
On 08/01/2020 15:20, Alexey Kardashevskiy wrote: > > > On 07/01/2020 16:54, David Gibson wrote: >> On Tue, Jan 07, 2020 at 03:44:35PM +1100, Alexey Kardashevskiy wrote: >>> >>> >>> On 06/01/2020 15:19, David Gibson wrote: > + > +static uint32_t client_package_to_path(const void *fdt, u

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-07 Thread Alexey Kardashevskiy
On 07/01/2020 16:54, David Gibson wrote: > On Tue, Jan 07, 2020 at 03:44:35PM +1100, Alexey Kardashevskiy wrote: >> >> >> On 06/01/2020 15:19, David Gibson wrote: + +static uint32_t client_package_to_path(const void *fdt, uint32_t phandle, + u

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-07 Thread Alexey Kardashevskiy
On 07/01/2020 16:26, David Gibson wrote: >> +static uint32_t client_setprop(SpaprMachineState *sm, >> + uint32_t nodeph, uint32_t pname, >> + uint32_t valaddr, uint32_t vallen) >> +{ >> +char propname[64]; >

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-07 Thread David Gibson
On Mon, Jan 06, 2020 at 11:34:13PM +1100, Alexey Kardashevskiy wrote: > > > On 06/01/2020 19:50, David Gibson wrote: > > On Mon, Jan 06, 2020 at 05:28:55PM +1100, Alexey Kardashevskiy wrote: > > > > > > > > > On 06/01/2020 15:19, David Gibson wrote: > > > > On Mon, Jan 06, 2020 at 10:42:42AM +1

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-07 Thread David Gibson
On Tue, Jan 07, 2020 at 03:44:35PM +1100, Alexey Kardashevskiy wrote: > > > On 06/01/2020 15:19, David Gibson wrote: > >> + > >> +static uint32_t client_package_to_path(const void *fdt, uint32_t phandle, > >> + uint32_t buf, uint32_t len) > >> +{ > >> +ch

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Alexey Kardashevskiy
On 06/01/2020 15:19, David Gibson wrote: >> + >> +static uint32_t client_package_to_path(const void *fdt, uint32_t phandle, >> + uint32_t buf, uint32_t len) >> +{ >> +char tmp[256]; > > Fixed sized buffers are icky. You could either dynamically allocat

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Alexey Kardashevskiy
On 07/01/2020 04:25, Peter Maydell wrote: > On Mon, 6 Jan 2020 at 17:09, Cédric Le Goater wrote: >> ARM bootloaders are also embedded in QEMU's code. See hw/arm/boot.c. >> You could improve a bit the definition though. > > Given an opportunity to restart from scratch I don't know > that I'd do

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread David Gibson
On Tue, Jan 07, 2020 at 12:39:42AM +1100, Alexey Kardashevskiy wrote: > > > On 06/01/2020 15:19, David Gibson wrote: > > > > +const struct fdt_property *prop; > > > +const char *tmp; > > > + > > > +readstr(prevaddr, prev); > > > +for (offset = fdt_first_property_offset(fdt, offse

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Philippe Mathieu-Daudé
On 1/6/20 6:25 PM, Peter Maydell wrote: On Mon, 6 Jan 2020 at 17:09, Cédric Le Goater wrote: ARM bootloaders are also embedded in QEMU's code. See hw/arm/boot.c. You could improve a bit the definition though. Given an opportunity to restart from scratch I don't know that I'd do things the way

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Peter Maydell
On Mon, 6 Jan 2020 at 17:09, Cédric Le Goater wrote: > ARM bootloaders are also embedded in QEMU's code. See hw/arm/boot.c. > You could improve a bit the definition though. Given an opportunity to restart from scratch I don't know that I'd do things the way hw/arm/boot.c does. The initial idea wa

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Cédric Le Goater
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index e62c89b3dd40..1c97534a0aea 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -896,6 +896,51 @@ out: >   return ret; >   } >   +/* > + * Below is a compiled version of RTAS blob and OF client inter

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Alexey Kardashevskiy
On 06/01/2020 15:19, David Gibson wrote: +const struct fdt_property *prop; +const char *tmp; + +readstr(prevaddr, prev); +for (offset = fdt_first_property_offset(fdt, offset); + (offset >= 0); + (offset = fdt_next_property_offset(fdt, offset))) { + +pro

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Alexey Kardashevskiy
On 06/01/2020 19:50, David Gibson wrote: On Mon, Jan 06, 2020 at 05:28:55PM +1100, Alexey Kardashevskiy wrote: On 06/01/2020 15:19, David Gibson wrote: On Mon, Jan 06, 2020 at 10:42:42AM +1100, Alexey Kardashevskiy wrote: The Petitboot bootloader is way more advanced than SLOF is ever goi

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread David Gibson
On Mon, Jan 06, 2020 at 05:28:55PM +1100, Alexey Kardashevskiy wrote: > > > On 06/01/2020 15:19, David Gibson wrote: > > On Mon, Jan 06, 2020 at 10:42:42AM +1100, Alexey Kardashevskiy wrote: > >> The Petitboot bootloader is way more advanced than SLOF is ever going to > >> be as Petitboot comes w

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-05 Thread Alexey Kardashevskiy
On 06/01/2020 15:19, David Gibson wrote: > On Mon, Jan 06, 2020 at 10:42:42AM +1100, Alexey Kardashevskiy wrote: >> The Petitboot bootloader is way more advanced than SLOF is ever going to >> be as Petitboot comes with the full-featured Linux kernel with all >> the drivers, and initramdisk with

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-05 Thread David Gibson
On Mon, Jan 06, 2020 at 10:42:42AM +1100, Alexey Kardashevskiy wrote: > The Petitboot bootloader is way more advanced than SLOF is ever going to > be as Petitboot comes with the full-featured Linux kernel with all > the drivers, and initramdisk with quite user friendly interface. > The problem with

[PATCH qemu v2] spapr: Kill SLOF

2020-01-05 Thread Alexey Kardashevskiy
The Petitboot bootloader is way more advanced than SLOF is ever going to be as Petitboot comes with the full-featured Linux kernel with all the drivers, and initramdisk with quite user friendly interface. The problem with ditching SLOF is that an unmodified pseries kernel can either start via: 1. k