loader: use C to declare IRB struct

Even though we use it only in asm code, it is easier/cleaner to define it in
C.  This trivially takes care of sizing and alignment for us.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
3 files changed, 5 insertions(+), 18 deletions(-)

M loader/loader/loader.h
M loader/loader/loader_asm.s
M loader/loader/loader_c.c
M loader/loader/loader.h +1 -0
@@ 53,6 53,7 @@ extern void PGMHANDLER();
 extern void load_nucleus(void);
 
 extern struct orb ORB;
+extern struct irb irb;
 
 /*
  * EDF related structs & macros

          
M loader/loader/loader_asm.s +2 -18
@@ 60,7 60,7 @@ IOHANDLER:
 
 	L	%r1, 0xb8		# load subsystem ID
 
-	TSCH	IRB(%r4)
+	TSCH	irb(%r4)
 
 /*
 FIXME: we should do more checking!

          
@@ 71,7 71,7 @@ 13) If device end : I/O Completed.. Perf
 */
 
 	# unit check? (end of media?)
-	L	%r1,IRB+5(%r4)
+	L	%r1,irb+5(%r4)
 	LA	%r0,0x02
 	NR	%r0,%r1
 	LA	%r2,1			# return 1 - end of medium

          
@@ 186,19 186,3 @@ ADDRMASK:
 .globl MAGICVAL
 MAGICVAL:
 	.4byte 0x12345678
-
-.globl IRB
-IRB:
-	.8byte 0x00
-	.8byte 0x00
-	.8byte 0x00
-	.8byte 0x00
-	.8byte 0x00
-	.8byte 0x00
-	.8byte 0x00
-	.8byte 0x00
-	.8byte 0x00
-	.8byte 0x00
-	.8byte 0x00
-	.8byte 0x00
-

          
M loader/loader/loader_c.c +2 -0
@@ 35,6 35,8 @@ struct orb ORB = {
 	.addr		= 0xffffffff,
 };
 
+struct irb irb;
+
 static struct psw io_psw_template = {
 	.ea = 1,
 	.ba = 1,