Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145027518
D10682.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D10682.diff
View Options
Index: sys/arm/amlogic/aml8726/aml8726_machdep.c
===================================================================
--- sys/arm/amlogic/aml8726/aml8726_machdep.c
+++ sys/arm/amlogic/aml8726/aml8726_machdep.c
@@ -144,6 +144,11 @@
{
}
+void
+platform_cpu_init(void)
+{
+}
+
/*
* Construct static devmap entries to map out the core
* peripherals using 1mb section mappings.
Index: sys/arm/annapurna/alpine/alpine_machdep.c
===================================================================
--- sys/arm/annapurna/alpine/alpine_machdep.c
+++ sys/arm/annapurna/alpine/alpine_machdep.c
@@ -79,6 +79,11 @@
}
+void
+platform_cpu_init(void)
+{
+
+}
/*
* Construct devmap table with DT-derived config data.
*/
Index: sys/arm/arm/machdep.c
===================================================================
--- sys/arm/arm/machdep.c
+++ sys/arm/arm/machdep.c
@@ -765,6 +765,7 @@
cpuinfo_init();
set_cpufuncs();
+ platform_cpu_init();
/*
* Find the dtb passed in by the boot loader.
@@ -1035,6 +1036,7 @@
set_cpufuncs();
cpuinfo_init();
+ platform_cpu_init();
/*
* Find the dtb passed in by the boot loader.
Index: sys/arm/arm/mp_machdep.c
===================================================================
--- sys/arm/arm/mp_machdep.c
+++ sys/arm/arm/mp_machdep.c
@@ -53,6 +53,7 @@
#include <machine/smp.h>
#include <machine/pcb.h>
#include <machine/physmem.h>
+#include <machine/platform.h>
#include <machine/intr.h>
#include <machine/vmparam.h>
#ifdef VFP
@@ -156,6 +157,7 @@
#endif
uint32_t actlr_mask, actlr_set;
+ platform_cpu_init();
pmap_set_tex();
cpuinfo_get_actlr_modifier(&actlr_mask, &actlr_set);
reinit_mmu(pmap_kern_ttb, actlr_mask, actlr_set);
Index: sys/arm/arm/platform.c
===================================================================
--- sys/arm/arm/platform.c
+++ sys/arm/arm/platform.c
@@ -189,6 +189,13 @@
}
void
+platform_cpu_init(void)
+{
+
+ PLATFORM_CPU_INIT(plat_obj);
+}
+
+void
cpu_reset(void)
{
Index: sys/arm/arm/platform_if.m
===================================================================
--- sys/arm/arm/platform_if.m
+++ sys/arm/arm/platform_if.m
@@ -146,3 +146,10 @@
METHOD void cpu_reset {
platform_t _plat;
};
+
+/**
+ * @brief Called by initarm, init_secondary to apply platform configurations.
+ */
+METHOD void cpu_init {
+ platform_t _plat;
+};
Index: sys/arm/at91/at91_common.c
===================================================================
--- sys/arm/at91/at91_common.c
+++ sys/arm/at91/at91_common.c
@@ -119,3 +119,8 @@
platform_late_init(void)
{
}
+
+void
+platform_cpu_init(void)
+{
+}
Index: sys/arm/freescale/vybrid/vf_machdep.c
===================================================================
--- sys/arm/freescale/vybrid/vf_machdep.c
+++ sys/arm/freescale/vybrid/vf_machdep.c
@@ -67,6 +67,12 @@
}
+void
+platform_cpu_init(void)
+{
+
+}
+
int
platform_devmap_init(void)
{
Index: sys/arm/include/platform.h
===================================================================
--- sys/arm/include/platform.h
+++ sys/arm/include/platform.h
@@ -56,11 +56,16 @@
* the init routines that can use printf() and expect the output to appear on
* a standard console.
*
+ * - platform_cpu_init() is called before reinit_mmu(), cpu_setup(), etc.
+ * This routine is used to set up any platform-specific CPU/MMU quirks,
+ * errata or unusual configuration.
+ *
*/
void platform_probe_and_attach(void);
int platform_devmap_init(void);
vm_offset_t platform_lastaddr(void);
void platform_gpio_init(void);
void platform_late_init(void);
+void platform_cpu_init(void);
#endif /* _MACHINE_PLATFORM_H_ */
Index: sys/arm/lpc/lpc_machdep.c
===================================================================
--- sys/arm/lpc/lpc_machdep.c
+++ sys/arm/lpc/lpc_machdep.c
@@ -85,6 +85,11 @@
{
}
+void
+platform_cpu_init(void)
+{
+}
+
/*
* Add a single static device mapping.
* The values used were taken from the ranges property of the SoC node in the
Index: sys/arm/mv/mv_machdep.c
===================================================================
--- sys/arm/mv/mv_machdep.c
+++ sys/arm/mv/mv_machdep.c
@@ -240,6 +240,12 @@
}
void
+platform_cpu_init(void)
+{
+
+}
+
+void
platform_late_init(void)
{
/*
Index: sys/arm/ralink/rt1310_machdep.c
===================================================================
--- sys/arm/ralink/rt1310_machdep.c
+++ sys/arm/ralink/rt1310_machdep.c
@@ -96,6 +96,11 @@
bootverbose = 1;
}
+void
+platform_cpu_init(void)
+{
+}
+
/*
* Add a single static device mapping.
* The values used were taken from the ranges property of the SoC node in the
Index: sys/arm/samsung/exynos/exynos5_machdep.c
===================================================================
--- sys/arm/samsung/exynos/exynos5_machdep.c
+++ sys/arm/samsung/exynos/exynos5_machdep.c
@@ -67,6 +67,12 @@
}
+void
+platform_cpu_init(void)
+{
+
+}
+
int
platform_devmap_init(void)
{
Index: sys/arm/versatile/versatile_machdep.c
===================================================================
--- sys/arm/versatile/versatile_machdep.c
+++ sys/arm/versatile/versatile_machdep.c
@@ -77,6 +77,11 @@
{
}
+void
+platform_cpu_init(void)
+{
+}
+
#define FDT_DEVMAP_MAX (2) /* FIXME */
static struct devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, },
Index: sys/arm/xilinx/zy7_machdep.c
===================================================================
--- sys/arm/xilinx/zy7_machdep.c
+++ sys/arm/xilinx/zy7_machdep.c
@@ -75,6 +75,11 @@
{
}
+void
+platform_cpu_init(void)
+{
+}
+
/*
* Set up static device mappings. Not strictly necessary -- simplebus will
* dynamically establish mappings as needed -- but doing it this way gets us
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 16, 5:04 AM (20 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28767501
Default Alt Text
D10682.diff (5 KB)
Attached To
Mode
D10682: Introduce platform CPU init for ARM
Attached
Detach File
Event Timeline
Log In to Comment