diff options
author | Collin L. Walling <walling@linux.vnet.ibm.com> | 2018-02-23 10:43:08 -0500 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2018-02-26 07:56:54 +0100 |
commit | 80beedcc387062a71c6563dfae0f607b396c2bfb (patch) | |
tree | 22e934fcc08f38a515f671fc79be994fe6123bc3 /pc-bios/s390-ccw/bootmap.h | |
parent | 5340eb072ffc36ccd33c67dcea0d5c939b492e98 (diff) | |
download | qemu-80beedcc387062a71c6563dfae0f607b396c2bfb.zip qemu-80beedcc387062a71c6563dfae0f607b396c2bfb.tar.gz qemu-80beedcc387062a71c6563dfae0f607b396c2bfb.tar.bz2 |
s390-ccw: refactor eckd_block_num to use CHS
Add new cylinder/head/sector struct. Use it to calculate
eckd block numbers instead of a BootMapPointer (which used
eckd chs anyway).
Signed-off-by: Collin L. Walling <walling@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios/s390-ccw/bootmap.h')
-rw-r--r-- | pc-bios/s390-ccw/bootmap.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pc-bios/s390-ccw/bootmap.h b/pc-bios/s390-ccw/bootmap.h index 486c0f3..b361084 100644 --- a/pc-bios/s390-ccw/bootmap.h +++ b/pc-bios/s390-ccw/bootmap.h @@ -32,10 +32,14 @@ typedef struct FbaBlockPtr { uint16_t blockct; } __attribute__ ((packed)) FbaBlockPtr; -typedef struct EckdBlockPtr { - uint16_t cylinder; /* cylinder/head/sector is an address of the block */ +typedef struct EckdCHS { + uint16_t cylinder; uint16_t head; uint8_t sector; +} __attribute__ ((packed)) EckdCHS; + +typedef struct EckdBlockPtr { + EckdCHS chs; /* cylinder/head/sector is an address of the block */ uint16_t size; uint8_t count; /* (size_in_blocks-1); * it's 0 for TablePtr, ScriptPtr, and SectionPtr */ |