ZXFoundation™ 26h2
Loading...
Searching...
No Matches
arch.s390x.cpu.ecag Module Reference

Data Structures

union  arch::s390x::cpu::ecag::cache_summary
 Full topology summary (ASI=cache, AI=extract_topo_summary). More...
union  arch::s390x::cpu::ecag::cache_summary_entry
 One byte of a topology-summary result. More...
struct  arch::s390x::cpu::ecag::cpu_speed
 CPU-speed result (ASI=cpu, AI=extract_cpu_speed). More...

Enumerations

enum class  attribute_indication : u8 { extract_topo_summary = 0 , extract_cache_line_size = 1 , extract_cache_size = 2 , extract_cache_associativity = 3 }
enum class  attribute_set_indication : u32 { cache = 0 , cpu = 1 }
enum class  cache_level : u8 {
  l1 = 0 , l2 = 1 , l3 = 2 , l4 = 3 ,
  l5 = 4 , l6 = 5 , l7 = 6 , l8 = 7
}
enum class  cache_scope : u8 { does_not_exist = 0b00 , private_to_cpu = 0b01 , may_be_shared = 0b10 , reserved = 0b11 }
enum class  cache_type : u8 { separate = 0b00 , instruction = 0b01 , data = 0b10 , unified = 0b11 }
enum class  cpu_attribute_indication : u8 { extract_cpu_speed = 0 }
enum class  type_indication : u8 { data = 0b0 , instruction = 0b1 }

Functions

 arch::s390x::cpu::ecag::assert_size (cache_summary, 8)
 arch::s390x::cpu::ecag::assert_size (cache_summary_entry, 1)
 arch::s390x::cpu::ecag::assert_size (cpu_speed, 8)
constexpr auto arch::s390x::cpu::ecag::begin (const cache_summary &s) noexcept
constexpr auto arch::s390x::cpu::ecag::end (const cache_summary &s) noexcept
constexpr auto exists () const noexcept -> bool
 True if a cache exists at this level.
template<attribute_set_indication Asi>
auto arch::s390x::cpu::ecag::detail::invoke (u8 parm) noexcept -> std::expected< u64, lib::kernel_error >
 Invoke raw ECAG.
constexpr auto operator[] (cache_level level) const noexcept -> const cache_summary_entry &
constexpr auto arch::s390x::cpu::ecag::detail::pack_cache_parm (attribute_indication ai, cache_level li, type_indication ti) noexcept -> u8
 Build the AI[4] | LI[3] | TI[1] byte for a cache-set query.
template<attribute_indication Indication, cache_level Level, type_indication Type>
requires (Indication != attribute_indication::extract_topo_summary)
auto arch::s390x::cpu::ecag::query_cache_attribute () noexcept -> std::expected< u64, lib::kernel_error >
 Extract a scalar cache attribute.
auto arch::s390x::cpu::ecag::query_cpu_speed () noexcept -> std::expected< cpu_speed, lib::kernel_error >
 Extract dynamic/static CPU speed via ECAG.
auto arch::s390x::cpu::ecag::query_topology () noexcept -> std::expected< cache_summary, lib::kernel_error >
 Extract the per-level cache topology summary.

Variables

u32 dynamic {}
 bits 0-31: dynamic (current/turbo) CPU speed
std::array< cache_summary_entry, 8 > entry
constexpr u64 arch::s390x::cpu::ecag::detail::invalid_sentinel = ~u64{0}
cache_scope   scope: 2 
u32 static_ {}
 bits 32-63: static (nominal) CPU speed
cache_type   type: 2 
u64 value {}
u8 value {}

Files

file  arch/s390x/cpu/ecag.cxxm
 ECAG (Extract CPU Attribute) kernel API.