From 4c7785afaf847f9102781410a8670afdfed13562 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 29 Aug 2014 21:08:40 +0000 Subject: [PATCH] MFamd64: Add a machdep.bootmethod sysctl to inform the installer which firmware method was used for booting. This is hardcoded to BIOS on i386. PR: 192962 Reviewed by: nwhitehorn MFC after: 1 week --- sys/i386/i386/machdep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index ac41c2796237..243eab3a8043 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1639,6 +1639,10 @@ u_long bootdev; /* not a struct cdev *- encoding is different */ SYSCTL_ULONG(_machdep, OID_AUTO, guessed_bootdev, CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in struct cdev *format)"); +static char bootmethod[16] = "BIOS"; +SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0, + "System firmware boot method"); + /* * Initialize 386 and configure to run kernel */