Skip to content

Commit

Permalink
x86/boot: Introduce kernel_info.setup_type_max
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
Daniel Kiper authored and suryasaimadhu committed Nov 12, 2019
1 parent 2c33c27 commit 00cd1c1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Documentation/x86/boot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Protocol 2.14: BURNT BY INCORRECT COMMIT ae7e1238e68f2a472a125673ab506d49158c188
(x86/boot: Add ACPI RSDP address to setup_header)
DO NOT USE!!! ASSUME SAME AS 2.13.

Protocol 2.15: (Kernel 5.5) Added the kernel_info.
Protocol 2.15: (Kernel 5.5) Added the kernel_info and kernel_info.setup_type_max.
============= ============================================================

.. note::
Expand Down Expand Up @@ -981,6 +981,13 @@ Offset/size: 0x0008/4
This field contains the size of the kernel_info including kernel_info.header
and kernel_info.kernel_info_var_len_data.

============ ==============
Field name: setup_type_max
Offset/size: 0x000c/4
============ ==============

This field contains maximal allowed type for setup_data.


The Image Checksum
==================
Expand Down
5 changes: 5 additions & 0 deletions arch/x86/boot/compressed/kernel_info.S
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */

#include <asm/bootparam.h>

.section ".rodata.kernel_info", "a"

.global kernel_info
Expand All @@ -12,6 +14,9 @@ kernel_info:
/* Size total. */
.long kernel_info_end - kernel_info

/* Maximal allowed type for setup_data. */
.long SETUP_TYPE_MAX

kernel_info_var_len_data:
/* Empty for time being... */
kernel_info_end:
3 changes: 3 additions & 0 deletions arch/x86/include/uapi/asm/bootparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#define SETUP_APPLE_PROPERTIES 5
#define SETUP_JAILHOUSE 6

/* max(SETUP_*) */
#define SETUP_TYPE_MAX SETUP_JAILHOUSE

/* ram_size flags */
#define RAMDISK_IMAGE_START_MASK 0x07FF
#define RAMDISK_PROMPT_FLAG 0x8000
Expand Down

0 comments on commit 00cd1c1

Please sign in to comment.