From: Alan Cox Date: Mon, 20 Aug 2018 23:02:16 +0000 (+0100) Subject: bank32k: Handle high/low stubs X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=265ec1b9d708b64e6fd7428877a6c411c06c800f;p=FUZIX.git bank32k: Handle high/low stubs In 32K/32K mode we have stubs high and low so program_vectors is needed if we shrink space too --- diff --git a/Kernel/bank32k.c b/Kernel/bank32k.c index a4fca37b..17ec0995 100644 --- a/Kernel/bank32k.c +++ b/Kernel/bank32k.c @@ -129,9 +129,13 @@ int pagemap_realloc(usize_t code, usize_t size, usize_t stack) { if (want == have) return 0; if (have > want) { + /* Make a copy of the high vectors in the new low page */ pfree[pfptr++] = ptr[1]; ptr[1] = *ptr; + irq = __hard_di(); + program_vectors(&udata.u_page); udata.u_ptab->p_page = udata.u_page; + __hard_irqrestore(irq); return 0; } /* If we are adding then just insert the new pages, keeping the common