mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
pc-bios: Add support for List-Directed IPL from ECKD DASD
Check for a List Directed IPL Boot Record, which would supersede the CCW type entries. If the record is valid, proceed to use the new style pointers and perform LD-IPL. Each block pointer is interpreted as either an LD-IPL pointer or a legacy CCW pointer depending on the type of IPL initiated. In either case CCW- or LD-IPL is transparent to the user and will boot the same image regardless of which set of pointers is used. Because the interactive boot menu is only written with the old style pointers, the menu will be disabled for List Directed IPL from ECKD DASD. If the LD-IPL fails, retry the IPL using the CCW type pointers. If no LD-IPL boot record is found, simply perform CCW type IPL as usual. Signed-off-by: Jared Rossi <jrossi@linux.ibm.com> Message-Id: <20230221174548.1866861-2-jrossi@linux.ibm.com> [thuth: Drop some superfluous parantheses] Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
4477035ec6
commit
8af5d14171
2 changed files with 150 additions and 41 deletions
|
@ -45,9 +45,23 @@ typedef struct EckdBlockPtr {
|
|||
* it's 0 for TablePtr, ScriptPtr, and SectionPtr */
|
||||
} __attribute__ ((packed)) EckdBlockPtr;
|
||||
|
||||
typedef struct ExtEckdBlockPtr {
|
||||
typedef struct LdEckdCHS {
|
||||
uint32_t cylinder;
|
||||
uint8_t head;
|
||||
uint8_t sector;
|
||||
} __attribute__ ((packed)) LdEckdCHS;
|
||||
|
||||
typedef struct LdEckdBlockPtr {
|
||||
LdEckdCHS chs; /* cylinder/head/sector is an address of the block */
|
||||
uint8_t reserved[4];
|
||||
uint16_t count;
|
||||
uint32_t pad;
|
||||
} __attribute__ ((packed)) LdEckdBlockPtr;
|
||||
|
||||
/* bptr is used for CCW type IPL, while ldptr is for list-directed IPL */
|
||||
typedef union ExtEckdBlockPtr {
|
||||
EckdBlockPtr bptr;
|
||||
uint8_t reserved[8];
|
||||
LdEckdBlockPtr ldptr;
|
||||
} __attribute__ ((packed)) ExtEckdBlockPtr;
|
||||
|
||||
typedef union BootMapPointer {
|
||||
|
@ -57,6 +71,15 @@ typedef union BootMapPointer {
|
|||
ExtEckdBlockPtr xeckd;
|
||||
} __attribute__ ((packed)) BootMapPointer;
|
||||
|
||||
typedef struct BootRecord {
|
||||
uint8_t magic[4];
|
||||
uint32_t version;
|
||||
uint64_t res1;
|
||||
BootMapPointer pgt;
|
||||
uint8_t reserved[510 - 32];
|
||||
uint16_t os_id;
|
||||
} __attribute__ ((packed)) BootRecord;
|
||||
|
||||
/* aka Program Table */
|
||||
typedef struct BootMapTable {
|
||||
uint8_t magic[4];
|
||||
|
@ -292,7 +315,8 @@ typedef struct IplVolumeLabel {
|
|||
struct {
|
||||
unsigned char key[4]; /* == "VOL1" */
|
||||
unsigned char volser[6];
|
||||
unsigned char reserved[6];
|
||||
unsigned char reserved[64];
|
||||
EckdCHS br; /* Location of Boot Record for list-directed IPL */
|
||||
} f;
|
||||
};
|
||||
} __attribute__((packed)) IplVolumeLabel;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue