Skip to content

Commit 00cd1c1

Browse files
Daniel Kipersuryasaimadhu
Daniel Kiper
authored andcommitted
x86/boot: Introduce kernel_info.setup_type_max
This field contains maximal allowed type for setup_data. Do not bump setup_header version in arch/x86/boot/header.S because it will be followed by additional changes coming into the Linux/x86 boot protocol. Suggested-by: H. Peter Anvin (Intel) <[email protected]> Signed-off-by: Daniel Kiper <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Reviewed-by: Ross Philipson <[email protected]> Reviewed-by: H. Peter Anvin (Intel) <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: [email protected] Cc: Boris Ostrovsky <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Ingo Molnar <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Juergen Gross <[email protected]> Cc: [email protected] Cc: [email protected] Cc: linux-efi <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Thomas Gleixner <[email protected]> Cc: x86-ml <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
1 parent 2c33c27 commit 00cd1c1

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

Documentation/x86/boot.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Protocol 2.14: BURNT BY INCORRECT COMMIT ae7e1238e68f2a472a125673ab506d49158c188
7373
(x86/boot: Add ACPI RSDP address to setup_header)
7474
DO NOT USE!!! ASSUME SAME AS 2.13.
7575

76-
Protocol 2.15: (Kernel 5.5) Added the kernel_info.
76+
Protocol 2.15: (Kernel 5.5) Added the kernel_info and kernel_info.setup_type_max.
7777
============= ============================================================
7878

7979
.. note::
@@ -981,6 +981,13 @@ Offset/size: 0x0008/4
981981
This field contains the size of the kernel_info including kernel_info.header
982982
and kernel_info.kernel_info_var_len_data.
983983

984+
============ ==============
985+
Field name: setup_type_max
986+
Offset/size: 0x000c/4
987+
============ ==============
988+
989+
This field contains maximal allowed type for setup_data.
990+
984991

985992
The Image Checksum
986993
==================

arch/x86/boot/compressed/kernel_info.S

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
22

3+
#include <asm/bootparam.h>
4+
35
.section ".rodata.kernel_info", "a"
46

57
.global kernel_info
@@ -12,6 +14,9 @@ kernel_info:
1214
/* Size total. */
1315
.long kernel_info_end - kernel_info
1416

17+
/* Maximal allowed type for setup_data. */
18+
.long SETUP_TYPE_MAX
19+
1520
kernel_info_var_len_data:
1621
/* Empty for time being... */
1722
kernel_info_end:

arch/x86/include/uapi/asm/bootparam.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
#define SETUP_APPLE_PROPERTIES 5
1212
#define SETUP_JAILHOUSE 6
1313

14+
/* max(SETUP_*) */
15+
#define SETUP_TYPE_MAX SETUP_JAILHOUSE
16+
1417
/* ram_size flags */
1518
#define RAMDISK_IMAGE_START_MASK 0x07FF
1619
#define RAMDISK_PROMPT_FLAG 0x8000

0 commit comments

Comments
 (0)