Commit 8572f525 authored by Alexander Gordeev's avatar Alexander Gordeev

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: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
parent 88702793
......@@ -18,6 +18,12 @@
#define OS_INFO_REIPL_BLOCK 1
#define OS_INFO_FLAGS_ENTRY 2
#define OS_INFO_RESERVED 3
#define OS_INFO_IDENTITY_BASE 4
#define OS_INFO_KASLR_OFFSET 5
#define OS_INFO_KASLR_OFF_PHYS 6
#define OS_INFO_VMEMMAP 7
#define OS_INFO_AMODE31_START 8
#define OS_INFO_AMODE31_END 9
#define OS_INFO_FLAG_REIPL_CLEAR (1UL << 0)
......@@ -37,8 +43,8 @@ struct os_info {
u16 version_minor;
u64 crashkernel_addr;
u64 crashkernel_size;
struct os_info_entry entry[4];
u8 reserved[3984];
struct os_info_entry entry[10];
u8 reserved[3864];
} __packed;
void os_info_init(void);
......
......@@ -15,6 +15,7 @@
#include <asm/checksum.h>
#include <asm/abs_lowcore.h>
#include <asm/os_info.h>
#include <asm/physmem_info.h>
#include <asm/maccess.h>
#include <asm/asm-offsets.h>
......@@ -74,6 +75,12 @@ void __init os_info_init(void)
os_info.version_major = OS_INFO_VERSION_MAJOR;
os_info.version_minor = OS_INFO_VERSION_MINOR;
os_info.magic = OS_INFO_MAGIC;
os_info_entry_add_val(OS_INFO_IDENTITY_BASE, __identity_base);
os_info_entry_add_val(OS_INFO_KASLR_OFFSET, kaslr_offset());
os_info_entry_add_val(OS_INFO_KASLR_OFF_PHYS, __kaslr_offset_phys);
os_info_entry_add_val(OS_INFO_VMEMMAP, (unsigned long)vmemmap);
os_info_entry_add_val(OS_INFO_AMODE31_START, AMODE31_START);
os_info_entry_add_val(OS_INFO_AMODE31_END, AMODE31_END);
os_info.csum = os_info_csum(&os_info);
abs_lc = get_abs_lowcore();
abs_lc->os_info = __pa(&os_info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment