mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
The zipl internal loader adds a variable BOOT_IMAGE= to the commandline so that it is visible in the operating system which menu entry has been chosen. This entry was overwritten by the stage3 parameter page. Fix by re-arranging the internal memory layout and putting the command line extra param, which contains the BOOT_IMAGE entry, at 0xe000. This location is available because less than one page is used for the stack. Fixes: https://github.com/ibm-s390-tools/s390-tools/issues/67 Signed-off-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
44 lines
981 B
C
44 lines
981 B
C
/*
|
|
* zipl - zSeries Initial Program Loader tool
|
|
*
|
|
* Bootmenu Subroutines
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef MENU_H
|
|
#define MENU_H
|
|
|
|
#include "stage2.h"
|
|
|
|
/* address of extra command line */
|
|
#define COMMAND_LINE_EXTRA 0xE000
|
|
|
|
/* max command line length */
|
|
#define COMMAND_LINE_SIZE 896
|
|
#define BOOT_MENU_ENTRIES 63
|
|
#define LINE_LENGTH 80
|
|
#define PARAM_SIZE 8
|
|
#define TEXT_OFFSET 4
|
|
|
|
#define NUMBER_FOUND 0
|
|
#define PRINT_PROMPT 1
|
|
#define NOTHING_FOUND 2
|
|
|
|
struct boot_stage2_params {
|
|
uint16_t flag;
|
|
uint16_t timeout;
|
|
uint16_t banner;
|
|
uint16_t config[BOOT_MENU_ENTRIES];
|
|
uint64_t config_kdump;
|
|
} __packed;
|
|
|
|
extern struct boot_stage2_params __stage2_params;
|
|
|
|
int menu();
|
|
|
|
#endif /* MENU_H */
|