summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2013-02-25 01:50:04 +0000
committerkientzle <kientzle@FreeBSD.org>2013-02-25 01:50:04 +0000
commit59678235a83f4d24f35261b9ce906fef4a724c98 (patch)
tree21fe73c825cd594d0ba00fc15c685aa84098b89b /sys/boot/common
parentb4ce52f66cd37c76a07d049fbc0d62864c8c54a2 (diff)
downloadFreeBSD-src-59678235a83f4d24f35261b9ce906fef4a724c98.zip
FreeBSD-src-59678235a83f4d24f35261b9ce906fef4a724c98.tar.gz
Fix the bug I introduced in r247045.
After digging through more carefully, it looks like there's no real need to have the DTB in the module directory. So we can simplify a lot: Just copy DTB into local heap for "fdt addr" and U-Boot integration, drop all the extra COPYIN() calls. I've left one final COPYIN() to update the in-kernel DTB for consistency with how this code used to work, but I'm no longer convinced it's appropriate here. I've also remove the mem_load_raw() utility that I added to boot/common/module.c with r247045 since it's no longer necessary.
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/bootstrap.h2
-rw-r--r--sys/boot/common/module.c36
2 files changed, 0 insertions, 38 deletions
diff --git a/sys/boot/common/bootstrap.h b/sys/boot/common/bootstrap.h
index 78b3895..516b8a5 100644
--- a/sys/boot/common/bootstrap.h
+++ b/sys/boot/common/bootstrap.h
@@ -237,8 +237,6 @@ void file_discard(struct preloaded_file *fp);
void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p);
int file_addmodule(struct preloaded_file *fp, char *modname, int version,
struct kernel_module **newmp);
-/* Load from a buffer in memory. */
-struct preloaded_file *mem_load_raw(char *type, char *name, const void *p, size_t len);
/* MI module loaders */
#ifdef __elfN
diff --git a/sys/boot/common/module.c b/sys/boot/common/module.c
index 3b74ab7..5808587 100644
--- a/sys/boot/common/module.c
+++ b/sys/boot/common/module.c
@@ -422,42 +422,6 @@ file_loadraw(char *type, char *name)
}
/*
- * Load a chunk of data as if it had been read from a file.
- */
-struct preloaded_file *
-mem_load_raw(char *type, char *name, const void *p, size_t len)
-{
- struct preloaded_file *fp;
-
- /* We can't load first */
- if ((file_findfile(NULL, NULL)) == NULL) {
- command_errmsg = "can't load file before kernel";
- return(NULL);
- }
-
- if (archsw.arch_loadaddr != NULL)
- loadaddr = archsw.arch_loadaddr(LOAD_RAW, name, loadaddr);
- archsw.arch_copyin(p, loadaddr, len);
-
- /* Looks OK so far; create & populate control structure */
- fp = file_alloc();
- fp->f_name = strdup(name);
- fp->f_type = strdup(type);
- fp->f_args = NULL;
- fp->f_metadata = NULL;
- fp->f_loader = -1;
- fp->f_addr = loadaddr;
- fp->f_size = len;
-
- /* recognise space consumption */
- loadaddr += len;
-
- /* Add to the list of loaded files */
- file_insert_tail(fp);
- return fp;
-}
-
-/*
* Load the module (name), pass it (argc),(argv), add container file
* to the list of loaded files.
* If module is already loaded just assign new argc/argv.
OpenPOWER on IntegriCloud