From ec38e98d401a64893259158af32ba531cdd3ed77 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 29 Mar 2026 13:37:55 +0100 Subject: [PATCH] [disklog] Generalise CONSOLE_INT13 to CONSOLE_DISKLOG The name "int13" is intrinsically specific to a BIOS environment. Generalise the build configuration option CONSOLE_INT13 to CONSOLE_DISKLOG, in preparation for adding EFI disk log console support. Existing configurations using CONSOLE_INT13 will continue to work. Signed-off-by: Michael Brown --- src/arch/x86/interface/pcbios/int13con.c | 8 +++++++- src/arch/x86/prefix/usbdisk.S | 5 +++++ src/config/cloud/console.h | 2 +- src/config/config_pcbios.c | 3 +++ src/config/console.h | 2 +- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/arch/x86/interface/pcbios/int13con.c b/src/arch/x86/interface/pcbios/int13con.c index 7372540b6..b073ca0e7 100644 --- a/src/arch/x86/interface/pcbios/int13con.c +++ b/src/arch/x86/interface/pcbios/int13con.c @@ -38,7 +38,13 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); * */ -/* Set default console usage if applicable */ +/* Set default console usage if applicable + * + * We accept either CONSOLE_DISKLOG or CONSOLE_INT13. + */ +#if ( defined ( CONSOLE_DISKLOG ) && ! defined ( CONSOLE_INT13 ) ) +#define CONSOLE_INT13 CONSOLE_DISKLOG +#endif #if ! ( defined ( CONSOLE_INT13 ) && CONSOLE_EXPLICIT ( CONSOLE_INT13 ) ) #undef CONSOLE_INT13 #define CONSOLE_INT13 ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_LOG ) diff --git a/src/arch/x86/prefix/usbdisk.S b/src/arch/x86/prefix/usbdisk.S index 11ab6a46a..ab4a011a3 100644 --- a/src/arch/x86/prefix/usbdisk.S +++ b/src/arch/x86/prefix/usbdisk.S @@ -15,6 +15,11 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ) #define SECTORS 32 #define CYLADDR(cyl) ((((cyl) * HEADS + (((cyl) == 0) & 1)) * SECTORS) * 512) +/* Accept CONSOLE_DISKLOG as a synonym for CONSOLE_INT13 */ +#if ( defined ( CONSOLE_DISKLOG ) && ! defined ( CONSOLE_INT13 ) ) +#define CONSOLE_INT13 CONSOLE_DISKLOG +#endif + #ifdef CONSOLE_INT13 #define LOGPART 1 #define LOGSTART 0 diff --git a/src/config/cloud/console.h b/src/config/cloud/console.h index 83318dd30..62ebc4af0 100644 --- a/src/config/cloud/console.h +++ b/src/config/cloud/console.h @@ -33,4 +33,4 @@ * the same cloud, allowing the log to be retrieved from the log * partition. */ -#define CONSOLE_INT13 +#define CONSOLE_DISKLOG diff --git a/src/config/config_pcbios.c b/src/config/config_pcbios.c index c8a7e708b..0f2e2bec6 100644 --- a/src/config/config_pcbios.c +++ b/src/config/config_pcbios.c @@ -49,6 +49,9 @@ REQUIRE_OBJECT ( vesafb ); #ifdef CONSOLE_INT13 REQUIRE_OBJECT ( int13con ); #endif +#ifdef CONSOLE_DISKLOG +REQUIRE_OBJECT ( int13con ); +#endif /* * Drag in all requested image types diff --git a/src/config/console.h b/src/config/console.h index 8132e8644..9ba1bb6d7 100644 --- a/src/config/console.h +++ b/src/config/console.h @@ -25,6 +25,7 @@ FILE_SECBOOT ( PERMITTED ); #define CONSOLE_FRAMEBUFFER /* Graphical framebuffer console */ #define CONSOLE_SYSLOG /* Syslog console */ #define CONSOLE_SYSLOGS /* Encrypted syslog console */ +//#define CONSOLE_DISKLOG /* Disk log console */ /* Console types supported only on systems with serial ports */ #if ! defined ( SERIAL_NULL ) @@ -33,7 +34,6 @@ FILE_SECBOOT ( PERMITTED ); /* Console types supported only on BIOS platforms */ #if defined ( PLATFORM_pcbios ) - //#define CONSOLE_INT13 /* INT13 disk log console */ #define CONSOLE_PCBIOS /* Default BIOS console */ #endif