diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 2008-02-23 17:58:12 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2008-02-23 17:58:12 +0000 |
commit | b8c02f17ead66577fef02bb26b188852a267d478 (patch) | |
tree | a08a960f742eaa7bc8b7c18a6054373fc0214188 /sys/boot | |
parent | 9dbb1b6e7de0c1c2732b268d8ea9017c4f06882f (diff) | |
download | src-b8c02f17ead66577fef02bb26b188852a267d478.tar.gz src-b8c02f17ead66577fef02bb26b188852a267d478.zip |
o Include glue.h
o Support multiple memory regions.
Notes
Notes:
svn path=/head/; revision=176482
Diffstat (limited to 'sys/boot')
-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 2c793e7d29f4..762c6ce67a89 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 |