Re: [kvm-unit-tests PATCH v2 2/6] s390x: Make tests bootable from disk

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

 



On 06.12.18 10:20, David Hildenbrand wrote:
> On 05.12.18 16:39, Janosch Frank wrote:
>> Currently tests are run with the --kernel option of Qemu, which will
>> load the ELF file and jump to the start address. When booting from
>> disk, we need to specify a start address. This is done by setting the
>> initial short PSW at 0x0.
>>
>> Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
>> ---
>>  s390x/cstart64.S | 9 ++++++++-
>>  s390x/flat.lds   | 8 +++++++-
>>  2 files changed, 15 insertions(+), 2 deletions(-)
>>
>> diff --git a/s390x/cstart64.S b/s390x/cstart64.S
>> index dc7ddd6..d382497 100644
>> --- a/s390x/cstart64.S
>> +++ b/s390x/cstart64.S
>> @@ -14,9 +14,16 @@
>>  
>>  .section .init
>>  
>> -/* entry point - for KVM + TCG we directly start in 64 bit mode */
>> +/*
>> + * Short init between 0x10000 and 0x10480 and then jump to 0x11000.
>> + * 0x10480 - 0x11000 are written to by bootloader.
>> + *
>> + * For KVM and TCG kernel boot we are in 64 bit z/Arch mode.
>> + * When booting from disk the initial short psw is in 31 bit mode.
>> + */
>>  	.globl start
>>  start:
>> +	sam64				# Set addressing mode to 64 bit
>>  	/* setup stack */
>>  	larl	%r15, stackptr
>>  	/* setup initial PSW mask + control registers*/
>> diff --git a/s390x/flat.lds b/s390x/flat.lds
>> index b6e2172..7cfd9f9 100644
>> --- a/s390x/flat.lds
>> +++ b/s390x/flat.lds
>> @@ -1,10 +1,16 @@
>>  SECTIONS
>>  {
>> +	.lowcore : {
>> +		. = 0;
> 
> Can you add a comment here describing what this is and what it does?
> (31bit PSW jumping to start to be used for booting from disk)

Sure

> 
>> +		 LONG(0x00080000)
>> +		 LONG(0x80010000)
>> +	}
>> +	. = 0x10000;
>>  	.text : {
>>  		*(.init)
>>  		. = 0x480;
>>  		ipl_args = .;
>> -		. = 0x600;
>> +		.  = 0x1000;
> 
> Can you give me a hint why that change is needed?

Martin told me that it's saver to start again at 0x11000 you never know
how long the command line will be or if someone writes other stuff in there.

> 
>>  		*(.text)
>>  		*(.text.*)
>>  	}
>>
> 
> 


Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux