diff --git a/zipl/boot/sclp.h b/zipl/boot/sclp.h index 2da9d8e3..12e87938 100644 --- a/zipl/boot/sclp.h +++ b/zipl/boot/sclp.h @@ -60,6 +60,7 @@ struct sccb_header { uint8_t control_mask[3]; uint16_t response_code; }; +STATIC_ASSERT(sizeof(struct sccb_header) == 2 + 1 + 3 + 2) /* Structure must not have any padding */ struct evbuf_header { @@ -68,6 +69,7 @@ struct evbuf_header { uint8_t flags; uint16_t _reserved; }; +STATIC_ASSERT(sizeof(struct evbuf_header) == 2 + 1 + 1 + 2) struct mto { uint16_t length; diff --git a/zipl/boot/sclp_stage3.h b/zipl/boot/sclp_stage3.h index 1391cf41..d115e0db 100644 --- a/zipl/boot/sclp_stage3.h +++ b/zipl/boot/sclp_stage3.h @@ -42,6 +42,8 @@ struct sdias_sccb { struct sccb_header header; struct sdias_evbuf evbuf; }; +STATIC_ASSERT(sizeof(struct sdias_sccb) == + sizeof(struct sccb_header) + sizeof(struct sdias_evbuf)) int sclp_hsa_copy(void *, unsigned long, unsigned long); diff --git a/zipl/boot/stage3.h b/zipl/boot/stage3.h index f6a6c51f..27b18d47 100644 --- a/zipl/boot/stage3.h +++ b/zipl/boot/stage3.h @@ -15,6 +15,8 @@ #include "libc.h" #include "s390.h" +#include "lib/zt_common.h" + #define IPL_DEVICE 0x10404UL #define INITRD_START 0x10408UL #define INITRD_SIZE 0x10410UL @@ -128,6 +130,7 @@ struct ipl_rb_hdr { uint8_t rbt; uint8_t reserved1[11]; }; +STATIC_ASSERT(sizeof(struct ipl_rb_hdr) == 4 + 1 + 11) /* IPL Report Block types */ enum ipl_rbt { @@ -168,6 +171,7 @@ struct ipl_rb_components { uint8_t reserved1[11]; struct ipl_rb_component_entry entries[]; }; +STATIC_ASSERT(sizeof(struct ipl_rb_components) == 4 + 1 + 11) extern unsigned long long _parm_addr; /* address of parmline */ extern unsigned long long _initrd_addr; /* address of initrd */