Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/oea get bootpath from OF if we don't get it...



details:   https://anonhg.NetBSD.org/src/rev/418e8142449b
branches:  trunk
changeset: 830282:418e8142449b
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sat Mar 03 22:50:17 2018 +0000

description:
get bootpath from OF if we don't get it as an argument

diffstat:

 sys/arch/powerpc/oea/ofwoea_machdep.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 056d31715b74 -r 418e8142449b sys/arch/powerpc/oea/ofwoea_machdep.c
--- a/sys/arch/powerpc/oea/ofwoea_machdep.c     Sat Mar 03 22:46:30 2018 +0000
+++ b/sys/arch/powerpc/oea/ofwoea_machdep.c     Sat Mar 03 22:50:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.43 2018/03/02 14:37:18 macallan Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.44 2018/03/03 22:50:17 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.43 2018/03/02 14:37:18 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.44 2018/03/03 22:50:17 macallan Exp $");
 
 #include "opt_ppcarch.h"
 #include "opt_compat_netbsd.h"
@@ -230,6 +230,13 @@
                        while (*args)
                                BOOT_FLAG(*args++, boothowto);
                }
+       } else {
+               int chs = OF_finddevice("/chosen");
+               int len;
+
+               len = OF_getprop(chs, "bootpath", bootpath, sizeof(bootpath) - 1);
+               if (len > -1)
+                       bootpath[len] = 0;
        }
 
        uvm_md_init();



Home | Main Index | Thread Index | Old Index