[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/7] pc-bios: s390x: Replace lowcore offsets with pointers in das
From: |
Janosch Frank |
Subject: |
[PATCH 5/7] pc-bios: s390x: Replace lowcore offsets with pointers in dasd-ipl.c |
Date: |
Wed, 15 Jul 2020 05:40:43 -0400 |
Let's replace some more constant offsets with references into the
lowcore for better readability.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
pc-bios/s390-ccw/dasd-ipl.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pc-bios/s390-ccw/dasd-ipl.c b/pc-bios/s390-ccw/dasd-ipl.c
index 0543334ed4..9ab9a0fa12 100644
--- a/pc-bios/s390-ccw/dasd-ipl.c
+++ b/pc-bios/s390-ccw/dasd-ipl.c
@@ -120,8 +120,8 @@ static void run_readipl(SubChannelId schid, uint16_t cutype)
*/
static void check_ipl1(void)
{
- Ccw0 *ccwread = (Ccw0 *)0x08;
- Ccw0 *ccwtic = (Ccw0 *)0x10;
+ Ccw0 *ccwread = (Ccw0 *) &lowcore->ccw1;
+ Ccw0 *ccwtic = (Ccw0 *) &lowcore->ccw2;
if (ccwread->cmd_code != CCW_CMD_DASD_READ ||
ccwtic->cmd_code != CCW_CMD_TIC) {
@@ -143,15 +143,15 @@ static void check_ipl2(uint32_t ipl2_addr)
static uint32_t read_ipl2_addr(void)
{
- Ccw0 *ccwtic = (Ccw0 *)0x10;
+ Ccw0 *ccwtic = (Ccw0 *)&lowcore->ccw2;
return ccwtic->cda;
}
static void ipl1_fixup(void)
{
- Ccw0 *ccwSeek = (Ccw0 *) 0x08;
- Ccw0 *ccwSearchID = (Ccw0 *) 0x10;
+ Ccw0 *ccwSeek = (Ccw0 *) &lowcore->ccw1;
+ Ccw0 *ccwSearchID = (Ccw0 *) &lowcore->ccw2;
Ccw0 *ccwSearchTic = (Ccw0 *) 0x18;
Ccw0 *ccwRead = (Ccw0 *) 0x20;
CcwSeekData *seekData = (CcwSeekData *) 0x30;
--
2.25.1
- Re: [PATCH 6/7] pc-bios: s390x: Use PSW constants in start.S, (continued)
- [PATCH 7/7] pc-bios: s390x: Setup io and ext new psws only once, Janosch Frank, 2020/07/15
- Re: [PATCH 7/7] pc-bios: s390x: Setup io and ext new psws only once, Janosch Frank, 2020/07/15
- Re: [PATCH 7/7] pc-bios: s390x: Setup io and ext new psws only once, Christian Borntraeger, 2020/07/15
- [PATCH] pc-bios: s390x: Add a comment to the io and external new PSW setup, Janosch Frank, 2020/07/15
- Re: [PATCH] pc-bios: s390x: Add a comment to the io and external new PSW setup, Thomas Huth, 2020/07/21
- Re: [PATCH] pc-bios: s390x: Add a comment to the io and external new PSW setup, Christian Borntraeger, 2020/07/22
- Re: [PATCH] pc-bios: s390x: Add a comment to the io and external new PSW setup, Janosch Frank, 2020/07/22
- Re: [PATCH] pc-bios: s390x: Add a comment to the io and external new PSW setup, Christian Borntraeger, 2020/07/22
- Re: [PATCH] pc-bios: s390x: Add a comment to the io and external new PSW setup, Janosch Frank, 2020/07/22
[PATCH 5/7] pc-bios: s390x: Replace lowcore offsets with pointers in dasd-ipl.c,
Janosch Frank <=
[PATCH 4/7] pc-bios: s390x: Rework data initialization, Janosch Frank, 2020/07/15
[PATCH 2/7] pc-bios: s390x: Cleanup jump to ipl code, Janosch Frank, 2020/07/15