Files
s390-tools/zipl/boot/kdump.c
Marc Hartmayer b83c8944f1 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>
2020-03-02 14:26:30 +01:00

41 lines
1.1 KiB
C

/*
* zipl - zSeries Initial Program Loader tool
*
* Stand-alone kdump support
*
* Copyright IBM Corp. 2013, 2017
*
* s390-tools is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
*/
#include "error.h"
#include "kdump.h"
#include "libc.h"
#include "menu.h"
#include "boot/s390.h"
void kdump_failed(unsigned long reason)
{
panic(reason, "Dump failed: Check disabled wait code");
}
void os_info_check(struct os_info *os_info)
{
if (os_info == NULL)
kdump_failed(EOS_INFO_MISSING);
if (((unsigned long) os_info) % PAGE_SIZE)
kdump_failed(EOS_INFO_MISSING);
if (!page_is_valid((unsigned long) os_info))
kdump_failed(EOS_INFO_MISSING);
if (os_info->magic != OS_INFO_MAGIC)
kdump_failed(EOS_INFO_MISSING);
if (csum_partial(&os_info->version_major, OS_INF0_CSUM_SIZE, 0) !=
os_info->csum)
kdump_failed(EOS_INFO_CSUM_FAILED);
if (os_info->version_major > OS_INFO_VERSION_MAJOR_SUPPORTED)
kdump_failed(EOS_INFO_VERSION);
if (os_info->crashkernel_addr == 0)
kdump_failed(EOS_INFO_NOCRASHKERNEL);
}