Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171478588
D28619.id83770.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28619.id83770.diff
View Options
Index: sys/amd64/amd64/machdep.c
===================================================================
--- sys/amd64/amd64/machdep.c
+++ sys/amd64/amd64/machdep.c
@@ -1169,7 +1169,7 @@
}
}
-static char bootmethod[16] = "";
+char bootmethod[16] = "";
SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0,
"System firmware boot method");
Index: sys/i386/i386/machdep.c
===================================================================
--- sys/i386/i386/machdep.c
+++ sys/i386/i386/machdep.c
@@ -1237,7 +1237,7 @@
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";
+char bootmethod[16] = "BIOS";
SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0,
"System firmware boot method");
Index: sys/x86/xen/pv.c
===================================================================
--- sys/x86/xen/pv.c
+++ sys/x86/xen/pv.c
@@ -48,6 +48,7 @@
#include <sys/ctype.h>
#include <sys/mutex.h>
#include <sys/smp.h>
+#include <sys/efi.h>
#include <vm/vm.h>
#include <vm/vm_extern.h>
@@ -109,6 +110,8 @@
extern char *dbg_stack;
#endif
+extern char bootmethod[16];
+
/*
* Placed by the linker at the end of the bss section, which is the last
* section loaded by Xen before loading the symtab and strtab.
@@ -630,6 +633,11 @@
if (envp != NULL)
envp += off;
xen_pvh_set_env(envp, reject_option);
+
+ if (MD_FETCH(kmdp, MODINFOMD_EFI_MAP, void *) != NULL)
+ strlcpy(bootmethod, "UEFI", sizeof(bootmethod));
+ else
+ strlcpy(bootmethod, "BIOS", sizeof(bootmethod));
} else {
/* Parse the extra boot information given by Xen */
if (start_info->cmdline_paddr != 0)
@@ -637,6 +645,7 @@
(char *)(start_info->cmdline_paddr + KERNBASE),
",");
kmdp = NULL;
+ strlcpy(bootmethod, "XEN", sizeof(bootmethod));
}
boothowto |= boot_env_to_howto();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 12, 8:45 AM (14 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38780433
Default Alt Text
D28619.id83770.diff (1 KB)
Attached To
Mode
D28619: xen/boot: allow specifying boot method when booted from Xen
Attached
Detach File
Event Timeline
Log In to Comment