diff options
author | marcel <marcel@FreeBSD.org> | 2008-02-23 17:58:12 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2008-02-23 17:58:12 +0000 |
commit | 30c7c35b1480887e4a07caea2b7f618c203a97ea (patch) | |
tree | a08a960f742eaa7bc8b7c18a6054373fc0214188 | |
parent | 8b1e9609cad9bdf4aeb8812f3935dc2bee900270 (diff) | |
download | FreeBSD-src-30c7c35b1480887e4a07caea2b7f618c203a97ea.zip FreeBSD-src-30c7c35b1480887e4a07caea2b7f618c203a97ea.tar.gz |
o Include glue.h
o Support multiple memory regions.
-rw-r--r-- | sys/boot/uboot/common/main.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sys/boot/uboot/common/main.c b/sys/boot/uboot/common/main.c index 2c793e7..762c6ce 100644 --- a/sys/boot/uboot/common/main.c +++ b/sys/boot/uboot/common/main.c @@ -30,10 +30,11 @@ __FBSDID("$FreeBSD$"); #include <stand.h> -#include "bootstrap.h" -#include "libuboot.h" #include "api_public.h" +#include "bootstrap.h" +#include "glue.h" +#include "libuboot.h" struct uboot_devdesc currdev; struct arch_switch archsw; /* MI/MD interface boundary */ @@ -54,11 +55,6 @@ extern unsigned char __sbss_start[]; extern unsigned char __sbss_end[]; extern unsigned char _end[]; -extern void * syscall_ptr; - -struct sys_info * ub_get_sys_info(void); - - void dump_si(struct sys_info *si) { #ifdef DEBUG @@ -96,17 +92,19 @@ dump_addr_info(void) static uint64_t memsize(int flags) { - int i; - struct sys_info * si; + int i; + struct sys_info *si; + uint64_t size; if ((si = ub_get_sys_info()) == NULL) return 0; - + + size = 0; for (i = 0; i < si->mr_no; i++) if (si->mr[i].flags == flags && si->mr[i].size) - return (si->mr[i].size); + size += (si->mr[i].size); - return 0; + return (size); } int |