mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
pc-bios/s390-ccw: add some utility code
IPL_assert(term,message) is introduced to handle error conditions. ebcdic_to_ascii() to convert chars (mostly to print VOLSERs). read_block() provision for unified block-number handling. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
parent
91a03f9b69
commit
a94b485e17
2 changed files with 84 additions and 14 deletions
|
@ -86,25 +86,12 @@ static int zipl_magic(uint8_t *ptr)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static inline bool unused_space(const void *p, unsigned int size)
|
||||
{
|
||||
int i;
|
||||
const unsigned char *m = p;
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
if (m[i] != FREE_SPACE_FILLER) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static int zipl_load_segment(ComponentEntry *entry)
|
||||
{
|
||||
const int max_entries = (MAX_SECTOR_SIZE / sizeof(ScsiBlockPtr));
|
||||
ScsiBlockPtr *bprs = (void *)sec;
|
||||
const int bprs_size = sizeof(sec);
|
||||
uint64_t blockno;
|
||||
block_number_t blockno;
|
||||
long address;
|
||||
int i;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue