trs80m1: preserve A from the boot loader to use as mapper info
authorAlan Cox <alan@linux.intel.com>
Thu, 5 Jul 2018 11:58:27 +0000 (12:58 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 5 Jul 2018 11:58:27 +0000 (12:58 +0100)
We need different boot blocks for different mappers so make them pass in a
mapper code.

Our current boot blocks all enter with A = 0 s this is compatible.

Kernel/platform-trs80m1/crt0.s

index 2e7f84c..19b4a38 100644 (file)
 
 ;
 ;      Once the loader completes it jumps here
+;      A holds the type of mapper the boot block was for
+;
+;      0: Supermem
+;      1: Selector
 ;
 start:
+               ; Take care to preserve A until init_early
                ld sp, #kstack_top
                ; then zero the data area
                ld hl, #s__DATA
@@ -68,6 +73,7 @@ start:
                or a
                sbc hl,de
                ld (_discard_size),hl
+               ; We pass A into init_eatly holding the mapper type
                call init_early
                call init_hardware
                push af