65c816: first sketch of needed code
authorAlan Cox <alan@linux.intel.com>
Wed, 20 Sep 2017 22:10:22 +0000 (23:10 +0100)
committerAlan Cox <alan@linux.intel.com>
Wed, 20 Sep 2017 22:10:22 +0000 (23:10 +0100)
commitb73a59840e9a86fbe9be45b9e36ec61edfc36d74
treeb648cd5b01f756b9c0e66f751e9e37316673add7
parentc1b601af3c16a3f59e4de55d7c479998f9e329ef
65c816: first sketch of needed code

Lots to fill in yet but this is the basic idea

- Load kernel somewhere
- Bank 0 gets the CPU stacks
- Each process gets a bank
- Kernel gets stuffed in bank 0 if it'll fit, somewhere else if not
- C code runs with cc65 so it's using an external C stack in its own bank
  which should mean we don't have to worry about funny stack accesses (and
  can fix any in the support lib)

Processes aren't allowed to do long operations, or to save/restore bank
registers. Only awkward one here is the block move ops. We probably need
a blockmove 'syscall' that puts in th banks and avoids a process moving
bank while mvn/mvp executes (as it's interruptible).

As there is only one configuration of banking we can hopefully put all the glue
in the shared file to make platform support easier.
Kernel/bank65c816.c [new file with mode: 0644]
Kernel/cpu-65c816/cpu.h [new file with mode: 0644]
Kernel/cpu-65c816/image.mk [new file with mode: 0644]
Kernel/cpu-65c816/rules.mk [new file with mode: 0644]
Kernel/kernel816.def [new file with mode: 0644]
Kernel/lowlevel-65c816.s [new file with mode: 0644]
Kernel/usermem_std-65c816.s [new file with mode: 0644]