summaryrefslogtreecommitdiffstats
path: root/sys/arm/mv/mv_machdep.c
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2013-11-05 02:57:34 +0000
committerian <ian@FreeBSD.org>2013-11-05 02:57:34 +0000
commitb41cdbed2449cb7c863eb6c20c8081fc46e5415d (patch)
treec8199489e8d345aac66441bbe4373217ecb4dd06 /sys/arm/mv/mv_machdep.c
parent3209347d81ca5822f60cb7e47498afb8373e582a (diff)
downloadFreeBSD-src-b41cdbed2449cb7c863eb6c20c8081fc46e5415d.zip
FreeBSD-src-b41cdbed2449cb7c863eb6c20c8081fc46e5415d.tar.gz
Call initarm_lastaddr() later in the init sequence, after establishing
static device mappings, rather than as the first of the initializations that a platform can hook into. This allows a platform to allocate KVA from the top of the address space downwards for things like static device mapping, and return the final "last usable address" result after that and other early init work is done. Because some platforms were doing work in initarm_lastaddr() that needs to be done early, add a new initarm_early_init() routine and move the early init code to that routine on those platforms. Rename platform_devmap_init() to initarm_devmap_init() to match all the other init routines called from initarm() that are designed to be implemented by platform code. Add a comment block that explains when these routines are called and the type of work expected to be done in each of them.
Diffstat (limited to 'sys/arm/mv/mv_machdep.c')
-rw-r--r--sys/arm/mv/mv_machdep.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/arm/mv/mv_machdep.c b/sys/arm/mv/mv_machdep.c
index ace8dde..9758cfb 100644
--- a/sys/arm/mv/mv_machdep.c
+++ b/sys/arm/mv/mv_machdep.c
@@ -203,11 +203,15 @@ vm_offset_t
initarm_lastaddr(void)
{
+ return (fdt_immr_va);
+}
+
+void
+initarm_early_init(void)
+{
+
if (fdt_immr_addr(MV_BASE) != 0)
while (1);
-
- /* Platform-specific initialisation */
- return (fdt_immr_va);
}
void
@@ -316,7 +320,7 @@ __weak_reference(mv_default_fdt_pci_devmap, fdt_pci_devmap);
* Construct pmap_devmap[] with DT-derived config data.
*/
int
-platform_devmap_init(void)
+initarm_devmap_init(void)
{
phandle_t root, child;
pcell_t bank_count;
OpenPOWER on IntegriCloud