linux/include/xen/interface/platform.h

/* SPDX-License-Identifier: MIT */
/******************************************************************************
 * platform.h
 *
 * Hardware platform operations. Intended for use by domain-0 kernel.
 *
 * Copyright (c) 2002-2006, K Fraser
 */

#ifndef __XEN_PUBLIC_PLATFORM_H__
#define __XEN_PUBLIC_PLATFORM_H__

#include <xen/interface/xen.h>

#define XENPF_INTERFACE_VERSION

/*
 * Set clock such that it would read <secs,nsecs> after 00:00:00 UTC,
 * 1 January, 1970 if the current system time was <system_time>.
 */
#define XENPF_settime32
struct xenpf_settime32 {};
DEFINE_GUEST_HANDLE_STRUCT();
#define XENPF_settime64
struct xenpf_settime64 {};
DEFINE_GUEST_HANDLE_STRUCT();

/*
 * Request memory range (@mfn, @mfn+@nr_mfns-1) to have type @type.
 * On x86, @type is an architecture-defined MTRR memory type.
 * On success, returns the MTRR that was used (@reg) and a handle that can
 * be passed to XENPF_DEL_MEMTYPE to accurately tear down the new setting.
 * (x86-specific).
 */
#define XENPF_add_memtype
struct xenpf_add_memtype {};
DEFINE_GUEST_HANDLE_STRUCT();

/*
 * Tear down an existing memory-range type. If @handle is remembered then it
 * should be passed in to accurately tear down the correct setting (in case
 * of overlapping memory regions with differing types). If it is not known
 * then @handle should be set to zero. In all cases @reg must be set.
 * (x86-specific).
 */
#define XENPF_del_memtype
struct xenpf_del_memtype {};
DEFINE_GUEST_HANDLE_STRUCT();

/* Read current type of an MTRR (x86-specific). */
#define XENPF_read_memtype
struct xenpf_read_memtype {};
DEFINE_GUEST_HANDLE_STRUCT();

#define XENPF_microcode_update
struct xenpf_microcode_update {};
DEFINE_GUEST_HANDLE_STRUCT();

#define XENPF_platform_quirk
#define QUIRK_NOIRQBALANCING
#define QUIRK_IOAPIC_BAD_REGSEL
#define QUIRK_IOAPIC_GOOD_REGSEL
struct xenpf_platform_quirk {};
DEFINE_GUEST_HANDLE_STRUCT();

#define XENPF_efi_runtime_call
#define XEN_EFI_get_time
#define XEN_EFI_set_time
#define XEN_EFI_get_wakeup_time
#define XEN_EFI_set_wakeup_time
#define XEN_EFI_get_next_high_monotonic_count
#define XEN_EFI_get_variable
#define XEN_EFI_set_variable
#define XEN_EFI_get_next_variable_name
#define XEN_EFI_query_variable_info
#define XEN_EFI_query_capsule_capabilities
#define XEN_EFI_update_capsule

struct xenpf_efi_runtime_call {};
DEFINE_GUEST_HANDLE_STRUCT();

#define XEN_FW_EFI_VERSION
#define XEN_FW_EFI_CONFIG_TABLE
#define XEN_FW_EFI_VENDOR
#define XEN_FW_EFI_MEM_INFO
#define XEN_FW_EFI_RT_VERSION

#define XENPF_firmware_info
#define XEN_FW_DISK_INFO
#define XEN_FW_DISK_MBR_SIGNATURE
#define XEN_FW_VBEDDC_INFO
#define XEN_FW_EFI_INFO
#define XEN_FW_KBD_SHIFT_FLAGS

struct xenpf_firmware_info {};
DEFINE_GUEST_HANDLE_STRUCT();

#define XENPF_enter_acpi_sleep
struct xenpf_enter_acpi_sleep {};
DEFINE_GUEST_HANDLE_STRUCT();

#define XENPF_change_freq
struct xenpf_change_freq {};
DEFINE_GUEST_HANDLE_STRUCT();

/*
 * Get idle times (nanoseconds since boot) for physical CPUs specified in the
 * @cpumap_bitmap with range [0..@cpumap_nr_cpus-1]. The @idletime array is
 * indexed by CPU number; only entries with the corresponding @cpumap_bitmap
 * bit set are written to. On return, @cpumap_bitmap is modified so that any
 * non-existent CPUs are cleared. Such CPUs have their @idletime array entry
 * cleared.
 */
#define XENPF_getidletime
struct xenpf_getidletime {};
DEFINE_GUEST_HANDLE_STRUCT();

#define XENPF_set_processor_pminfo

/* ability bits */
#define XEN_PROCESSOR_PM_CX
#define XEN_PROCESSOR_PM_PX
#define XEN_PROCESSOR_PM_TX

/* cmd type */
#define XEN_PM_CX
#define XEN_PM_PX
#define XEN_PM_TX
#define XEN_PM_PDC
/* Px sub info type */
#define XEN_PX_PCT
#define XEN_PX_PSS
#define XEN_PX_PPC
#define XEN_PX_PSD

struct xen_power_register {};

struct xen_processor_csd {};
DEFINE_GUEST_HANDLE_STRUCT();

struct xen_processor_cx {};
DEFINE_GUEST_HANDLE_STRUCT();

struct xen_processor_flags {};

struct xen_processor_power {};

struct xen_pct_register {};

struct xen_processor_px {};
DEFINE_GUEST_HANDLE_STRUCT();

struct xen_psd_package {};

struct xen_processor_performance {};
DEFINE_GUEST_HANDLE_STRUCT();

struct xenpf_set_processor_pminfo {};
DEFINE_GUEST_HANDLE_STRUCT();

#define XENPF_get_cpuinfo
struct xenpf_pcpuinfo {};
DEFINE_GUEST_HANDLE_STRUCT();

#define XENPF_cpu_online
#define XENPF_cpu_offline
struct xenpf_cpu_ol {};
DEFINE_GUEST_HANDLE_STRUCT();

#define XENPF_cpu_hotadd
struct xenpf_cpu_hotadd {};

#define XENPF_mem_hotadd
struct xenpf_mem_hotadd {};

#define XENPF_core_parking
struct xenpf_core_parking {};
DEFINE_GUEST_HANDLE_STRUCT();

#define XENPF_get_symbol
struct xenpf_symdata {};
DEFINE_GUEST_HANDLE_STRUCT();

#define XENPF_get_dom0_console

struct xen_platform_op {};
DEFINE_GUEST_HANDLE_STRUCT();

#endif /* __XEN_PUBLIC_PLATFORM_H__ */