[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v7 05/12] s390-ccw: move auxiliary IPL data to s
From: |
Viktor Mihajlovski |
Subject: |
Re: [qemu-s390x] [PATCH v7 05/12] s390-ccw: move auxiliary IPL data to separate location |
Date: |
Mon, 19 Feb 2018 17:07:10 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 16.02.2018 23:07, Collin L. Walling wrote:
[...]
> diff --git a/hw/s390x/ipl.h b/hw/s390x/ipl.h
> index 8a705e0..74469b1 100644
> --- a/hw/s390x/ipl.h
> +++ b/hw/s390x/ipl.h
> @@ -16,8 +16,7 @@
> #include "cpu.h"
>
> struct IplBlockCcw {
> - uint64_t netboot_start_addr;
> - uint8_t reserved0[77];
> + uint8_t reserved0[85];
> uint8_t ssid;
> uint16_t devno;
> uint8_t vm_flags;
> @@ -59,6 +58,21 @@ typedef struct IplBlockQemuScsi IplBlockQemuScsi;
>
> #define DIAG308_FLAGS_LP_VALID 0x80
>
> +#define QIPL_ADDRESS 0xcc
> +
> +/*
> + * The QEMU IPL Parameters will be stored 32-bit word aligned.
> + * Placement of data fields in this area must account for
> + * their alignment needs.
> + * The entire structure must not be larger than 28 bytes.
> + */
I realize that my initial suggestion was flawed. Hopefully better:
/*
* The QEMU IPL Parameters will be stored at absolute address
* 204 (0xcc) which means it is 32-bit word aligned but not
* double-word aligned.
* Placement of data fields in this area must account for
* their alignment needs. E.g., netboot_start_address must
* have an offset of n * 8 bytes within the struct in order
* to keep it double-word aligned.
* The total size of the struct must never exceed 28 bytes.
* This definition must be kept in sync with the defininition
* in pc-bios/s390-ccw/iplb.h.
*/
> +struct QemuIplParameters {
> + uint8_t reserved1[4];
> + uint64_t netboot_start_addr;
> + uint8_t reserved2[16];
> +} QEMU_PACKED;
> +typedef struct QemuIplParameters QemuIplParameters;
> +
> union IplParameterBlock {
> struct {
> uint32_t len;
[...]
> diff --git a/pc-bios/s390-ccw/iplb.h b/pc-bios/s390-ccw/iplb.h
> index 890aed9..a23237e 100644
> --- a/pc-bios/s390-ccw/iplb.h
> +++ b/pc-bios/s390-ccw/iplb.h
> @@ -13,8 +13,7 @@
> #define IPLB_H
>
> struct IplBlockCcw {
> - uint64_t netboot_start_addr;
> - uint8_t reserved0[77];
> + uint8_t reserved0[85];
> uint8_t ssid;
> uint16_t devno;
> uint8_t vm_flags;
> @@ -73,6 +72,23 @@ typedef struct IplParameterBlock IplParameterBlock;
>
> extern IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE)));
>
> +#define QIPL_ADDRESS 0xcc
> +
> +/*
> + * The QEMU IPL Parameters will be stored 32-bit word aligned.
> + * Placement of data fields in this area must account for
> + * their alignment needs.
> + * The entire structure must not be larger than 28 bytes.
> + */
The comment can probably be a bit more terse, avoiding text duplication
and potential inconsistencies arising thereof.
/*
* This definition must be kept in sync with the defininition
* in hw/s390x/ipl.h
*/
> +struct QemuIplParameters {
> + uint8_t reserved1[4];
> + uint64_t netboot_start_addr;
> + uint8_t reserved2[16];
> +} __attribute__ ((packed));
> +typedef struct QemuIplParameters QemuIplParameters;
> +
> +extern QemuIplParameters qipl;
> +
> #define S390_IPL_TYPE_FCP 0x00
> #define S390_IPL_TYPE_CCW 0x02
> #define S390_IPL_TYPE_QEMU_SCSI 0xff
[...]
--
Regards,
Viktor Mihajlovski
- Re: [qemu-s390x] [PATCH v7 04/12] s390-ccw: update libc, (continued)
- Re: [qemu-s390x] [PATCH v7 04/12] s390-ccw: update libc, Thomas Huth, 2018/02/19
- Re: [qemu-s390x] [PATCH v7 04/12] s390-ccw: update libc, Collin L. Walling, 2018/02/19
- Re: [qemu-s390x] [Qemu-devel] [PATCH v7 04/12] s390-ccw: update libc, Collin L. Walling, 2018/02/19
- Re: [qemu-s390x] [Qemu-devel] [PATCH v7 04/12] s390-ccw: update libc, Eric Blake, 2018/02/19
- Re: [qemu-s390x] [Qemu-devel] [PATCH v7 04/12] s390-ccw: update libc, Thomas Huth, 2018/02/19
[qemu-s390x] [PATCH v7 05/12] s390-ccw: move auxiliary IPL data to separate location, Collin L. Walling, 2018/02/16
Re: [qemu-s390x] [PATCH v7 05/12] s390-ccw: move auxiliary IPL data to separate location,
Viktor Mihajlovski <=
[qemu-s390x] [PATCH v7 07/12] s390-ccw: set up interactive boot menu parameters, Collin L. Walling, 2018/02/16
[qemu-s390x] [PATCH v7 11/12] s390-ccw: set cp_receive mask only when needed and consume pending service irqs, Collin L. Walling, 2018/02/16
[qemu-s390x] [PATCH v7 12/12] s390-ccw: interactive boot menu for scsi, Collin L. Walling, 2018/02/16
[qemu-s390x] [PATCH v7 09/12] s390-ccw: print zipl boot menu, Collin L. Walling, 2018/02/16
[qemu-s390x] [PATCH v7 08/12] s390-ccw: read stage2 boot loader data to find menu, Collin L. Walling, 2018/02/16
[qemu-s390x] [PATCH v7 10/12] s390-ccw: read user input for boot index via the SCLP console, Collin L. Walling, 2018/02/16