Commit 402e262d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'efi-next-for-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI updates from Ard Biesheuvel:

 - Expose the OVMF firmware debug log via sysfs

 - Lower the default log level for the EFI stub to avoid corrupting any
   splash screens with unimportant diagnostic output

* tag 'efi-next-for-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  efi: add API doc entry for ovmf_debug_log
  efistub: Lower default log level
  efi: add ovmf debug log driver
parents c30a1353 02eb7a8e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -36,3 +36,10 @@ Description: Displays the content of the Runtime Configuration Interface
		Table version 2 on Dell EMC PowerEdge systems in binary format
Users:		It is used by Dell EMC OpenManage Server Administrator tool to
		populate BIOS setup page.

What:		/sys/firmware/efi/ovmf_debug_log
Date:		July 2025
Contact:	Gerd Hoffmann <kraxel@redhat.com>, linux-efi@vger.kernel.org
Description:	Displays the content of the OVMF debug log buffer.  The file is
		only present in case the firmware supports logging to a memory
		buffer.
+8 −0
Original line number Diff line number Diff line
@@ -263,6 +263,14 @@ config EFI_COCO_SECRET
	  virt/coco/efi_secret module to access the secrets, which in turn
	  allows userspace programs to access the injected secrets.

config OVMF_DEBUG_LOG
	bool "Expose OVMF firmware debug log via sysfs"
	depends on EFI
	help
	  Recent OVMF versions (edk2-stable202508 + newer) can write
	  their debug log to a memory buffer.  This driver exposes the
	  log content via sysfs (/sys/firmware/efi/ovmf_debug_log).

config UNACCEPTED_MEMORY
	bool
	depends on EFI_STUB
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ obj-$(CONFIG_APPLE_PROPERTIES) += apple-properties.o
obj-$(CONFIG_EFI_RCI2_TABLE)		+= rci2-table.o
obj-$(CONFIG_EFI_EMBEDDED_FIRMWARE)	+= embedded-firmware.o
obj-$(CONFIG_LOAD_UEFI_KEYS)		+= mokvar-table.o
obj-$(CONFIG_OVMF_DEBUG_LOG)		+= ovmf-debug-log.o

obj-$(CONFIG_SYSFB)			+= sysfb_efi.o

+8 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ struct efi __read_mostly efi = {
	.esrt			= EFI_INVALID_TABLE_ADDR,
	.tpm_log		= EFI_INVALID_TABLE_ADDR,
	.tpm_final_log		= EFI_INVALID_TABLE_ADDR,
	.ovmf_debug_log         = EFI_INVALID_TABLE_ADDR,
#ifdef CONFIG_LOAD_UEFI_KEYS
	.mokvar_table		= EFI_INVALID_TABLE_ADDR,
#endif
@@ -473,6 +474,10 @@ static int __init efisubsys_init(void)
		platform_device_register_simple("efi_secret", 0, NULL, 0);
#endif

	if (IS_ENABLED(CONFIG_OVMF_DEBUG_LOG) &&
	    efi.ovmf_debug_log != EFI_INVALID_TABLE_ADDR)
		ovmf_log_probe(efi.ovmf_debug_log);

	return 0;

err_remove_group:
@@ -617,6 +622,9 @@ static const efi_config_table_type_t common_tables[] __initconst = {
	{LINUX_EFI_MEMRESERVE_TABLE_GUID,	&mem_reserve,		"MEMRESERVE"	},
	{LINUX_EFI_INITRD_MEDIA_GUID,		&initrd,		"INITRD"	},
	{EFI_RT_PROPERTIES_TABLE_GUID,		&rt_prop,		"RTPROP"	},
#ifdef CONFIG_OVMF_DEBUG_LOG
	{OVMF_MEMORY_LOG_TABLE_GUID,		&efi.ovmf_debug_log,	"OvmfDebugLog"	},
#endif
#ifdef CONFIG_EFI_RCI2_TABLE
	{DELLEMC_EFI_RCI2_TABLE_GUID,		&rci2_table_phys			},
#endif
+2 −2
Original line number Diff line number Diff line
@@ -5,13 +5,13 @@
#include <linux/ctype.h>
#include <linux/efi.h>
#include <linux/kernel.h>
#include <linux/printk.h> /* For CONSOLE_LOGLEVEL_* */
#include <linux/kern_levels.h>
#include <asm/efi.h>
#include <asm/setup.h>

#include "efistub.h"

int efi_loglevel = CONSOLE_LOGLEVEL_DEFAULT;
int efi_loglevel = LOGLEVEL_NOTICE;

/**
 * efi_char16_puts() - Write a UCS-2 encoded string to the console
Loading