Skip to content

Commit 8572f52

Browse files
author
Alexander Gordeev
committed
s390/os_info: Store virtual memory layout
This is a preparatory rework to allow uncoupling virtual and physical addresses spaces. The virtual memory layout will be read out by makedumpfile, crash and other user tools for virtual address translation. Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
1 parent 8870279 commit 8572f52

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

arch/s390/include/asm/os_info.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
#define OS_INFO_REIPL_BLOCK 1
1919
#define OS_INFO_FLAGS_ENTRY 2
2020
#define OS_INFO_RESERVED 3
21+
#define OS_INFO_IDENTITY_BASE 4
22+
#define OS_INFO_KASLR_OFFSET 5
23+
#define OS_INFO_KASLR_OFF_PHYS 6
24+
#define OS_INFO_VMEMMAP 7
25+
#define OS_INFO_AMODE31_START 8
26+
#define OS_INFO_AMODE31_END 9
2127

2228
#define OS_INFO_FLAG_REIPL_CLEAR (1UL << 0)
2329

@@ -37,8 +43,8 @@ struct os_info {
3743
u16 version_minor;
3844
u64 crashkernel_addr;
3945
u64 crashkernel_size;
40-
struct os_info_entry entry[4];
41-
u8 reserved[3984];
46+
struct os_info_entry entry[10];
47+
u8 reserved[3864];
4248
} __packed;
4349

4450
void os_info_init(void);

arch/s390/kernel/os_info.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <asm/checksum.h>
1616
#include <asm/abs_lowcore.h>
1717
#include <asm/os_info.h>
18+
#include <asm/physmem_info.h>
1819
#include <asm/maccess.h>
1920
#include <asm/asm-offsets.h>
2021

@@ -74,6 +75,12 @@ void __init os_info_init(void)
7475
os_info.version_major = OS_INFO_VERSION_MAJOR;
7576
os_info.version_minor = OS_INFO_VERSION_MINOR;
7677
os_info.magic = OS_INFO_MAGIC;
78+
os_info_entry_add_val(OS_INFO_IDENTITY_BASE, __identity_base);
79+
os_info_entry_add_val(OS_INFO_KASLR_OFFSET, kaslr_offset());
80+
os_info_entry_add_val(OS_INFO_KASLR_OFF_PHYS, __kaslr_offset_phys);
81+
os_info_entry_add_val(OS_INFO_VMEMMAP, (unsigned long)vmemmap);
82+
os_info_entry_add_val(OS_INFO_AMODE31_START, AMODE31_START);
83+
os_info_entry_add_val(OS_INFO_AMODE31_END, AMODE31_END);
7784
os_info.csum = os_info_csum(&os_info);
7885
abs_lc = get_abs_lowcore();
7986
abs_lc->os_info = __pa(&os_info);

0 commit comments

Comments
 (0)