Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/rpi Count the memory regions in bootconfig.d...



details:   https://anonhg.NetBSD.org/src/rev/87667300d937
branches:  trunk
changeset: 782287:87667300d937
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Oct 26 10:03:13 2012 +0000

description:
Count the memory regions in bootconfig.dramblocks when using the VCPROP
information.

diffstat:

 sys/arch/evbarm/rpi/rpi_machdep.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r aea39741e680 -r 87667300d937 sys/arch/evbarm/rpi/rpi_machdep.c
--- a/sys/arch/evbarm/rpi/rpi_machdep.c Fri Oct 26 09:59:11 2012 +0000
+++ b/sys/arch/evbarm/rpi/rpi_machdep.c Fri Oct 26 10:03:13 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpi_machdep.c,v 1.15 2012/10/19 12:33:27 skrll Exp $   */
+/*     $NetBSD: rpi_machdep.c,v 1.16 2012/10/26 10:03:13 skrll Exp $   */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.15 2012/10/19 12:33:27 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.16 2012/10/26 10:03:13 skrll Exp $");
 
 #include "opt_evbarm_boardtype.h"
 
@@ -218,9 +218,12 @@
                size_t n = vcprop_tag_resplen(&vptp_mem->tag) /
                    sizeof(struct vcprop_memory);
 
+               bootconfig.dramblocks = 0;
+
                for (int i = 0; i < n && i < DRAM_BLOCKS; i++) {
                        bootconfig.dram[i].address = vptp_mem->mem[i].base;
                        bootconfig.dram[i].pages = atop(vptp_mem->mem[i].size);
+                       bootconfig.dramblocks++;
                }
        }
 



Home | Main Index | Thread Index | Old Index