[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 11/12] pc-bios: s390x: Fix bootmap.c passing PSWs as addresses
From: |
Janosch Frank |
Subject: |
[PATCH v5 11/12] pc-bios: s390x: Fix bootmap.c passing PSWs as addresses |
Date: |
Wed, 24 Jun 2020 03:52:25 -0400 |
The component entries written by zipl contain short PSWs, not
addresses. Let's mask them and only pass the address part to
jump_to_IPL_code(uint64_t address) because it expects an address as
visible by the name of the argument.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
pc-bios/s390-ccw/bootmap.c | 5 +++--
pc-bios/s390-ccw/bootmap.h | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c
index 97205674e5..8547a140df 100644
--- a/pc-bios/s390-ccw/bootmap.c
+++ b/pc-bios/s390-ccw/bootmap.c
@@ -10,6 +10,7 @@
#include "libc.h"
#include "s390-ccw.h"
+#include "s390-arch.h"
#include "bootmap.h"
#include "virtio.h"
#include "bswap.h"
@@ -436,7 +437,7 @@ static void zipl_load_segment(ComponentEntry *entry)
char *blk_no = &err_msg[30]; /* where to print blockno in (those ZZs) */
blockno = entry->data.blockno;
- address = entry->load_address;
+ address = entry->psw & PSW_MASK_SHORT_ADDR;
debug_print_int("loading segment at block", blockno);
debug_print_int("addr", address);
@@ -514,7 +515,7 @@ static void zipl_run(ScsiBlockPtr *pte)
IPL_assert(entry->component_type == ZIPL_COMP_ENTRY_EXEC, "No EXEC entry");
/* should not return */
- jump_to_IPL_code(entry->load_address);
+ jump_to_IPL_code(entry->psw & PSW_MASK_SHORT_ADDR);
}
static void ipl_scsi(void)
diff --git a/pc-bios/s390-ccw/bootmap.h b/pc-bios/s390-ccw/bootmap.h
index 12a0166aae..e07f87e690 100644
--- a/pc-bios/s390-ccw/bootmap.h
+++ b/pc-bios/s390-ccw/bootmap.h
@@ -68,7 +68,7 @@ typedef struct ComponentEntry {
ScsiBlockPtr data;
uint8_t pad[7];
uint8_t component_type;
- uint64_t load_address;
+ uint64_t psw;
} __attribute((packed)) ComponentEntry;
typedef struct ComponentHeader {
--
2.25.1
- [PATCH v5 00/12] pc-bios: s390x: Cleanup part 1, Janosch Frank, 2020/06/24
- [PATCH v5 03/12] pc-bios: s390x: Move sleep and yield to helper.h, Janosch Frank, 2020/06/24
- [PATCH v5 02/12] pc-bios: s390x: Consolidate timing functions into time.h, Janosch Frank, 2020/06/24
- [PATCH v5 01/12] pc-bios: s390x: cio.c cleanup and compile fix, Janosch Frank, 2020/06/24
- [PATCH v5 07/12] pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR, Janosch Frank, 2020/06/24
- [PATCH v5 06/12] pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64, Janosch Frank, 2020/06/24
- [PATCH v5 11/12] pc-bios: s390x: Fix bootmap.c passing PSWs as addresses,
Janosch Frank <=
- [PATCH v5 05/12] pc-bios: s390x: Remove unneeded dasd-ipl.c reset psw mask changes, Janosch Frank, 2020/06/24
- [PATCH v5 08/12] pc-bios: s390x: Move panic() into header and add infinite loop, Janosch Frank, 2020/06/24
- [PATCH v5 04/12] pc-bios: s390x: Get rid of magic offsets into the lowcore, Janosch Frank, 2020/06/24
- [PATCH v5 10/12] pc-bios: s390x: Make u32 ptr check explicit, Janosch Frank, 2020/06/24