From c9e752218b66c4662169ab51a8169f09b8e321c7 Mon Sep 17 00:00:00 2001 From: Romain Dolbeau Date: Thu, 6 Oct 2022 23:31:45 +0200 Subject: [PATCH] remove primary/secondary asm stubs --- .../DeclROM/NuBusFPGAPrimaryInit.s | 9 +-------- .../DeclROM/NuBusFPGAPrimaryInit_Primary.c | 1 + .../DeclROM/NuBusFPGASecondaryInit.s | 12 +----------- .../DeclROM/NuBusFPGASecondaryInit_Secondary.c | 1 + 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/nubus-to-ztex-gateware/DeclROM/NuBusFPGAPrimaryInit.s b/nubus-to-ztex-gateware/DeclROM/NuBusFPGAPrimaryInit.s index 7ab8a48..42f3628 100644 --- a/nubus-to-ztex-gateware/DeclROM/NuBusFPGAPrimaryInit.s +++ b/nubus-to-ztex-gateware/DeclROM/NuBusFPGAPrimaryInit.s @@ -2,11 +2,4 @@ .byte sExec2 /* Code revision (Primary init) */ .byte sCPU68020 /* CPU type is 68020 */ .short 0 /* Reserved */ - .long BeginPrimary-. /* Offset to code. */ - -BeginPrimary: - MOVE.L %A0, -(%A7) - BSR Primary - MOVE.L (%A7)+, %a0 - rts - + .long Primary-. /* Offset to code. */ diff --git a/nubus-to-ztex-gateware/DeclROM/NuBusFPGAPrimaryInit_Primary.c b/nubus-to-ztex-gateware/DeclROM/NuBusFPGAPrimaryInit_Primary.c index 1a6ca62..67d664a 100644 --- a/nubus-to-ztex-gateware/DeclROM/NuBusFPGAPrimaryInit_Primary.c +++ b/nubus-to-ztex-gateware/DeclROM/NuBusFPGAPrimaryInit_Primary.c @@ -8,6 +8,7 @@ #define PRIM_READREG(reg) \ (*((volatile UInt32*)(a32+GOBOFB_BASE+reg))) +#pragma parameter __D0 Primary(__A0) UInt32 Primary(SEBlock* seblock) { UInt32 a32 = 0xF0000000 | ((UInt32)seblock->seSlot << 24); UInt32 a32_l0, a32_l1; diff --git a/nubus-to-ztex-gateware/DeclROM/NuBusFPGASecondaryInit.s b/nubus-to-ztex-gateware/DeclROM/NuBusFPGASecondaryInit.s index dc9efa4..6199cbc 100644 --- a/nubus-to-ztex-gateware/DeclROM/NuBusFPGASecondaryInit.s +++ b/nubus-to-ztex-gateware/DeclROM/NuBusFPGASecondaryInit.s @@ -2,14 +2,4 @@ .byte sExec2 /* Code revision (Primary init) */ .byte sCPU68020 /* CPU type is 68020 */ .short 0 /* Reserved */ - .long BeginSecondary-. /* Offset to code. */ - -BeginSecondary: - MOVE.L %A0, -(%A7) - movea.l #0xfc90001c, %a0 - move.l #0xcccccccc, (%a0) - BSR Secondary - movea.l #0xfc90001c, %a0 - move.l #0xdddddddd, (%a0) - MOVE.L (%A7)+, %a0 - rts + .long Secondary-. /* Offset to code. */ diff --git a/nubus-to-ztex-gateware/DeclROM/NuBusFPGASecondaryInit_Secondary.c b/nubus-to-ztex-gateware/DeclROM/NuBusFPGASecondaryInit_Secondary.c index 1d7c77d..41ba425 100644 --- a/nubus-to-ztex-gateware/DeclROM/NuBusFPGASecondaryInit_Secondary.c +++ b/nubus-to-ztex-gateware/DeclROM/NuBusFPGASecondaryInit_Secondary.c @@ -5,6 +5,7 @@ #define SECO_WRITEREG(reg, val) \ *((volatile UInt32*)(a32+GOBOFB_BASE+reg)) = (UInt32)val; +#pragma parameter __D0 Primary(__A0) UInt32 Secondary(SEBlock* seblock) { UInt32 a32 = 0xF0000000 | ((UInt32)seblock->seSlot << 24); UInt32 a32_l0, a32_l1;