From 3a943483c495b3ba82ebc76e5068ee1dd0d271c6 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 20 Apr 2015 23:09:14 +0100 Subject: [PATCH] z80pack: Fix the micropack build and the swap --- Kernel/dev/z80pack/devfd.c | 2 +- Kernel/platform-micropack/config.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Kernel/dev/z80pack/devfd.c b/Kernel/dev/z80pack/devfd.c index 05f59291..022d4b80 100644 --- a/Kernel/dev/z80pack/devfd.c +++ b/Kernel/dev/z80pack/devfd.c @@ -90,7 +90,7 @@ static int fd_transfer(bool is_read, uint8_t minor, uint8_t rawflag) } else if (rawflag == 2) { /* Swap device special */ dlen = swapcnt; dptr = (uint16_t)swapbase; - page = &swapproc->p_page; /* Acting on this task */ + page = &swappage; /* Acting on this page */ block = swapblk; block_xfer = dlen >> 7; /* We want this in 128 byte sectors */ map = 1; diff --git a/Kernel/platform-micropack/config.h b/Kernel/platform-micropack/config.h index db5e9153..41584d88 100644 --- a/Kernel/platform-micropack/config.h +++ b/Kernel/platform-micropack/config.h @@ -32,6 +32,7 @@ #define SWAPBASE 0x0000 /* We swap the lot in one, include the */ #define SWAPTOP 0x8000 /* vectors so its a round number of sectors */ #define MAX_SWAPS 64 /* The full drive would actually be 170! */ +#define swap_map(x) ((uint8_t *)(x)) /* Simple zero based mapping */ #define BOOT_TTY (512 + 1)/* Set this to default device for stdio, stderr */ /* In this case, the default is the first TTY device */ -- 2.34.1