qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH qemu v4] spapr: Kill SLOF


From: Alexey Kardashevskiy
Subject: Re: [PATCH qemu v4] spapr: Kill SLOF
Date: Fri, 10 Jan 2020 11:51:32 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0


On 10/01/2020 10:32, Alexey Kardashevskiy wrote:
> 
> 
> On 10/01/2020 10:05, Alexey Kardashevskiy wrote:
>>
>>
>> On 08/01/2020 17:18, 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 ditching SLOF is that an unmodified pseries kernel can
>>> either start via:
>>> 1. kexec, this requires presence of RTAS and skips
>>> ibm,client-architecture-support entirely;
>>> 2. normal boot, this heavily relies on the OF1275 client interface to
>>> fetch the device tree and do early setup (claim memory).
>>>
>>> This adds a new bios-less mode to the pseries machine: "bios=on|off".
>>> When enabled, QEMU does not load SLOF and jumps to the kernel from
>>> "-kernel".
>>>
>>> The client interface is implemented exactly as RTAS - a 20 bytes blob,
>>> right next after the RTAS blob. The entry point is passed to the kernel
>>> via GPR5.
>>>
>>> This implements a handful of client interface methods just to get going.
>>> In particular, this implements the device tree fetching,
>>> ibm,client-architecture-support and instantiate-rtas.
>>>
>>> This implements changing FDT properties for RTAS (for vmlinux and zImage)
>>> and initramdisk location (for zImage). To make this work, this skips
>>> fdt_pack() when bios=off as not packing the blob leaves some room for
>>> appending.
>>>
>>> This assigns "phandles" to device tree nodes as there is no more SLOF
>>> and OF nodes addresses of which served as phandle values.
>>> This keeps predefined nodes (such as XICS/NVLINK/...) unchanged.
>>> phandles are regenerated at every FDT rebuild.
>>>
>>> This defines phandles for VIO devices to have phandle assigned to
>>> the default stdout device at the point when we write "/chosen/stdout"
>>> which an ihandle which the OS uses to write to the console.
>>
>>
>> And I do not really need to preallocate phandles for stdout as it is a
>> leftover from when I populated /chosen/stdout before populating VIO
>> nodes, now /chosen/stdout is added at the very end. Thanks,
> 
> 
> Ah noo, I do, to implement "write" to the selected stdout as I need to
> trace ihandle back to Object* and  object_resolve_path() does not know
> about FDT path, it is /machine/peripheral/svty0 in QOM. The commit log
> needs an update, or this needs a fix but I cannot think of a nicer one.
> Thanks,


I just might extend instances to do real instances, i.e. associate
ihandle with phandle _and_ Object*, I just need a helper to find Object
which matches what qdev_get_fw_dev_path() returns. Fun :)


> 
> 
>>
>>
>>
>>>
>>> When bios=off, this adds "/chosen" every time QEMU builds a tree.
>>>
>>> This implements "claim" which the client (Linux) uses for memory
>>> allocation; this is also  used by QEMU for claiming kernel/initrd images,
>>> client interface entry point, RTAS and the initial stack.
>>>
>>> While at this, add a "kernel-addr" machine parameter to allow moving
>>> the kernel in memory. This is useful for debugging if the kernel is
>>> loaded at @0, although not necessary.
>>>
>>> This adds very basic instances support which are managed by a hashmap
>>> ihandle->phandle.
>>>
>>> Note that a 64bit PCI fix is required for Linux:
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=df5be5be8735e
>>
>>
>>
> 

-- 
Alexey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]