xref: /openbmc/qemu/pc-bios/s390-ccw/menu.c (revision ba831b25262aa3d0c6d5eb0cd530487d3cb05493)
1 /*
2  * QEMU S390 Interactive Boot Menu
3  *
4  * Copyright 2018 IBM Corp.
5  * Author: Collin L. Walling <walling@linux.vnet.ibm.com>
6  *
7  * This work is licensed under the terms of the GNU GPL, version 2 or (at
8  * your option) any later version. See the COPYING file in the top-level
9  * directory.
10  */
11 
12 #include "libc.h"
13 #include "s390-ccw.h"
14 
15 static uint8_t flag;
16 static uint64_t timeout;
17 
18 int menu_get_zipl_boot_index(const char *menu_data)
19 {
20     return 0; /* implemented next patch */
21 }
22 
23 void menu_set_parms(uint8_t boot_menu_flag, uint32_t boot_menu_timeout)
24 {
25     flag = boot_menu_flag;
26     timeout = boot_menu_timeout;
27 }
28 
29 bool menu_is_enabled_zipl(void)
30 {
31     return flag & QIPL_FLAG_BM_OPTS_CMD;
32 }
33