Consolidate PSW masks

While at it, rename PSW_SHORT_ADDR_MASK and PSW_ADDRESS_MASK to
PSW32_ADDR_MASK. As a side effect this removes the zipl.h dependency
of the boot loaders. While at it,

Reviewed-by: Philipp Rudo <prudo@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2020-03-23 12:26:57 +01:00
committed by Jan Höppner
parent eb4e806cdc
commit 93a0cb254e
8 changed files with 15 additions and 16 deletions
+1 -2
View File
@@ -18,7 +18,6 @@
#include "stage3.h"
#include "error.h"
#include "zipl.h"
#include "ebcdic.h"
#include "ebcdic_conv.h"
@@ -152,7 +151,7 @@ void start(void)
_stage3_parms.load_psw != DEFAULT_PSW_LOAD)
panic(ESECUREBOOT, "%s", msg_sipl_inval);
if (!is_verified_address(_stage3_parms.load_psw & PSW_ADDR_MASK))
if (!is_verified_address(_stage3_parms.load_psw & PSW32_ADDR_MASK))
panic(ESECUREBOOT, "%s", msg_sipl_unverified);
}
/*
-1
View File
@@ -22,7 +22,6 @@
#define STAGE3_FLAG_KDUMP 0x0002000000000000ULL
#define DEFAULT_PSW_LOAD 0x0008000080010000UL
#define PSW_ADDR_MASK 0x000000007FFFFFFFUL
#define UNSPECIFIED_ADDRESS -1UL
-4
View File
@@ -26,10 +26,6 @@
#define MAXIMUM_PARMLINE_SIZE 0x380UL
#define MAXIMUM_PHYSICAL_BLOCKSIZE 0x1000UL
#define PSW_ADDRESS_MASK 0x000000007fffffffUL
#define PSW_LOAD 0x0008000080000000UL
#define PSW_DISABLED_WAIT 0x000a000000000000UL
#define BOOTMAP_FILENAME "bootmap"
#define BOOTMAP_TEMPLATE_FILENAME "bootmap_temp.XXXXXX"
+2 -2
View File
@@ -87,7 +87,7 @@ boot_get_stage3_parms(void **buffer, size_t *bytecount, address_t parm_addr,
struct stage3_parms params;
void* data;
if (entry != (entry & PSW_ADDRESS_MASK)) {
if (entry != (entry & PSW32_ADDR_MASK)) {
error_reason("Kernel image entry point to high (31 bit "
"addressing mode)");
return -1;
@@ -238,7 +238,7 @@ boot_get_tape_ipl(void** data, size_t* size, address_t parm_addr,
struct boot_tape_ipl_params params;
void* buffer;
if (image_addr != (image_addr & PSW_ADDRESS_MASK)) {
if (image_addr != (image_addr & PSW32_ADDR_MASK)) {
error_reason("Kernel image load address to high (31 bit "
"addressing mode)");
return -1;
+1
View File
@@ -21,6 +21,7 @@
#include "lib/zt_common.h"
#include "lib/util_part.h"
#include "lib/util_path.h"
#include "boot/s390.h"
#include "stage3.h"
#include "boot.h"