pcw8256,fdc765: not the architectural question around banking and swap
authorAlan Cox <alan@etchedpixels.co.uk>
Mon, 3 Nov 2014 00:11:06 +0000 (00:11 +0000)
committerAlan Cox <alan@etchedpixels.co.uk>
Mon, 3 Nov 2014 00:11:06 +0000 (00:11 +0000)
commit8a5c53218da2834ce2fcdcb224b060d9ed1054e6
tree1bf148f16e8a4988525140d6db9b42eb8c8ed9dd
parent153cc9a5948c0aa4c60ed72608c091fd67130e97
pcw8256,fdc765: not the architectural question around banking and swap

Basically the problem is this:

On a 16K banked machine we have 0x0000-0xBFFF holding user code and we can
switch between processes low 48K with gay abandon. However the top 16K holds
process memory, common, *and* our stacks.

What probably needs to happen is that either we bounce such buffers (slow) or
teach the swap device driver in the platform to do bank flipping.

The problem with this last one is that
- it has to be done per platform
- some machines have brain damaged banking where a given address in a bank
  cannot be remapped to a different virtual address

Unfortunately it's not obvious how to create a generic solution that doesn't
punish sensibly designed machines.
Kernel/platform-pcw8256/fdc765.s