Index: sys/arm/allwinner/aw_machdep.c =================================================================== --- sys/arm/allwinner/aw_machdep.c +++ sys/arm/allwinner/aw_machdep.c @@ -61,7 +61,6 @@ static platform_attach_t a31s_attach; static platform_attach_t a83t_attach; static platform_attach_t h3_attach; -static platform_lastaddr_t allwinner_lastaddr; static platform_devmap_init_t allwinner_devmap_init; static platform_cpu_reset_t allwinner_cpu_reset; @@ -129,13 +128,6 @@ return (0); } -static vm_offset_t -allwinner_lastaddr(platform_t plat) -{ - - return (devmap_lastaddr()); -} - /* * Set up static device mappings. * @@ -166,7 +158,6 @@ #if defined(SOC_ALLWINNER_A10) static platform_method_t a10_methods[] = { PLATFORMMETHOD(platform_attach, a10_attach), - PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), @@ -178,7 +169,6 @@ #if defined(SOC_ALLWINNER_A13) static platform_method_t a13_methods[] = { PLATFORMMETHOD(platform_attach, a13_attach), - PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), @@ -190,7 +180,6 @@ #if defined(SOC_ALLWINNER_A20) static platform_method_t a20_methods[] = { PLATFORMMETHOD(platform_attach, a20_attach), - PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), @@ -206,7 +195,6 @@ #if defined(SOC_ALLWINNER_A31) static platform_method_t a31_methods[] = { PLATFORMMETHOD(platform_attach, a31_attach), - PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), @@ -222,7 +210,6 @@ #if defined(SOC_ALLWINNER_A31S) static platform_method_t a31s_methods[] = { PLATFORMMETHOD(platform_attach, a31s_attach), - PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), @@ -238,7 +225,6 @@ #if defined(SOC_ALLWINNER_A83T) static platform_method_t a83t_methods[] = { PLATFORMMETHOD(platform_attach, a83t_attach), - PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), @@ -254,7 +240,6 @@ #if defined(SOC_ALLWINNER_H3) static platform_method_t h3_methods[] = { PLATFORMMETHOD(platform_attach, h3_attach), - PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), Index: sys/arm/arm/platform_if.m =================================================================== --- sys/arm/arm/platform_if.m +++ sys/arm/arm/platform_if.m @@ -27,9 +27,10 @@ # #include +#include +#include #include #include -#include #include #include @@ -58,6 +59,11 @@ return; } + static vm_offset_t platform_default_lastaddr(platform_t plat) + { + return (devmap_lastaddr()); + } + static void platform_default_mp_setmaxid(platform_t plat) { mp_ncpus = 1; @@ -100,7 +106,7 @@ */ METHOD vm_offset_t lastaddr { platform_t _plat; -}; +} DEFAULT platform_default_lastaddr; /** * @brief Called after the static device mappings are established and just Index: sys/arm/broadcom/bcm2835/bcm2835_machdep.c =================================================================== --- sys/arm/broadcom/bcm2835/bcm2835_machdep.c +++ sys/arm/broadcom/bcm2835/bcm2835_machdep.c @@ -68,17 +68,9 @@ #ifdef SOC_BCM2836 static platform_devmap_init_t bcm2836_devmap_init; #endif -static platform_lastaddr_t bcm2835_lastaddr; static platform_late_init_t bcm2835_late_init; static platform_cpu_reset_t bcm2835_cpu_reset; -static vm_offset_t -bcm2835_lastaddr(platform_t plat) -{ - - return (devmap_lastaddr()); -} - static void bcm2835_late_init(platform_t plat) { @@ -136,7 +128,6 @@ #ifdef SOC_BCM2835 static platform_method_t bcm2835_methods[] = { PLATFORMMETHOD(platform_devmap_init, bcm2835_devmap_init), - PLATFORMMETHOD(platform_lastaddr, bcm2835_lastaddr), PLATFORMMETHOD(platform_late_init, bcm2835_late_init), PLATFORMMETHOD(platform_cpu_reset, bcm2835_cpu_reset), @@ -148,7 +139,6 @@ #ifdef SOC_BCM2836 static platform_method_t bcm2836_methods[] = { PLATFORMMETHOD(platform_devmap_init, bcm2836_devmap_init), - PLATFORMMETHOD(platform_lastaddr, bcm2835_lastaddr), PLATFORMMETHOD(platform_late_init, bcm2835_late_init), PLATFORMMETHOD(platform_cpu_reset, bcm2835_cpu_reset), Index: sys/arm/freescale/imx/imx51_machdep.c =================================================================== --- sys/arm/freescale/imx/imx51_machdep.c +++ sys/arm/freescale/imx/imx51_machdep.c @@ -47,16 +47,8 @@ static platform_attach_t imx51_attach; static platform_devmap_init_t imx51_devmap_init; -static platform_lastaddr_t imx51_lastaddr; static platform_cpu_reset_t imx51_cpu_reset; -static vm_offset_t -imx51_lastaddr(platform_t plat) -{ - - return (devmap_lastaddr()); -} - static int imx51_attach(platform_t plat) { @@ -102,7 +94,6 @@ static platform_method_t imx51_methods[] = { PLATFORMMETHOD(platform_attach, imx51_attach), PLATFORMMETHOD(platform_devmap_init, imx51_devmap_init), - PLATFORMMETHOD(platform_lastaddr, imx51_lastaddr), PLATFORMMETHOD(platform_cpu_reset, imx51_cpu_reset), PLATFORMMETHOD_END, Index: sys/arm/freescale/imx/imx53_machdep.c =================================================================== --- sys/arm/freescale/imx/imx53_machdep.c +++ sys/arm/freescale/imx/imx53_machdep.c @@ -47,16 +47,8 @@ static platform_attach_t imx53_attach; static platform_devmap_init_t imx53_devmap_init; -static platform_lastaddr_t imx53_lastaddr; static platform_cpu_reset_t imx53_cpu_reset; -static vm_offset_t -imx53_lastaddr(platform_t plat) -{ - - return (devmap_lastaddr()); -} - static int imx53_attach(platform_t plat) { @@ -102,7 +94,6 @@ static platform_method_t imx53_methods[] = { PLATFORMMETHOD(platform_attach, imx53_attach), PLATFORMMETHOD(platform_devmap_init, imx53_devmap_init), - PLATFORMMETHOD(platform_lastaddr, imx53_lastaddr), PLATFORMMETHOD(platform_cpu_reset, imx53_cpu_reset), PLATFORMMETHOD_END, Index: sys/arm/freescale/imx/imx6_machdep.c =================================================================== --- sys/arm/freescale/imx/imx6_machdep.c +++ sys/arm/freescale/imx/imx6_machdep.c @@ -56,7 +56,6 @@ static platform_attach_t imx6_attach; static platform_devmap_init_t imx6_devmap_init; -static platform_lastaddr_t imx6_lastaddr; static platform_late_init_t imx6_late_init; static platform_cpu_reset_t imx6_cpu_reset; @@ -164,13 +163,6 @@ OF_setprop(socnode, "interrupt-parent", &gicxref, sizeof(gicxref)); } -static vm_offset_t -imx6_lastaddr(platform_t plat) -{ - - return (devmap_lastaddr()); -} - static int imx6_attach(platform_t plat) { @@ -350,7 +342,6 @@ static platform_method_t imx6_methods[] = { PLATFORMMETHOD(platform_attach, imx6_attach), - PLATFORMMETHOD(platform_lastaddr, imx6_lastaddr), PLATFORMMETHOD(platform_devmap_init, imx6_devmap_init), PLATFORMMETHOD(platform_late_init, imx6_late_init), PLATFORMMETHOD(platform_cpu_reset, imx6_cpu_reset), Index: sys/arm/nvidia/tegra124/tegra124_machdep.c =================================================================== --- sys/arm/nvidia/tegra124/tegra124_machdep.c +++ sys/arm/nvidia/tegra124/tegra124_machdep.c @@ -66,13 +66,6 @@ static platform_late_init_t tegra124_late_init; static platform_cpu_reset_t tegra124_cpu_reset; -static vm_offset_t -tegra124_lastaddr(platform_t plat) -{ - - return (devmap_lastaddr()); -} - static int tegra124_attach(platform_t plat) { @@ -146,7 +139,6 @@ static platform_method_t tegra124_methods[] = { PLATFORMMETHOD(platform_attach, tegra124_attach), - PLATFORMMETHOD(platform_lastaddr, tegra124_lastaddr), PLATFORMMETHOD(platform_devmap_init, tegra124_devmap_init), PLATFORMMETHOD(platform_late_init, tegra124_late_init), PLATFORMMETHOD(platform_cpu_reset, tegra124_cpu_reset), Index: sys/arm/qemu/virt_machdep.c =================================================================== --- sys/arm/qemu/virt_machdep.c +++ sys/arm/qemu/virt_machdep.c @@ -44,13 +44,6 @@ #include "platform_if.h" -static vm_offset_t -virt_lastaddr(platform_t plat) -{ - - return (devmap_lastaddr()); -} - /* * Set up static device mappings. */ @@ -64,7 +57,6 @@ static platform_method_t virt_methods[] = { PLATFORMMETHOD(platform_devmap_init, virt_devmap_init), - PLATFORMMETHOD(platform_lastaddr, virt_lastaddr), #ifdef SMP PLATFORMMETHOD(platform_mp_start_ap, virt_mp_start_ap), @@ -86,7 +78,6 @@ static platform_method_t gem5_methods[] = { PLATFORMMETHOD(platform_devmap_init, gem5_devmap_init), - PLATFORMMETHOD(platform_lastaddr, virt_lastaddr), PLATFORMMETHOD_END, }; Index: sys/arm/rockchip/rk30xx_machdep.c =================================================================== --- sys/arm/rockchip/rk30xx_machdep.c +++ sys/arm/rockchip/rk30xx_machdep.c @@ -52,18 +52,10 @@ #include "platform_if.h" -static platform_lastaddr_t rk30xx_lastaddr; static platform_devmap_init_t rk30xx_devmap_init; static platform_late_init_t rk30xx_late_init; static platform_cpu_reset_t rk30xx_cpu_reset; -static vm_offset_t -rk30xx_lastaddr(platform_t plat) -{ - - return (devmap_lastaddr()); -} - static void rk30xx_late_init(platform_t plat) { @@ -97,7 +89,6 @@ #if defined(SOC_ROCKCHIP_RK3188) static platform_method_t rk30xx_methods[] = { - PLATFORMMETHOD(platform_lastaddr, rk30xx_lastaddr), PLATFORMMETHOD(platform_devmap_init, rk30xx_devmap_init), PLATFORMMETHOD(platform_late_init, rk30xx_late_init), PLATFORMMETHOD(platform_cpu_reset, rk30xx_cpu_reset), Index: sys/arm/ti/ti_machdep.c =================================================================== --- sys/arm/ti/ti_machdep.c +++ sys/arm/ti/ti_machdep.c @@ -66,7 +66,6 @@ static platform_attach_t ti_am335x_attach; static platform_devmap_init_t ti_am335x_devmap_init; #endif -static platform_lastaddr_t ti_lastaddr; static platform_cpu_reset_t ti_plat_cpu_reset; void (*ti_cpu_reset)(void) = NULL; @@ -91,13 +90,6 @@ } #endif -static vm_offset_t -ti_lastaddr(platform_t plat) -{ - - return (devmap_lastaddr()); -} - /* * Construct static devmap entries to map out the most frequently used * peripherals using 1mb section mappings. @@ -141,7 +133,6 @@ static platform_method_t omap4_methods[] = { PLATFORMMETHOD(platform_attach, omap4_attach), PLATFORMMETHOD(platform_devmap_init, ti_omap4_devmap_init), - PLATFORMMETHOD(platform_lastaddr, ti_lastaddr), PLATFORMMETHOD(platform_cpu_reset, ti_plat_cpu_reset), #ifdef SMP @@ -157,7 +148,6 @@ static platform_method_t am335x_methods[] = { PLATFORMMETHOD(platform_attach, ti_am335x_attach), PLATFORMMETHOD(platform_devmap_init, ti_am335x_devmap_init), - PLATFORMMETHOD(platform_lastaddr, ti_lastaddr), PLATFORMMETHOD(platform_cpu_reset, ti_plat_cpu_reset), PLATFORMMETHOD_END,