ZXFoundation™ 26h2
Loading...
Searching...
No Matches
skey.cxxm File Reference

z/Architecture storage key operations (SSKE, ISKE, RRBE). More...

Include dependency graph for skey.cxxm:

Functions

auto arch::s390x::cpu::skey::iske (u64 phys_addr) noexcept -> u8
 Insert Storage Key Extended (ISKE).
constexpr auto arch::s390x::cpu::skey::make_skey (u8 acc, bool fetch_protect) noexcept -> u8
 Construct a storage key byte from an access-control value and a fetch-protection flag.
auto arch::s390x::cpu::skey::rrbe (u64 phys_addr) noexcept -> condition_code
 Reset Reference Bit Extended (RRBE).
constexpr auto arch::s390x::cpu::skey::skey_acc (u8 key) noexcept -> u8
 Extract the 4-bit access-control field from a key byte.
constexpr auto arch::s390x::cpu::skey::skey_is_changed (u8 key) noexcept -> bool
 Test whether the change bit is set in a key byte.
constexpr auto arch::s390x::cpu::skey::skey_is_fetch_protected (u8 key) noexcept -> bool
 Test whether the fetch-protection bit is set in a key byte.
constexpr auto arch::s390x::cpu::skey::skey_is_referenced (u8 key) noexcept -> bool
 Test whether the reference bit is set in a key byte.
auto arch::s390x::cpu::skey::sske (u64 phys_addr, u8 key) noexcept -> void
 Set Storage Key Extended (SSKE).
auto arch::s390x::cpu::skey::sske_nq (u64 phys_addr, u8 key) noexcept -> void
 Set Storage Key Extended, non-quiescing form (SSKE with M3=8).
auto arch::s390x::cpu::skey::sske_preserve_rc (u64 phys_addr, u8 acc, bool fetch_protect) noexcept -> void
 Set the access-control and fetch-protection bits of a frame's storage key.

Variables

constexpr u32 arch::s390x::cpu::skey::PSW_KEY_SHIFT = 52
 PSW key field position within the 64-bit PSW mask word.
constexpr u8 arch::s390x::cpu::skey::SKEY_ACC_MASK = 0xF0
 Access control bits occupy the high nibble of the key byte.
constexpr u8 arch::s390x::cpu::skey::SKEY_ACC_SHIFT = 4
 Shift count to position an access-control value into the key byte.
constexpr u8 arch::s390x::cpu::skey::SKEY_CHANGE = 0x02
 Change bit (PoP bit 6 of the key byte, value 0x02). Set by the CPU when the frame is written.
constexpr u8 arch::s390x::cpu::skey::SKEY_FETCH_PROTECT = 0x08
 Fetch-protection bit (PoP bit 4 of the key byte, value 0x08).
constexpr u8 arch::s390x::cpu::skey::SKEY_REF = 0x04
 Reference bit (PoP bit 5 of the key byte, value 0x04). Set by the CPU when the frame is accessed (read or write).

Detailed Description

z/Architecture storage key operations (SSKE, ISKE, RRBE).

SPDX-License-Identifier: Apache-2.0

Function Documentation

◆ iske()

auto arch::s390x::cpu::skey::iske ( u64 phys_addr) ->u8
inlinenodiscardexportnoexcept

Insert Storage Key Extended (ISKE).

Parameters
phys_addrReal (absolute) address within the target frame.
Returns
Key byte: ACC(4) | F(1) | R(1) | C(1) | 0(1).

◆ make_skey()

auto arch::s390x::cpu::skey::make_skey ( u8 acc,
bool fetch_protect )->u8
nodiscardconstexprexportnoexcept

Construct a storage key byte from an access-control value and a fetch-protection flag.

Parameters
acc4-bit access control value (0-15).
fetch_protectIf true, set the fetch-protection bit.
Returns
Assembled key byte (R and C bits are zero).

◆ rrbe()

auto arch::s390x::cpu::skey::rrbe ( u64 phys_addr) ->condition_code
inlinenodiscardexportnoexcept

Reset Reference Bit Extended (RRBE).

Parameters
phys_addrReal (absolute) address within the target frame.
Returns
Condition code (0-3).

◆ sske()

auto arch::s390x::cpu::skey::sske ( u64 phys_addr,
u8 key )->void
inlineexportnoexcept

Set Storage Key Extended (SSKE).

Parameters
phys_addrReal (absolute) address within the target frame.
keyKey byte: ACC(4) | F(1) | R(1) | C(1) | 0(1).

◆ sske_nq()

auto arch::s390x::cpu::skey::sske_nq ( u64 phys_addr,
u8 key )->void
inlineexportnoexcept

Set Storage Key Extended, non-quiescing form (SSKE with M3=8).

Parameters
phys_addrReal (absolute) address within the target frame.
keyKey byte.

◆ sske_preserve_rc()

auto arch::s390x::cpu::skey::sske_preserve_rc ( u64 phys_addr,
u8 acc,
bool fetch_protect )->void
inlineexportnoexcept

Set the access-control and fetch-protection bits of a frame's storage key.

Parameters
phys_addrReal (absolute) address within the target frame.
acc4-bit access control value (0-15).
fetch_protectIf true, set the fetch-protection bit.

Variable Documentation

◆ SKEY_ACC_MASK

u8 arch::s390x::cpu::skey::SKEY_ACC_MASK = 0xF0
constexprexport

Access control bits occupy the high nibble of the key byte.

PoP bits 0-3.