SDL-Hercules-390 / hyperion

The SDL Hercules 4.x Hyperion version of the System/370, ESA/390, and z/Architecture Emulator
Other
247 stars 92 forks source link

Missing SERVC instruction runtime checks #460

Closed Fish-Git closed 2 years ago

Fish-Git commented 2 years ago

Josef "Jeff" Sipek (@jeffpc) reported in a separate rbowler/spinhawk GitHub Issue (#109) about a possible bug in the SERVC (B220) instruction. *`()`**

Jeff's original complaint was that the instruction did not accept addresses >= 4GB, which he believed was wrong. Ironically however, while it turns out that his original belief was indeed wrong, evidence was uncovered that, apparently, our existing SERVC code is indeed incorrectly coded and not properly detecting and reporting certain errors (one of which is the >= 2GB case):

  • Correctly ignoring instruction bits that should be ignored
  • Privileged instruction check
  • Check for addressing exceptions
  • Specification exceptions:
    • SCCB size less than 8
    • SCCB unaligned
    • SCCB overlaps prefix or lowcore
    • SCCB address higher than 2GB
  • Return codes for
    • Invalid command
    • SCCB too short (but at least 8)
    • SCCB page boundary violation

This SDL Hyperion Hercules GitHub Issue is being created to document the fact that Hercules's SERVC instruction code apparently does indeed contain bugs that need to be addressed (fixed).

  *`()`** The B220 SERVC instruction is an instruction that is not listed in Principles of Operation or your yellow/pink/blue/white reference card.

Fish-Git commented 2 years ago

Closed by commit 285c636d6606c463ed4ec3fd79a015b15d5063c8.