From 950fc82e387741dba9fa74a3035af6d7a26d4db1 Mon Sep 17 00:00:00 2001 From: Bob Supnik Date: Mon, 13 Mar 2017 17:41:09 -0700 Subject: [PATCH] VAX780, VAX8600: Fixed bad test for UBA intr level (COVERITY) IPL_UBA already has the subtract built in: So it shouldn't be extracted again. The whole routine looks a little strange, but the way it works is that an interrupt from the UBA itself sets in the returned vector. Because the vector is read by code and not used by hardware, the flag bit is "harmless." UBA interrupts occur only under strange circumstances, like bad map pages and device NXMs. Under the simulator, with a debugged OS, they never happen. --- VAX/vax780_uba.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/VAX/vax780_uba.c b/VAX/vax780_uba.c index 7d032fe1..83f61dbc 100644 --- a/VAX/vax780_uba.c +++ b/VAX/vax780_uba.c @@ -1,6 +1,6 @@ /* vax780_uba.c: VAX 11/780 Unibus adapter - Copyright (c) 2004-2012, Robert M Supnik + Copyright (c) 2004-2017, Robert M Supnik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -25,6 +25,7 @@ uba DW780 Unibus adapter + 13-Mar-17 RMS Fixed bad test for UBA intr level (COVERITY) 25-Mar-12 RMS Added parameter to int_ack prototype (Mark Pizzolata) 19-Nov-08 RMS Moved I/O support routines to I/O library 28-May-08 RMS Inlined physical memory routines @@ -582,7 +583,7 @@ int32 uba_get_ubvector (int32 lvl) int32 i, vec; vec = 0; -if ((lvl == (IPL_UBA - IPL_HMIN)) && uba_int) { /* UBA lvl, int? */ +if ((lvl == IPL_UBA) && uba_int) { /* UBA lvl, int? */ vec = UBA_UVEC; /* set flag */ uba_int = 0; /* clear int */ }