[Skiboot] [RFC PATCH v5 12/16] Load the ultravisor from flash and decompress

Alexey Kardashevskiy aik at ozlabs.ru
Wed Mar 25 11:51:14 AEDT 2020



On 25/03/2020 02:22, Ryan Grimm wrote:
> On Thu, 2020-03-12 at 12:08 +1100, Alexey Kardashevskiy wrote:
>>
>> On 28/02/2020 07:40, Ryan Grimm wrote:
>>> The ultravisor, labeled UVISOR is preloaded from the PNOR in
>>> main_cpu_entry after the kernel is preloaded.  This also works on
>>> FSP-based systems with an ultra.lid on the FSP.
>>>
>>> Skiboot decompresses it laster in init_uv.
>>
>>
>> s/laster/later/ ?
>>
> 
> k.
> 
>>> diff --git a/core/init.c b/core/init.c
>>> index f124f893..1300ab03 100644
>>> --- a/core/init.c
>>> +++ b/core/init.c
>>> @@ -1300,6 +1300,7 @@ void __noreturn __nomcount
>>> main_cpu_entry(const void *fdt)
>>>  
>>>  	preload_capp_ucode();
>>>  	start_preload_kernel();
>>> +	uv_preload_image();
>>
>>
>> Can this be a part of init_uv()?
>>
> 
> It could but isn't the point to preload it separately early in the boot
> cause loading from flash or FSP is slow?


No idea about how slow it is (Oliver may want to comment) but how moving
it earlier makes it faster? It is not running in parallel with something
else here. Thanks,


> 
> Then in init_uv the code decompresses it.
> 
> Does this sound OK?
> 
>>
>>>  
>>> +static int uv_decompress_image(void)
>>> +{
>>> +	struct xz_decompress *uv_xz;
>>
>>
>> xz_decompress is really small, allocate it on stack. Thanks,
>>
> 
> k, makes sense.
> 
> Thanks,
> Ryan
> 

-- 
Alexey


More information about the Skiboot mailing list