From 8b173a97bd8612e5cb3f356bf5c06f4c8c6b9757 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 4 Feb 2019 18:54:26 +0000 Subject: [PATCH] tiny68k: Report correct RAM on tiny68k and on t68krc --- Kernel/platform-tiny68k/p68000.S | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Kernel/platform-tiny68k/p68000.S b/Kernel/platform-tiny68k/p68000.S index 3a08df17..f734a723 100644 --- a/Kernel/platform-tiny68k/p68000.S +++ b/Kernel/platform-tiny68k/p68000.S @@ -34,10 +34,25 @@ init_early: ; FIXME: could be in discard if we wanted ; init_hardware: + lea $30000,a0 ; will be wrapped on the rc2014 + lea $10000,a1 ; well above the kernel + move.w #$AA55,(a0) + cmp.w #$AA55,(a1) + bne tiny68k + move.w #$55AA,(a0) + cmp.w #$55AA,(a1) + bne tiny68k + move.w #2048,d0 + bra kernelmem +tiny68k: ; set system RAM size(hardcode hacks for now) move.w #16352,d0 +kernelmem: move.w d0,ramsize - sub.w #64,d0 ; Guess for kernel + move.l #_end+512,d1 + lsr.l #8,d1 + lsr.l #2,d1 + sub.w d1,d0 ; Guess for kernel move.w d0,procmem ; guesses for now bsr install_vectors -- 2.34.1