[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 5/9] pc-bios: s390x: Rename and use PSW_MASK_ZMODE constant
From: |
Janosch Frank |
Subject: |
[PATCH v3 5/9] pc-bios: s390x: Rename and use PSW_MASK_ZMODE constant |
Date: |
Wed, 27 May 2020 03:49:16 -0400 |
ZMODE has a lot of ambiguity with the ESAME architecture mode, but is
actually 64 bit addressing.
As PSW_MASK_64 is now effectively 33 bit long and the PSWLegacy struct
has 2 32 bit members, let's also use a unsigned long pointer in
dasd-ipl.c instead when oring the constant into a 8 byte PSW.
Signed-off-by: Janosch Frank <address@hidden>
Reviewed-by: Pierre Morel <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
---
pc-bios/s390-ccw/dasd-ipl.c | 5 ++---
pc-bios/s390-ccw/s390-arch.h | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/pc-bios/s390-ccw/dasd-ipl.c b/pc-bios/s390-ccw/dasd-ipl.c
index 0fc879bb8e..0dbad051a2 100644
--- a/pc-bios/s390-ccw/dasd-ipl.c
+++ b/pc-bios/s390-ccw/dasd-ipl.c
@@ -206,7 +206,7 @@ static void run_ipl2(SubChannelId schid, uint16_t cutype,
uint32_t addr)
*/
void dasd_ipl(SubChannelId schid, uint16_t cutype)
{
- PSWLegacy *pswl = (PSWLegacy *) 0x00;
+ unsigned long *pswl = 0x0;
uint32_t ipl2_addr;
/* Construct Read IPL CCW and run it to read IPL1 from boot disk */
@@ -229,7 +229,6 @@ void dasd_ipl(SubChannelId schid, uint16_t cutype)
run_ipl2(schid, cutype, ipl2_addr);
/* Transfer control to the guest operating system */
- pswl->mask |= PSW_MASK_EAMODE; /* Force z-mode */
- pswl->addr |= PSW_MASK_BAMODE; /* ... */
+ *pswl |= PSW_MASK_64; /* Force 64 bit addressing */
jump_to_low_kernel();
}
diff --git a/pc-bios/s390-ccw/s390-arch.h b/pc-bios/s390-ccw/s390-arch.h
index 5f36361c02..73852029d4 100644
--- a/pc-bios/s390-ccw/s390-arch.h
+++ b/pc-bios/s390-ccw/s390-arch.h
@@ -29,7 +29,7 @@ _Static_assert(sizeof(struct PSWLegacy) == 8, "PSWLegacy size
incorrect");
#define PSW_MASK_WAIT 0x0002000000000000ULL
#define PSW_MASK_EAMODE 0x0000000100000000ULL
#define PSW_MASK_BAMODE 0x0000000080000000ULL
-#define PSW_MASK_ZMODE (PSW_MASK_EAMODE | PSW_MASK_BAMODE)
+#define PSW_MASK_64 (PSW_MASK_EAMODE | PSW_MASK_BAMODE)
/* Low core mapping */
typedef struct LowCore {
--
2.25.1
- Re: [PATCH v3 2/9] pc-bios: s390x: Consolidate timing functions into time.h, (continued)
- [PATCH v3 3/9] pc-bios: s390x: Move sleep and yield to helper.h, Janosch Frank, 2020/05/27
- [PATCH v3 4/9] pc-bios: s390x: Get rid of magic offsets into the lowcore, Janosch Frank, 2020/05/27
- [PATCH v3 6/9] pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR, Janosch Frank, 2020/05/27
- [PATCH v3 7/9] pc-bios: s390x: Move panic() into header and add infinite loop, Janosch Frank, 2020/05/27
- [PATCH v3 8/9] pc-bios: s390x: Use ebcdic2ascii table, Janosch Frank, 2020/05/27
- [PATCH v3 5/9] pc-bios: s390x: Rename and use PSW_MASK_ZMODE constant,
Janosch Frank <=
- [PATCH v3 9/9] pc-bios: s390x: Make u32 ptr check explicit, Janosch Frank, 2020/05/27
- Re: [PATCH v3 0/9] pc-bios: s390x: Cleanup part 1, no-reply, 2020/05/27