Added skeleton bootstrap code.
authorDavid Given <dg@cowlark.com>
Sun, 19 May 2013 22:33:29 +0000 (23:33 +0100)
committerDavid Given <dg@cowlark.com>
Sun, 19 May 2013 22:33:29 +0000 (23:33 +0100)
--HG--
branch : dtrg-videocore
rename : plat/pc86/boot.s => plat/rpi/boot.s

plat/rpi/boot.s [new file with mode: 0644]
plat/rpi/build.mk
plat/rpi/descr

diff --git a/plat/rpi/boot.s b/plat/rpi/boot.s
new file mode 100644 (file)
index 0000000..3cf4f3f
--- /dev/null
@@ -0,0 +1,49 @@
+#
+/*
+ * Raspberry Pi support library for the ACK
+ * © 2013 David Given
+ * This file is redistributable under the terms of the 3-clause BSD license.
+ * See the file 'Copying' in the root of the distribution for the full text.
+ */
+
+! Declare segments (the order is important).
+
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+
+.sect .text
+
+begtext:
+#if 0
+       ! Wipe the bss. (I'm a little suprised that __m_a_i_n doesn't do this.)
+       
+       mov di, begbss
+       mov cx, endbss
+       sub cx, di
+       mov ax, 0
+       rep stosb
+       
+       ! Push standard parameters onto the stack and go.
+       
+       push envp               ! envp
+       push argv               ! argv
+       push 1                  ! argc
+#endif
+       b __m_a_i_n
+
+! Define symbols at the beginning of our various segments, so that we can find
+! them. (Except .text, which has already been done.)
+
+.define begtext, begdata, begbss
+.sect .data;       begdata:
+.sect .rom;        begrom:
+.sect .bss;        begbss:
+
+! Some magic data. All EM systems need these.
+
+.define .trppc, .ignmask, _errno
+.comm .trppc, 4
+.comm .ignmask, 4
+.comm _errno, 4
index 20aed87..679be61 100644 (file)
@@ -43,5 +43,5 @@ define build-rpi-boot-impl
        $(call installto, $(PLATIND)/$(PLATFORM)/boot.o)
 endef
 
-#(eval $(build-rpi-boot-impl))
+$(eval $(build-rpi-boot-impl))
 
index 41dfc40..fd9cc4d 100644 (file)
@@ -2,8 +2,8 @@
 # $State$
 # $Revision$
 
-var w=2
-var p=2
+var w=4
+var p=4
 var s=2
 var l=4
 var f=4
@@ -12,7 +12,7 @@ var ARCH=vc4
 var PLATFORM=rpi
 var PLATFORMDIR={EM}/share/ack/{PLATFORM}
 var CPP_F=-D__unix
-var ALIGN=-a0:1 -a1:1 -a2:1 -a3:1
+var ALIGN=-a0:2 -a1:4 -a2:4 -a3:4
 var MACHOPT_F=-m8
 
 # Override the setting in fe so that files compiled for this platform can see