diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 2011-02-09 19:08:21 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2011-02-09 19:08:21 +0000 |
commit | 278e79707e0b2f22fb52df40feb45bf11a44ef0f (patch) | |
tree | ae4ccf0b7e14c5a6378ac4d32ca1346e2686517b /sys/sys/linker.h | |
parent | 02e5228ca05d789e36dbe62a0fbc123d897ce493 (diff) | |
download | src-278e79707e0b2f22fb52df40feb45bf11a44ef0f.tar.gz src-278e79707e0b2f22fb52df40feb45bf11a44ef0f.zip |
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
Notes
Notes:
svn path=/head/; revision=218494
Diffstat (limited to 'sys/sys/linker.h')
-rw-r--r-- | sys/sys/linker.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/linker.h b/sys/sys/linker.h index aa705fd7032f..8ea140f7788b 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); |