qemu-devel
[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: Tue, 14 Jan 2020 11:33:58 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0


On 13/01/2020 18:05, David Gibson wrote:
> On Fri, Jan 10, 2020 at 11:51:32AM +1100, Alexey Kardashevskiy wrote:
>>
>>
>> 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 :)
> 
> If you only allow one instance per device, could you just make
> ihandles == phandle | CONSTANT?


I started doing real instances so I am not sure such limiting is worth it.


-- 
Alexey



reply via email to

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