# HG changeset patch # User Josef 'Jeff' Sipek # Date 1565111375 14400 # Tue Aug 06 13:09:35 2019 -0400 # Node ID f83f27397a01cd884b90f5120c670f76d13f86ef # Parent 991adc3ab4b41113158737e344a8304521c89d53 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 diff --git a/loader/loader/loader.h b/loader/loader/loader.h --- a/loader/loader/loader.h +++ b/loader/loader/loader.h @@ -53,6 +53,7 @@ extern void load_nucleus(void); extern struct orb ORB; +extern struct irb irb; /* * EDF related structs & macros diff --git a/loader/loader/loader_asm.s b/loader/loader/loader_asm.s --- a/loader/loader/loader_asm.s +++ b/loader/loader/loader_asm.s @@ -60,7 +60,7 @@ L %r1, 0xb8 # load subsystem ID - TSCH IRB(%r4) + TSCH irb(%r4) /* FIXME: we should do more checking! @@ -71,7 +71,7 @@ */ # 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 @@ .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 - diff --git a/loader/loader/loader_c.c b/loader/loader/loader_c.c --- a/loader/loader/loader_c.c +++ b/loader/loader/loader_c.c @@ -35,6 +35,8 @@ .addr = 0xffffffff, }; +struct irb irb; + static struct psw io_psw_template = { .ea = 1, .ba = 1,