qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/7] pc-bios: s390x: Cleanup jump to ipl code


From: Christian Borntraeger
Subject: Re: [PATCH 2/7] pc-bios: s390x: Cleanup jump to ipl code
Date: Tue, 21 Jul 2020 15:54:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0


On 17.07.20 17:13, Thomas Huth wrote:
> On 15/07/2020 11.40, Janosch Frank wrote:
>> jump_to_IPL_code takes a 64 bit address, masks it with the short psw
>> address mask and later branches to it using a full 64 bit register.
>>
>> * As the masking is not necessary, let's remove it
>> * Without the mask we can save the ipl address to a static 64 bit
>>   function ptr as we later branch to it
>> * Let's also clean up the variable names and remove the now unneeded
>>   ResetInfo
>>
>> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
>> ---
>>  pc-bios/s390-ccw/jump2ipl.c | 27 +++++++++++----------------
>>  1 file changed, 11 insertions(+), 16 deletions(-)
>>
>> diff --git a/pc-bios/s390-ccw/jump2ipl.c b/pc-bios/s390-ccw/jump2ipl.c
>> index 767012bf0c..aef37cea76 100644
>> --- a/pc-bios/s390-ccw/jump2ipl.c
>> +++ b/pc-bios/s390-ccw/jump2ipl.c
>> @@ -13,20 +13,15 @@
>>  #define KERN_IMAGE_START 0x010000UL
>>  #define RESET_PSW_MASK (PSW_MASK_SHORTPSW | PSW_MASK_64)
>>  
>> -typedef struct ResetInfo {
>> -    uint64_t ipl_psw;
>> -    uint32_t ipl_continue;
>> -} ResetInfo;
>> -
>> -static ResetInfo save;
>> +static void (*ipl_continue)(void);
>> +static uint64_t psw_save;
> 
> Christian, do you remember whether there was a reason that we saved the
> "ipl_continue" in the low-core in the past?
> 
> The changes here look ok to me, but I still wonder why it has been more
> "complicated" before...?

This construct was made to restore the memory outside of the loader to the
original content. The new code should also work I guess. 



> 
> Acked-by: Thomas Huth <thuth@redhat.com>
> 



reply via email to

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