Pass the "good random" flag from the bootblocks to the kernel when applicable.
authormiod <miod@openbsd.org>
Wed, 10 Aug 2022 12:20:05 +0000 (12:20 +0000)
committermiod <miod@openbsd.org>
Wed, 10 Aug 2022 12:20:05 +0000 (12:20 +0000)
sys/arch/loongson/loongson/machdep.c
sys/arch/loongson/stand/boot/conf.c
sys/arch/loongson/stand/boot/exec.c

index 5361102..153b243 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: machdep.c,v 1.99 2021/07/24 08:21:13 visa Exp $ */
+/*     $OpenBSD: machdep.c,v 1.100 2022/08/10 12:20:05 miod Exp $ */
 
 /*
  * Copyright (c) 2009, 2010, 2014 Miodrag Vallat.
@@ -944,6 +944,9 @@ dobootopts(int argc)
                        case 's':
                                boothowto |= RB_SINGLE;
                                break;
+                       case 'g':
+                               boothowto |= RB_GOODRANDOM;
+                               break;
                        default:
                                pmon_printf("unrecognized option `%c'", *cp);
                                break;
index 7a3b39a..7f4fe9e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: conf.c,v 1.16 2020/12/09 18:10:19 krw Exp $   */
+/*     $OpenBSD: conf.c,v 1.17 2022/08/10 12:20:05 miod Exp $  */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -40,7 +40,7 @@
 #include <lib/libsa/ufs2.h>
 #include <lib/libsa/cd9660.h>
 
-const char version[] = "1.3";
+const char version[] = "1.4";
 #if 0  /* network code not compiled in */
 int    debug = 0;
 #endif
index c93a8e0..d68d4d0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: exec.c,v 1.4 2019/04/10 04:17:35 deraadt Exp $        */
+/*     $OpenBSD: exec.c,v 1.5 2022/08/10 12:20:05 miod Exp $   */
 
 /*
  * Copyright (c) 2010 Miodrag Vallat.
@@ -58,6 +58,8 @@ run_loadfile(uint64_t *marks, int howto)
                        *c++ = 'c';
                if (howto & RB_KDB)
                        *c++ = 'd';
+               if (howto & RB_GOODRANDOM)
+                       *c++ = 'g';
                if (howto & RB_SINGLE)
                        *c++ = 's';
                *c = '\0';