git: d716a23cabf4 - stable/13 - kboot: Move archsw init earlier
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Jan 2023 22:13:39 UTC
The branch stable/13 has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=d716a23cabf4b390eb70494d7c022ab189cfb4ef
commit d716a23cabf4b390eb70494d7c022ab189cfb4ef
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-12-03 19:48:11 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-01-24 21:49:41 +0000
kboot: Move archsw init earlier
Do archsw init first thing.
Sponsored by: Netflix
(cherry picked from commit a2fbc8859361c7bac7823c0a1978c78df11bc81d)
---
stand/kboot/main.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/stand/kboot/main.c b/stand/kboot/main.c
index 3b2c43c20a0f..7826e06c653f 100644
--- a/stand/kboot/main.c
+++ b/stand/kboot/main.c
@@ -83,6 +83,14 @@ main(int argc, const char **argv)
const size_t heapsize = 15*1024*1024;
const char *bootdev;
+ archsw.arch_getdev = kboot_getdev;
+ archsw.arch_copyin = kboot_copyin;
+ archsw.arch_copyout = kboot_copyout;
+ archsw.arch_readin = kboot_readin;
+ archsw.arch_autoload = kboot_autoload;
+ archsw.arch_loadaddr = kboot_loadaddr;
+ archsw.arch_kexec_kseg_get = kboot_kseg_get;
+
/* Give us a sane world if we're running as init */
do_init();
@@ -107,14 +115,6 @@ main(int argc, const char **argv)
printf("Boot device: %s with hostfs_root %s\n", bootdev, hostfs_root);
- archsw.arch_getdev = kboot_getdev;
- archsw.arch_copyin = kboot_copyin;
- archsw.arch_copyout = kboot_copyout;
- archsw.arch_readin = kboot_readin;
- archsw.arch_autoload = kboot_autoload;
- archsw.arch_loadaddr = kboot_loadaddr;
- archsw.arch_kexec_kseg_get = kboot_kseg_get;
-
printf("\n%s", bootprog_info);
setenv("currdev", bootdev, 1);