From 7a24b6ef4b670d0722b9136e44792bdd91add270 Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Sat, 26 Feb 2022 11:48:45 -0500 Subject: [PATCH] KA10: Fix so KS10 ITS will build. --- PDP10/kx10_cpu.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/PDP10/kx10_cpu.c b/PDP10/kx10_cpu.c index f48f8ce6..59de12e4 100644 --- a/PDP10/kx10_cpu.c +++ b/PDP10/kx10_cpu.c @@ -2072,12 +2072,18 @@ int page_lookup(t_addr addr, int flag, t_addr *loc, int wr, int cur_context, int } } +#if KS_ITS + if (!QITS) { /* Do not do this on ITS */ +#endif /* Handle KI paging odditiy */ if (!uf && !t20_page && (page & 0740) == 0340) { /* Pages 340-377 via UBT */ page += 01000 - 0340; upmp = 1; } +#if KS_ITS + } +#endif /* Map the page */ if (uf || upmp) @@ -2160,8 +2166,7 @@ int page_lookup(t_addr addr, int flag, t_addr *loc, int wr, int cur_context, int if ((data & KL_PAG_A) != 0) { if ((data & KL_PAG_S) != 0) { fault_data |= 004000LL << 18; /* PF2.9 */ - } - if ((data & KL_PAG_W) != 0) { + } else if ((data & KL_PAG_W) == 0) { fault_data |= 002000LL << 18; /* PF2.8 */ } } @@ -2595,12 +2600,18 @@ int page_lookup(t_addr addr, int flag, t_addr *loc, int wr, int cur_context, int return 0; } +#if KL_ITS + if (!QITS) { /* Do not do this on ITS */ +#endif /* Handle KI paging odditiy */ if (!uf && !t20_page && (page & 0740) == 0340) { /* Pages 340-377 via UBT */ page += 01000 - 0340; upmp = 1; } +#if KL_ITS + } +#endif /* Map the page */ if (uf || upmp)