Add ModeSense page 0x25 (DEC special function control page) (#1412)

* Add ModeSense page 0x25 (DECSpecialFunctionControlPage)

VAXServer 3100 (CPU KA41-E) console firmware issues ModeSense(6)
page 0x25 when probing for disks. A disk won't be recognized if
this returns an error.

The DEC SCSI specification[1], section 8.5 documents this page.

[1] https://manx-docs.org/collections/antonio/dec/dec-scsi.pdf

Fixes #1410

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
This commit is contained in:
Klaus Kämpf
2024-01-19 01:55:38 +01:00
committed by GitHub
parent 7cc8df271c
commit 1121b8d9d6
5 changed files with 44 additions and 2 deletions
+24
View File
@@ -97,8 +97,32 @@ void SCSIHD::AddFormatPage(map<int, vector<byte>>& pages, bool changeable) const
EnrichFormatPage(pages, changeable, 1 << GetSectorSizeShiftCount());
}
// Page code 37 (25h) - DEC Special Function Control page
void SCSIHD::AddDECSpecialFunctionControlPage(map<int, vector<byte>>& pages, bool changeable) const
{
vector<byte> buf(25);
// No changeable area
if (changeable) {
pages[0x25] = buf;
return;
}
buf[0] = static_cast<byte> (0x25 | 0x80); // page code, high bit set
buf[1] = static_cast<byte> (sizeof(buf) - 1);
buf[2] = static_cast<byte> (0x01); // drive does not auto-start
pages[0x25] = buf;
}
void SCSIHD::AddVendorPage(map<int, vector<byte>>& pages, int page, bool changeable) const
{
// Page code 0x25: DEC Special Function Control page
if (page == 0x25 || page == 0x3f) {
AddDECSpecialFunctionControlPage(pages, changeable);
}
// Page code 48
if (page == 0x30 || page == 0x3f) {
AddAppleVendorModePage(pages, changeable);
+1
View File
@@ -40,6 +40,7 @@ public:
void ModeSelect(scsi_defs::scsi_command, cdb_t, span<const uint8_t>, int) override;
void AddFormatPage(map<int, vector<byte>>&, bool) const override;
void AddDECSpecialFunctionControlPage(map<int, vector<byte>>&, bool) const;
void AddVendorPage(map<int, vector<byte>>&, int, bool) const override;
private: