165 Commits

Author SHA1 Message Date
gottfriedleibniz 496ebf3d67 Ongoing effort to resolve GitHub Issue #806:
1. Acquire use of the signaling and response facility prior to system_reset
Hackaround to #806: "ARCHLVL cpu reset leading to interrupt handling race"

2. refactor: thread safe utility functions
Updates a few utility functions designated/considred MT-Safe by POSIX or most modern implementations (e.g., glibc).
2026-03-24 13:46:35 -07:00
Fish (David B. Trout) 42778c1ff9 Fix internal "silent" commands to not be silent. 2025-02-24 17:15:00 -08:00
Fish (David B. Trout) 574e1a612c archlvl_cmd: use !are_all_cpus_stopped(), *NOT* are_any_cpus_started()
The difference is subtle, but important!
2022-04-02 12:31:17 -07:00
Fish (David B. Trout) 706d20b21d Remove long overdue obsolete/deprecated code in archlvl command:
The querying, enabling, disabling of facilities is controlled by the "FACILITY" command, *not* by the "ARCHLVL" command.
2022-03-31 13:41:11 -07:00
Bill Lewis 7ac8c16e06 Correct spelling in msgs (#329)
Correct spelling of "minimum" and "maximum" in HHC17006W messages, and the tests that look at those messages.
2020-11-11 18:52:48 -08:00
Fish (David B. Trout) 6cab259d0d Copyright 2019 2019-01-05 12:00:51 -08:00
Fish (David B. Trout) 04aa0a6c54 ALWAYS do initial reset when ARCHLVL set:
Minor(?) tweak to ARCHLVL command processing: ALWAYS do an initial_cpu_reset on ALL processors *regardless* of whether a new/different ARCHLVL is being set or not (i.e. even when the *same* ARCHLVL is being set again, do an initial_cpu_reset anyway). This ensures an architecture's control registers are always correct and provides an easy (simple) and reliable way to reset all control registers to their initial power-on state whenever needed.
2018-05-05 20:23:49 -07:00
Fish (David B. Trout) e5c14b1870 Fix #94 MAINSIZE and finish #92 ARCHLVL reset:
This commit not only resolves issue #94 "ARCHLVL S/370 MAINSIZE issues" but also completes resolution for issue #92 "Changing ARCHLVL does not do sysclear or sysreset clear" as well.
2018-05-05 16:59:22 -07:00
Fish (David B. Trout) 8d6eafe6ff Replace hard-coded value with #define constant instead 2018-04-10 19:10:31 -07:00
Fish (David B. Trout) 1b1e43cb70 Split facility handling into separate source module 2018-04-10 12:55:09 -07:00
Fish (David B. Trout) 5ae064486f Fix ESA/390 facility bits 3, 7, 18, 19, 24 and 52:
"A bit is set to one regardless of the current architectural mode if its meaning is true. A meaning applies to the current architectural mode unless it is said to apply to a specific architectural mode."

Closes issue #74: "Why do we have z/Arch facilities enabled for ESA/390".
2018-04-10 11:01:13 -07:00
Fish (David B. Trout) 510c2c004c Fix bug in facility instructions enable/disable logic 2018-04-01 22:48:16 -07:00
Fish (David B. Trout) fcf32e9b17 Fix crash in 'start_cmd_cpu' when "runtest start" syntax used. 2018-04-01 20:52:20 -07:00
Fish (David B. Trout) 187bdf4bbb HHC00891 tweak 2018-03-08 13:28:08 -08:00
Fish (David B. Trout) c281dea6c2 New FACILITY command to replace ARCHLVL command. 2018-03-08 13:28:08 -08:00
Fish (David B. Trout) d0b468b25e Convert OPTION_370_EXTENSION to FEATURE_370_EXTENSION instead 2018-03-08 13:28:02 -08:00
Fish (David B. Trout) 64c366c5f7 Hercules S/370 Instruction Extension Facility (HERC_370_EXTENSION):
Using the Hercules Virtual Architecture Level facility (archlvl command) to enable/disable ESA/390 and z/Architecture instructions for System/370 mode is cleaner and easier to manage than having to load the HDL S37X.dll instruction module.
2018-03-08 13:28:01 -08:00
Fish (David B. Trout) 00bba8c0d8 Fix facility instructions enable/disable initialization 2018-03-08 13:28:01 -08:00
Fish (David B. Trout) 9a9ef69982 Fix facility instructions enable/disable initialization 2018-03-08 13:28:01 -08:00
Fish (David B. Trout) 2bbe9b6b4b (Oops! Forgot to declare instr146) 2018-03-08 13:28:00 -08:00
Fish (David B. Trout) 64716cbbd1 Sort HERC facilities into sequence 2018-03-08 13:28:00 -08:00
Fish (David B. Trout) 8e5a360ef8 Sort HERC facilities into sequence 2018-03-08 13:28:00 -08:00
Fish (David B. Trout) 614c11277b Add missing Facility 146 Message-Security-Assist Extension 8 instruction B929 KMA CIPHER MESSAGE WITH AUTHENTICATION 2018-03-08 13:28:00 -08:00
Fish (David B. Trout) 494ee6a964 archlvl: disallow sooner if system IPLed 2018-03-08 13:27:56 -08:00
Fish (David B. Trout) bcfbe4dd76 HDL/archlvl: disallow if CPU(s) started / system IPLed. 2018-03-08 13:27:55 -08:00
Fish (David B. Trout) f1292d82f1 Resequence DIS_FAC_INS by name (w/o paren comments), then opcode 2018-03-08 13:27:53 -08:00
Fish (David B. Trout) b9b0bfb826 Break STFL facility bit settings out into separate #include header 2018-03-08 13:27:52 -08:00
Fish (David B. Trout) 9546212a3e Add facility updinstrs functions for Herc MVCIN and SVS facilities.
Redundant FACILITY_CHECK macro removed from both instruction functions too. Other FACILITY_CHECK macros will be removed from other facility instructions in upcoming commits.
2018-03-08 13:27:52 -08:00
Fish (David B. Trout) e570e4acc9 Update opcode table for facility instructions:
When a facility is disabled we update the opcode table for the instructions to route directly to program check operation exception. When the facility is enabled we restore the opcode table to its original value (route directly to the instruction function). This relieves each instruction function from having to do a separate FACILITY_CHECK each time it is executed allowing the instruction to execute more quickly.
2018-03-08 13:27:51 -08:00
Fish (David B. Trout) 26098cda51 Facility bit 68 requires bit 40 2018-03-08 13:27:51 -08:00
Fish (David B. Trout) 5bbe40fd8c Fix some CLANG warnings/errors 2018-03-08 13:27:46 -08:00
Fish (David B. Trout) 771dccae92 standard beginning of all source files ...
... according to comments in impexp.h.
2018-03-08 13:27:41 -08:00
Fish (David B. Trout) 73f93ad4cb (programming note) 2018-03-08 13:27:38 -08:00
Fish (David B. Trout) f1b341843a (fix typo!) 2018-03-08 13:27:36 -08:00
Fish (David B. Trout) a6a33ad0e0 (cosmetic) 2018-03-08 13:27:35 -08:00
Fish (David B. Trout) d23df77b10 Fix facility table bit 1 (z/Arch installed) for S/390:
It should DEFAULT to 'on', yes, but it should NOT be required. It is only required for z/Arch.
2018-03-08 13:27:35 -08:00
Fish (David B. Trout) 28dc592d75 . 2018-03-08 13:27:35 -08:00
Fish (David B. Trout) a22e26e108 Use capital (C) in Copyright message 2018-03-08 13:27:34 -08:00
Fish (David B. Trout) ed3e5f8623 (archlvl query raw tweak) 2018-03-08 13:27:31 -08:00
Fish (David B. Trout) 1907432f54 Fix serious oversight/breakage caused by earlier commit:
The earlier "Derive actual facility table from each ARCH_DEP's facility table" commit (a2d88f5f05add3bc567ceac3350738a4fd8d2d8a) introduced a serious oversight (bug) that causes z/Arch operating systems to no longer IPL because the "z/Arch installed (available)" facility bit 1 was never getting set for ESA/390 (which is the mode that z/Arch operating systems currently always IPL in).

This commit corrects that oversight/bug.
2018-03-08 13:27:31 -08:00
Fish (David B. Trout) 47993c0522 Show HERC bits too for ARCHLVL QUERY RAW 2018-03-08 13:27:31 -08:00
Fish (David B. Trout) 3511c12390 IMPLEMENT facility prerequisite violation checks 2018-03-08 13:27:30 -08:00
Fish (David B. Trout) 5e12743dbf Introduce facility pre-/post-requisite violation check framework 2018-03-08 13:25:56 -08:00
Fish (David B. Trout) 2e7eb8c1a6 (fix earlier rename) 2018-03-08 13:25:55 -08:00
Fish (David B. Trout) 50c3cf4fda Derive actual facility table from each ARCH_DEP's facility table. 2018-03-08 13:25:55 -08:00
Fish (David B. Trout) 8945bd5b45 ARCHLVL QUERY enhancements: SHORT, LONG and RAW. 2018-03-08 13:25:49 -08:00
Fish (David B. Trout) 078b01caaa Redesign/rewrite archlvl/facility support to eliminate als 2018-03-08 13:25:49 -08:00
Fish (David B. Trout) 565f3267ba rework ipl and system_reset function arguments for clarity 2018-03-08 13:25:48 -08:00
Fish (David B. Trout) e387d2600b Fix missed CRITICAL array size bug:
This is precisely the type of bug the "LARGE Cosmetic: many renames and added comments" commit was designed to uncover (make obvious).  Nevertheless I somehow missed this one.  Don't ask me how but I did.  Luckily though it was detected during a debugging session, thank goodness.
2018-03-08 13:25:48 -08:00
Fish (David B. Trout) c80e60a2ce LARGE Cosmetic: many renames and added comments:
_ARCHMODE1/2/3    ==>  _ARCH_NUM_0/1/2
ARCH_370/390/900  ==>  ARCH_370/390/900_IDX
GEN_ARCHCOUNT     ==>  NUM_GEN_ARCHS
GEN_MAXARCH       ==>  NUM_INSTR_TAB_PTRS
zz_func           ==>  instr_func
2018-03-08 13:25:44 -08:00