summaryrefslogtreecommitdiffstats
path: root/sys/sys/linker.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2011-02-09 19:08:21 +0000
committermarcel <marcel@FreeBSD.org>2011-02-09 19:08:21 +0000
commit45f0eb1542f0365247307c6d913752be53a2beac (patch)
treeae4ccf0b7e14c5a6378ac4d32ca1346e2686517b /sys/sys/linker.h
parent6f316af6e26c8a2111b42d2713f4c8cc34809086 (diff)
downloadFreeBSD-src-45f0eb1542f0365247307c6d913752be53a2beac.zip
FreeBSD-src-45f0eb1542f0365247307c6d913752be53a2beac.tar.gz
Provide convenience function for obtaining MODINFO_ADDR and MODINFO_SIZE
attributes for preloaded modules/images. In particular, MODINFO_ADDR has the added complexity of not always being relocated properly. Rather than kluging this in the various components that are affected, we handle it in a centralized place (preload_fetch_addr()). To that end, expose a new variable, preload_addr_relocate, that MD initialization code can set and that turns the address attribute into a valid kernel VA. Architectures that need the relocation: arm & powerpc (at least). Components that can utilize this: acpi(4), md(4), fb(4), pci(4), ZFS, geli. Sponsored by: Juniper Networks
Diffstat (limited to 'sys/sys/linker.h')
-rw-r--r--sys/sys/linker.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/linker.h b/sys/sys/linker.h
index aa705fd..8ea140f 100644
--- a/sys/sys/linker.h
+++ b/sys/sys/linker.h
@@ -234,7 +234,11 @@ void *linker_hwpmc_list_objects(void);
/*
* Module lookup
*/
+extern vm_offset_t preload_addr_relocate;
extern caddr_t preload_metadata;
+
+extern void * preload_fetch_addr(caddr_t _mod);
+extern size_t preload_fetch_size(caddr_t _mod);
extern caddr_t preload_search_by_name(const char *_name);
extern caddr_t preload_search_by_type(const char *_type);
extern caddr_t preload_search_next_name(caddr_t _base);
OpenPOWER on IntegriCloud