mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl: move s390.h to include/boot/s390.h
Now that we made sure that s390.h can be used with our minimal libc implementation and glibc move s390.h to `include/boot/s390.h`. While at it, make sure that s390.h is assembler compatible as it will be used later in the PV boot loader and include s390.h in ipl.h as PAGE_SIZE is used there. 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:
committed by
Jan Höppner
parent
f454c6825f
commit
b83c8944f1
@@ -11,6 +11,7 @@
|
||||
#define IPL_H
|
||||
|
||||
#include "lib/zt_common.h"
|
||||
#include "s390.h"
|
||||
|
||||
#define IPL_FLAG_SECURE 0x40
|
||||
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
/*
|
||||
* zipl - zSeries Initial Program Loader tool
|
||||
* s390 related definitions and functions.
|
||||
*
|
||||
* System z specific functions
|
||||
*
|
||||
* Copyright IBM Corp. 2013, 2017
|
||||
* Copyright IBM Corp. 2013, 2020
|
||||
*
|
||||
* s390-tools is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the MIT license. See LICENSE for details.
|
||||
*/
|
||||
|
||||
#ifndef S390_H
|
||||
#define S390_H
|
||||
|
||||
#include "lib/zt_common.h"
|
||||
#include "boot/sigp.h"
|
||||
|
||||
#define __LC_IPLDEV 0x0c6c
|
||||
#define __LC_OS_INFO 0x0e18
|
||||
|
||||
#define PAGE_SIZE _AC(4096, UL)
|
||||
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
/*
|
||||
* Helper macro for exception table entries
|
||||
@@ -194,10 +200,6 @@ struct _lowcore {
|
||||
|
||||
#define S390_lowcore (*((struct _lowcore *) 0))
|
||||
|
||||
#define __LC_IPLDEV 0x0c6c
|
||||
#define __LC_OS_INFO 0x0e18
|
||||
|
||||
#define PAGE_SIZE 4096
|
||||
|
||||
void panic_notify(unsigned long reason);
|
||||
|
||||
@@ -446,4 +448,5 @@ static __always_inline void stfle(uint64_t *stfle_fac_list, int size)
|
||||
memset((char *) stfle_fac_list + nr, 0, size * 8 - nr);
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#endif /* S390_H */
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
#include "cio.h"
|
||||
#include "error.h"
|
||||
#include "libc.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
|
||||
static unsigned long initial_lpm = 0x00;
|
||||
static const char *msg_essch = "Start subchannel failed";
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
#define CIO_H
|
||||
|
||||
#include "libc.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
|
||||
/* Condition codes */
|
||||
#define CC_INITIATED 0
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
#include "eckd.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
#include "stage2.h"
|
||||
|
||||
int extract_length(void *data)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "cio.h"
|
||||
#include "eckd2dump.h"
|
||||
#include "error.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
#include "stage2dump.h"
|
||||
|
||||
#define ECKD_CCW_LOCATE_RECORD 0x47
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "fba.h"
|
||||
#include "libc.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
|
||||
int extract_length(void *data) {
|
||||
struct linear_blockptr *blockptr = (struct linear_blockptr *)data;
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#include "kdump.h"
|
||||
#include "libc.h"
|
||||
#include "menu.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
|
||||
void kdump_failed(unsigned long reason)
|
||||
{
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
#define KDUMP_H
|
||||
|
||||
#include "libc.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
|
||||
#define OS_INFO_VERSION_MAJOR_SUPPORTED 1
|
||||
#define OS_INFO_MAGIC 0x4f53494e464f535aULL /* OSINFOSZ */
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "libc.h"
|
||||
#include "error.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
#include "sclp.h"
|
||||
|
||||
/* Perform service call. Return 0 on success, non-zero otherwise. */
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#define SCLP_H
|
||||
|
||||
#include "libc.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
|
||||
/* vector keys and ids */
|
||||
#define GDS_ID_MDSMU 0x1310
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
#include "error.h"
|
||||
#include "libc.h"
|
||||
#include "menu.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
#include "stage2.h"
|
||||
|
||||
static int is_null_descriptor(disk_blockptr_t *address)
|
||||
|
||||
+1
-2
@@ -15,7 +15,7 @@
|
||||
#include "cio.h"
|
||||
#include "error.h"
|
||||
#include "libc.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
|
||||
#define DESCR_PER_BLOCK 16
|
||||
|
||||
@@ -76,4 +76,3 @@ void kdump_stage2(unsigned long);
|
||||
|
||||
|
||||
#endif /* COMMON_H */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define STAGE2DUMP_H
|
||||
|
||||
#include "libc.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
|
||||
#define IPL_SC *((struct subchannel_id *) &S390_lowcore.subchannel_id)
|
||||
#define ROUND_DOWN(x, a) ((x) & ~((typeof(x))(a) - 1))
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "libc.h"
|
||||
#include "boot/sigp.h"
|
||||
#include "s390.h"
|
||||
#include "boot/s390.h"
|
||||
#include "stage3.h"
|
||||
#include "error.h"
|
||||
#include "zipl.h"
|
||||
|
||||
+1
-1
@@ -13,8 +13,8 @@
|
||||
#define STAGE3_H
|
||||
|
||||
#include "libc.h"
|
||||
#include "s390.h"
|
||||
|
||||
#include "boot/s390.h"
|
||||
#include "boot/ipl.h"
|
||||
#include "boot/linux_layout.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user