Date: Mon, 12 May 2014 21:31:21 +0100 From: Andrew Turner <andrew@fubar.geek.nz> To: freebsd-arm@freebsd.org Subject: Early boot code changes Message-ID: <20140512213121.6765ee5e@bender.Home>
next in thread | raw e-mail | index | archive | help
Hello, I'm planning on committing the patch at [1]. As it affects the early boot process I would like people to review it to make sure I'm not about to break all non-Raspberry Pi boards. The patch has two parts, the first is to create a new platform infrastructure based on the PowerPC platform code. The second is to change the name of functions on platforms that do not yet use this code to make sure they still boot. The platform infrastructure is designed to help get us a GENERIC armv6 kernel. It uses kobj to select on boot which platform class to use. The intention is at some stage in the future this will be merged with the PowerPC code. To help with this there is a base class and an FDT class that inherits from this base. I have ported the bcm2835 to it already. It can be used as an example for the other platforms. Updating the other platforms shouldn't be too difficult as, at this stage, the existing initarm_* functions have a one to one mapping to the new code. Below is a simple example on using this with FDT. static platform_method_t bcm2835_methods[] = { PLATFORMMETHOD(platform_lastaddr, bcm2835_lastaddr), PLATFORMMETHOD_END, }; FDT_PLATFORM_DEF(bcm2835, "bcm2835", 0, "raspberrypi,model-b"); As the platform_lastaddr functions is required it implements this, and creates the platform definition to use the bcm2835_methods with a bcm2835 platform, no softc, and will match an FDT with a compatible string of "raspberrypi,model-b". Alternatively the user could set hw.platform to "bcm2835" in loader to use this platform. As I've renamed the functions on the platforms I haven't ported to the new platform code I don' expect any problems with them. Andrew [1] http://people.freebsd.org/~andrew/arm_platform.diff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140512213121.6765ee5e>