18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef LINUX_POWERPC_PERF_HV_24X7_CATALOG_H_ 38c2ecf20Sopenharmony_ci#define LINUX_POWERPC_PERF_HV_24X7_CATALOG_H_ 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/types.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci/* From document "24x7 Event and Group Catalog Formats Proposal" v0.15 */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_cistruct hv_24x7_catalog_page_0 { 108c2ecf20Sopenharmony_ci#define HV_24X7_CATALOG_MAGIC 0x32347837 /* "24x7" in ASCII */ 118c2ecf20Sopenharmony_ci __be32 magic; 128c2ecf20Sopenharmony_ci __be32 length; /* In 4096 byte pages */ 138c2ecf20Sopenharmony_ci __be64 version; /* XXX: arbitrary? what's the meaning/useage/purpose? */ 148c2ecf20Sopenharmony_ci __u8 build_time_stamp[16]; /* "YYYYMMDDHHMMSS\0\0" */ 158c2ecf20Sopenharmony_ci __u8 reserved2[32]; 168c2ecf20Sopenharmony_ci __be16 schema_data_offs; /* in 4096 byte pages */ 178c2ecf20Sopenharmony_ci __be16 schema_data_len; /* in 4096 byte pages */ 188c2ecf20Sopenharmony_ci __be16 schema_entry_count; 198c2ecf20Sopenharmony_ci __u8 reserved3[2]; 208c2ecf20Sopenharmony_ci __be16 event_data_offs; 218c2ecf20Sopenharmony_ci __be16 event_data_len; 228c2ecf20Sopenharmony_ci __be16 event_entry_count; 238c2ecf20Sopenharmony_ci __u8 reserved4[2]; 248c2ecf20Sopenharmony_ci __be16 group_data_offs; /* in 4096 byte pages */ 258c2ecf20Sopenharmony_ci __be16 group_data_len; /* in 4096 byte pages */ 268c2ecf20Sopenharmony_ci __be16 group_entry_count; 278c2ecf20Sopenharmony_ci __u8 reserved5[2]; 288c2ecf20Sopenharmony_ci __be16 formula_data_offs; /* in 4096 byte pages */ 298c2ecf20Sopenharmony_ci __be16 formula_data_len; /* in 4096 byte pages */ 308c2ecf20Sopenharmony_ci __be16 formula_entry_count; 318c2ecf20Sopenharmony_ci __u8 reserved6[2]; 328c2ecf20Sopenharmony_ci} __packed; 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_cistruct hv_24x7_event_data { 358c2ecf20Sopenharmony_ci __be16 length; /* in bytes, must be a multiple of 16 */ 368c2ecf20Sopenharmony_ci __u8 reserved1[2]; 378c2ecf20Sopenharmony_ci __u8 domain; /* Chip = 1, Core = 2 */ 388c2ecf20Sopenharmony_ci __u8 reserved2[1]; 398c2ecf20Sopenharmony_ci __be16 event_group_record_offs; /* in bytes, must be 8 byte aligned */ 408c2ecf20Sopenharmony_ci __be16 event_group_record_len; /* in bytes */ 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci /* in bytes, offset from event_group_record */ 438c2ecf20Sopenharmony_ci __be16 event_counter_offs; 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci /* verified_state, unverified_state, caveat_state, broken_state, ... */ 468c2ecf20Sopenharmony_ci __be32 flags; 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci __be16 primary_group_ix; 498c2ecf20Sopenharmony_ci __be16 group_count; 508c2ecf20Sopenharmony_ci __be16 event_name_len; 518c2ecf20Sopenharmony_ci __u8 remainder[]; 528c2ecf20Sopenharmony_ci /* __u8 event_name[event_name_len - 2]; */ 538c2ecf20Sopenharmony_ci /* __be16 event_description_len; */ 548c2ecf20Sopenharmony_ci /* __u8 event_desc[event_description_len - 2]; */ 558c2ecf20Sopenharmony_ci /* __be16 detailed_desc_len; */ 568c2ecf20Sopenharmony_ci /* __u8 detailed_desc[detailed_desc_len - 2]; */ 578c2ecf20Sopenharmony_ci} __packed; 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#endif 60