Sophie

Sophie

distrib > Momonga > development > i686 > media > os > by-pkgid > ebaa2ee905d6df590c05ae2846832b3e > files > 44

xen-doc-4.5.0-1m.mo8.i686.rpm

<html><head><title>include/public/platform.h - arch-arm - Xen public headers</title></head><body><pre>
/******************************************************************************
 * platform.h
 * 
 * Hardware platform operations. Intended for use by domain-0 kernel.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to
 * deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 * Copyright (c) 2002-2006, K Fraser
 */

#ifndef __XEN_PUBLIC_PLATFORM_H__
#define __XEN_PUBLIC_PLATFORM_H__

#include "xen.h"

#define XENPF_INTERFACE_VERSION 0x03000001

/*
 * Set clock such that it would read &lt;secs,nsecs&gt; after 00:00:00 UTC,
 * 1 January, 1970 if the current system time was &lt;system_time&gt;.
 */
#define XENPF_settime             17
<a  name="Struct_xenpf_settime"><strong>struct xenpf_settime</strong></a> {
    /* IN variables. */
    uint32_t secs;
    uint32_t nsecs;
    uint64_t system_time;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_settime">struct xenpf_settime</a> <a  name="Typedef_xenpf_settime_t"><strong>xenpf_settime_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_settime">xenpf_settime_t</a>);

/*
 * 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         31
<a  name="Struct_xenpf_add_memtype"><strong>struct xenpf_add_memtype</strong></a> {
    /* IN variables. */
    <a href="include,public,arch-arm.h.html#Typedef_xen_pfn_t">xen_pfn_t</a> mfn;
    uint64_t nr_mfns;
    uint32_t type;
    /* OUT variables. */
    uint32_t handle;
    uint32_t reg;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_add_memtype">struct xenpf_add_memtype</a> <a  name="Typedef_xenpf_add_memtype_t"><strong>xenpf_add_memtype_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_add_memtype">xenpf_add_memtype_t</a>);

/*
 * 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         32
<a  name="Struct_xenpf_del_memtype"><strong>struct xenpf_del_memtype</strong></a> {
    /* IN variables. */
    uint32_t handle;
    uint32_t reg;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_del_memtype">struct xenpf_del_memtype</a> <a  name="Typedef_xenpf_del_memtype_t"><strong>xenpf_del_memtype_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_del_memtype">xenpf_del_memtype_t</a>);

/* Read current type of an MTRR (x86-specific). */
#define XENPF_read_memtype        33
<a  name="Struct_xenpf_read_memtype"><strong>struct xenpf_read_memtype</strong></a> {
    /* IN variables. */
    uint32_t reg;
    /* OUT variables. */
    <a href="include,public,arch-arm.h.html#Typedef_xen_pfn_t">xen_pfn_t</a> mfn;
    uint64_t nr_mfns;
    uint32_t type;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_read_memtype">struct xenpf_read_memtype</a> <a  name="Typedef_xenpf_read_memtype_t"><strong>xenpf_read_memtype_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_read_memtype">xenpf_read_memtype_t</a>);

#define XENPF_microcode_update    35
<a  name="Struct_xenpf_microcode_update"><strong>struct xenpf_microcode_update</strong></a> {
    /* IN variables. */
    XEN_GUEST_HANDLE(const_void) data;/* Pointer to microcode data */
    uint32_t length;                  /* Length of microcode data. */
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_microcode_update">struct xenpf_microcode_update</a> <a  name="Typedef_xenpf_microcode_update_t"><strong>xenpf_microcode_update_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_microcode_update">xenpf_microcode_update_t</a>);

#define XENPF_platform_quirk      39
#define QUIRK_NOIRQBALANCING      1 /* Do not restrict IO-APIC RTE targets */
#define QUIRK_IOAPIC_BAD_REGSEL   2 /* IO-APIC REGSEL forgets its value    */
#define QUIRK_IOAPIC_GOOD_REGSEL  3 /* IO-APIC REGSEL behaves properly     */
<a  name="Struct_xenpf_platform_quirk"><strong>struct xenpf_platform_quirk</strong></a> {
    /* IN variables. */
    uint32_t quirk_id;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_platform_quirk">struct xenpf_platform_quirk</a> <a  name="Typedef_xenpf_platform_quirk_t"><strong>xenpf_platform_quirk_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_platform_quirk">xenpf_platform_quirk_t</a>);

#define XENPF_efi_runtime_call    49
#define XEN_EFI_get_time                      1
#define XEN_EFI_set_time                      2
#define XEN_EFI_get_wakeup_time               3
#define XEN_EFI_set_wakeup_time               4
#define XEN_EFI_get_next_high_monotonic_count 5
#define XEN_EFI_get_variable                  6
#define XEN_EFI_set_variable                  7
#define XEN_EFI_get_next_variable_name        8
#define XEN_EFI_query_variable_info           9
#define XEN_EFI_query_capsule_capabilities   10
#define XEN_EFI_update_capsule               11
<a  name="Struct_xenpf_efi_runtime_call"><strong>struct xenpf_efi_runtime_call</strong></a> {
    uint32_t function;
    /*
     * This field is generally used for per sub-function flags (defined
     * below), except for the XEN_EFI_get_next_high_monotonic_count case,
     * where it holds the single returned value.
     */
    uint32_t misc;
    <a href="include,public,arch-arm.h.html#Typedef_xen_ulong_t">xen_ulong_t</a> status;
    union {
#define XEN_EFI_GET_TIME_SET_CLEARS_NS 0x00000001
        struct {
            struct xenpf_efi_time {
                uint16_t year;
                uint8_t month;
                uint8_t day;
                uint8_t hour;
                uint8_t min;
                uint8_t sec;
                uint32_t ns;
                int16_t tz;
                uint8_t daylight;
            } time;
            uint32_t resolution;
            uint32_t accuracy;
        } get_time;

        struct xenpf_efi_time set_time;

#define XEN_EFI_GET_WAKEUP_TIME_ENABLED 0x00000001
#define XEN_EFI_GET_WAKEUP_TIME_PENDING 0x00000002
        struct xenpf_efi_time get_wakeup_time;

#define XEN_EFI_SET_WAKEUP_TIME_ENABLE      0x00000001
#define XEN_EFI_SET_WAKEUP_TIME_ENABLE_ONLY 0x00000002
        struct xenpf_efi_time set_wakeup_time;

#define XEN_EFI_VARIABLE_NON_VOLATILE       0x00000001
#define XEN_EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
#define XEN_EFI_VARIABLE_RUNTIME_ACCESS     0x00000004
        struct {
            XEN_GUEST_HANDLE(void) name;  /* UCS-2/UTF-16 string */
            <a href="include,public,arch-arm.h.html#Typedef_xen_ulong_t">xen_ulong_t</a> size;
            XEN_GUEST_HANDLE(void) data;
            struct xenpf_efi_guid {
                uint32_t data1;
                uint16_t data2;
                uint16_t data3;
                uint8_t data4[8];
            } vendor_guid;
        } get_variable, set_variable;

        struct {
            <a href="include,public,arch-arm.h.html#Typedef_xen_ulong_t">xen_ulong_t</a> size;
            XEN_GUEST_HANDLE(void) name;  /* UCS-2/UTF-16 string */
            struct xenpf_efi_guid vendor_guid;
        } get_next_variable_name;

#define XEN_EFI_VARINFO_BOOT_SNAPSHOT       0x00000001
        struct {
            uint32_t attr;
            uint64_t max_store_size;
            uint64_t remain_store_size;
            uint64_t max_size;
        } query_variable_info;

        struct {
            XEN_GUEST_HANDLE(void) capsule_header_array;
            <a href="include,public,arch-arm.h.html#Typedef_xen_ulong_t">xen_ulong_t</a> capsule_count;
            uint64_t max_capsule_size;
            uint32_t reset_type;
        } query_capsule_capabilities;

        struct {
            XEN_GUEST_HANDLE(void) capsule_header_array;
            <a href="include,public,arch-arm.h.html#Typedef_xen_ulong_t">xen_ulong_t</a> capsule_count;
            uint64_t sg_list; /* machine address */
        } update_capsule;
    } u;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_efi_runtime_call">struct xenpf_efi_runtime_call</a> <a  name="Typedef_xenpf_efi_runtime_call_t"><strong>xenpf_efi_runtime_call_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_efi_runtime_call">xenpf_efi_runtime_call_t</a>);

#define XENPF_firmware_info       50
#define XEN_FW_DISK_INFO          1 /* from int 13 AH=08/41/48 */
#define XEN_FW_DISK_MBR_SIGNATURE 2 /* from MBR offset 0x1b8 */
#define XEN_FW_VBEDDC_INFO        3 /* from int 10 AX=4f15 */
#define XEN_FW_EFI_INFO           4 /* from EFI */
#define  XEN_FW_EFI_VERSION        0
#define  XEN_FW_EFI_CONFIG_TABLE   1
#define  XEN_FW_EFI_VENDOR         2
#define  XEN_FW_EFI_MEM_INFO       3
#define  XEN_FW_EFI_RT_VERSION     4
#define  XEN_FW_EFI_PCI_ROM        5
#define XEN_FW_KBD_SHIFT_FLAGS    5
<a  name="Struct_xenpf_firmware_info"><strong>struct xenpf_firmware_info</strong></a> {
    /* IN variables. */
    uint32_t type;
    uint32_t index;
    /* OUT variables. */
    union {
        struct {
            /* Int13, Fn48: Check Extensions Present. */
            uint8_t device;                   /* %dl: bios device number */
            uint8_t version;                  /* %ah: major version      */
            uint16_t interface_support;       /* %cx: support bitmap     */
            /* Int13, Fn08: Legacy Get Device Parameters. */
            uint16_t legacy_max_cylinder;     /* %cl[7:6]:%ch: max cyl # */
            uint8_t legacy_max_head;          /* %dh: max head #         */
            uint8_t legacy_sectors_per_track; /* %cl[5:0]: max sector #  */
            /* Int13, Fn41: Get Device Parameters (as filled into %ds:%esi). */
            /* NB. First uint16_t of buffer must be set to buffer size.      */
            XEN_GUEST_HANDLE(void) edd_params;
        } disk_info; /* XEN_FW_DISK_INFO */
        struct {
            uint8_t device;                   /* bios device number  */
            uint32_t mbr_signature;           /* offset 0x1b8 in mbr */
        } disk_mbr_signature; /* XEN_FW_DISK_MBR_SIGNATURE */
        struct {
            /* Int10, AX=4F15: Get EDID info. */
            uint8_t capabilities;
            uint8_t edid_transfer_time;
            /* must refer to 128-byte buffer */
            XEN_GUEST_HANDLE(uint8) edid;
        } vbeddc_info; /* XEN_FW_VBEDDC_INFO */
        union xenpf_efi_info {
            uint32_t version;
            struct {
                uint64_t addr;                /* EFI_CONFIGURATION_TABLE */
                uint32_t nent;
            } cfg;
            struct {
                uint32_t revision;
                uint32_t bufsz;               /* input, in bytes */
                XEN_GUEST_HANDLE(void) name;  /* UCS-2/UTF-16 string */
            } vendor;
            struct {
                uint64_t addr;
                uint64_t size;
                uint64_t attr;
                uint32_t type;
            } mem;
            struct {
                /* IN variables */
                uint16_t segment;
                uint8_t bus;
                uint8_t devfn;
                uint16_t vendor;
                uint16_t devid;
                /* OUT variables */
                uint64_t address;
                <a href="include,public,arch-arm.h.html#Typedef_xen_ulong_t">xen_ulong_t</a> size;
            } pci_rom;
        } efi_info; /* XEN_FW_EFI_INFO */

        /* Int16, Fn02: Get keyboard shift flags. */
        uint8_t kbd_shift_flags; /* XEN_FW_KBD_SHIFT_FLAGS */
    } u;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_firmware_info">struct xenpf_firmware_info</a> <a  name="Typedef_xenpf_firmware_info_t"><strong>xenpf_firmware_info_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_firmware_info">xenpf_firmware_info_t</a>);

#define XENPF_enter_acpi_sleep    51
<a  name="Struct_xenpf_enter_acpi_sleep"><strong>struct xenpf_enter_acpi_sleep</strong></a> {
    /* IN variables */
#if __XEN_INTERFACE_VERSION__ &lt; 0x00040300
    uint16_t pm1a_cnt_val;      /* PM1a control value. */
    uint16_t pm1b_cnt_val;      /* PM1b control value. */
#else
    uint16_t val_a;             /* PM1a control / sleep type A. */
    uint16_t val_b;             /* PM1b control / sleep type B. */
#endif
    uint32_t sleep_state;       /* Which state to enter (Sn). */
#define XENPF_ACPI_SLEEP_EXTENDED 0x00000001
    uint32_t flags;             /* XENPF_ACPI_SLEEP_*. */
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_enter_acpi_sleep">struct xenpf_enter_acpi_sleep</a> <a  name="Typedef_xenpf_enter_acpi_sleep_t"><strong>xenpf_enter_acpi_sleep_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_enter_acpi_sleep">xenpf_enter_acpi_sleep_t</a>);

#define XENPF_change_freq         52
<a  name="Struct_xenpf_change_freq"><strong>struct xenpf_change_freq</strong></a> {
    /* IN variables */
    uint32_t flags; /* Must be zero. */
    uint32_t cpu;   /* Physical cpu. */
    uint64_t freq;  /* New frequency (Hz). */
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_change_freq">struct xenpf_change_freq</a> <a  name="Typedef_xenpf_change_freq_t"><strong>xenpf_change_freq_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_change_freq">xenpf_change_freq_t</a>);

/*
 * 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         53
<a  name="Struct_xenpf_getidletime"><strong>struct xenpf_getidletime</strong></a> {
    /* IN/OUT variables */
    /* IN: CPUs to interrogate; OUT: subset of IN which are present */
    XEN_GUEST_HANDLE(uint8) cpumap_bitmap;
    /* IN variables */
    /* Size of cpumap bitmap. */
    uint32_t cpumap_nr_cpus;
    /* Must be indexable for every cpu in cpumap_bitmap. */
    XEN_GUEST_HANDLE(uint64) idletime;
    /* OUT variables */
    /* System time when the idletime snapshots were taken. */
    uint64_t now;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_getidletime">struct xenpf_getidletime</a> <a  name="Typedef_xenpf_getidletime_t"><strong>xenpf_getidletime_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_getidletime">xenpf_getidletime_t</a>);

#define XENPF_set_processor_pminfo      54

/* ability bits */
#define XEN_PROCESSOR_PM_CX	1
#define XEN_PROCESSOR_PM_PX	2
#define XEN_PROCESSOR_PM_TX	4

/* cmd type */
#define XEN_PM_CX   0
#define XEN_PM_PX   1
#define XEN_PM_TX   2
#define XEN_PM_PDC  3

/* Px sub info type */
#define XEN_PX_PCT   1
#define XEN_PX_PSS   2
#define XEN_PX_PPC   4
#define XEN_PX_PSD   8

<a  name="Struct_xen_power_register"><strong>struct xen_power_register</strong></a> {
    uint32_t     space_id;
    uint32_t     bit_width;
    uint32_t     bit_offset;
    uint32_t     access_size;
    uint64_t     address;
};

<a  name="Struct_xen_processor_csd"><strong>struct xen_processor_csd</strong></a> {
    uint32_t    domain;      /* domain number of one dependent group */
    uint32_t    coord_type;  /* coordination type */
    uint32_t    num;         /* number of processors in same domain */
};
typedef <a href="include,public,platform.h.html#Struct_xen_processor_csd">struct xen_processor_csd</a> <a  name="Typedef_xen_processor_csd_t"><strong>xen_processor_csd_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xen_processor_csd">xen_processor_csd_t</a>);

<a  name="Struct_xen_processor_cx"><strong>struct xen_processor_cx</strong></a> {
    <a href="include,public,platform.h.html#Struct_xen_power_register">struct xen_power_register</a>  reg; /* GAS for Cx trigger register */
    uint8_t     type;     /* cstate value, c0: 0, c1: 1, ... */
    uint32_t    latency;  /* worst latency (ms) to enter/exit this cstate */
    uint32_t    power;    /* average power consumption(mW) */
    uint32_t    dpcnt;    /* number of dependency entries */
    XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xen_processor_csd">xen_processor_csd_t</a>) dp; /* NULL if no dependency */
};
typedef <a href="include,public,platform.h.html#Struct_xen_processor_cx">struct xen_processor_cx</a> <a  name="Typedef_xen_processor_cx_t"><strong>xen_processor_cx_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xen_processor_cx">xen_processor_cx_t</a>);

<a  name="Struct_xen_processor_flags"><strong>struct xen_processor_flags</strong></a> {
    uint32_t bm_control:1;
    uint32_t bm_check:1;
    uint32_t has_cst:1;
    uint32_t power_setup_done:1;
    uint32_t bm_rld_set:1;
};

<a  name="Struct_xen_processor_power"><strong>struct xen_processor_power</strong></a> {
    uint32_t count;  /* number of C state entries in array below */
    <a href="include,public,platform.h.html#Struct_xen_processor_flags">struct xen_processor_flags</a> flags;  /* global flags of this processor */
    XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xen_processor_cx">xen_processor_cx_t</a>) states; /* supported c states */
};

<a  name="Struct_xen_pct_register"><strong>struct xen_pct_register</strong></a> {
    uint8_t  descriptor;
    uint16_t length;
    uint8_t  space_id;
    uint8_t  bit_width;
    uint8_t  bit_offset;
    uint8_t  reserved;
    uint64_t address;
};

<a  name="Struct_xen_processor_px"><strong>struct xen_processor_px</strong></a> {
    uint64_t core_frequency; /* megahertz */
    uint64_t power;      /* milliWatts */
    uint64_t transition_latency; /* microseconds */
    uint64_t bus_master_latency; /* microseconds */
    uint64_t control;        /* control value */
    uint64_t status;     /* success indicator */
};
typedef <a href="include,public,platform.h.html#Struct_xen_processor_px">struct xen_processor_px</a> <a  name="Typedef_xen_processor_px_t"><strong>xen_processor_px_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xen_processor_px">xen_processor_px_t</a>);

<a  name="Struct_xen_psd_package"><strong>struct xen_psd_package</strong></a> {
    uint64_t num_entries;
    uint64_t revision;
    uint64_t domain;
    uint64_t coord_type;
    uint64_t num_processors;
};

<a  name="Struct_xen_processor_performance"><strong>struct xen_processor_performance</strong></a> {
    uint32_t flags;     /* flag for Px sub info type */
    uint32_t platform_limit;  /* Platform limitation on freq usage */
    <a href="include,public,platform.h.html#Struct_xen_pct_register">struct xen_pct_register</a> control_register;
    <a href="include,public,platform.h.html#Struct_xen_pct_register">struct xen_pct_register</a> status_register;
    uint32_t state_count;     /* total available performance states */
    XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xen_processor_px">xen_processor_px_t</a>) states;
    <a href="include,public,platform.h.html#Struct_xen_psd_package">struct xen_psd_package</a> domain_info;
    uint32_t shared_type;     /* coordination type of this processor */
};
typedef <a href="include,public,platform.h.html#Struct_xen_processor_performance">struct xen_processor_performance</a> <a  name="Typedef_xen_processor_performance_t"><strong>xen_processor_performance_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xen_processor_performance">xen_processor_performance_t</a>);

<a  name="Struct_xenpf_set_processor_pminfo"><strong>struct xenpf_set_processor_pminfo</strong></a> {
    /* IN variables */
    uint32_t id;    /* ACPI CPU ID */
    uint32_t type;  /* {XEN_PM_CX, XEN_PM_PX} */
    union {
        <a href="include,public,platform.h.html#Struct_xen_processor_power">struct xen_processor_power</a>          power;/* Cx: _CST/_CSD */
        <a href="include,public,platform.h.html#Struct_xen_processor_performance">struct xen_processor_performance</a>    perf; /* Px: _PPC/_PCT/_PSS/_PSD */
        XEN_GUEST_HANDLE(uint32)            pdc;  /* _PDC */
    } u;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_set_processor_pminfo">struct xenpf_set_processor_pminfo</a> <a  name="Typedef_xenpf_set_processor_pminfo_t"><strong>xenpf_set_processor_pminfo_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_set_processor_pminfo">xenpf_set_processor_pminfo_t</a>);

#define XENPF_get_cpuinfo 55
<a  name="Struct_xenpf_pcpuinfo"><strong>struct xenpf_pcpuinfo</strong></a> {
    /* IN */
    uint32_t xen_cpuid;
    /* OUT */
    /* The maxium cpu_id that is present */
    uint32_t max_present;
#define XEN_PCPU_FLAGS_ONLINE   1
    /* Correponding xen_cpuid is not present*/
#define XEN_PCPU_FLAGS_INVALID  2
    uint32_t flags;
    uint32_t apic_id;
    uint32_t acpi_id;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_pcpuinfo">struct xenpf_pcpuinfo</a> <a  name="Typedef_xenpf_pcpuinfo_t"><strong>xenpf_pcpuinfo_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_pcpuinfo">xenpf_pcpuinfo_t</a>);

#define XENPF_get_cpu_version 48
<a  name="Struct_xenpf_pcpu_version"><strong>struct xenpf_pcpu_version</strong></a> {
    /* IN */
    uint32_t xen_cpuid;
    /* OUT */
    /* The maxium cpu_id that is present */
    uint32_t max_present;
    char vendor_id[12];
    uint32_t family;
    uint32_t model;
    uint32_t stepping;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_pcpu_version">struct xenpf_pcpu_version</a> <a  name="Typedef_xenpf_pcpu_version_t"><strong>xenpf_pcpu_version_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_pcpu_version">xenpf_pcpu_version_t</a>);

#define XENPF_cpu_online    56
#define XENPF_cpu_offline   57
struct xenpf_cpu_ol
{
    uint32_t cpuid;
};
typedef struct xenpf_cpu_ol <a  name="Typedef_xenpf_cpu_ol_t"><strong>xenpf_cpu_ol_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Typedef_xenpf_cpu_ol_t">xenpf_cpu_ol_t</a>);

#define XENPF_cpu_hotadd    58
struct xenpf_cpu_hotadd
{
	uint32_t apic_id;
	uint32_t acpi_id;
	uint32_t pxm;
};

#define XENPF_mem_hotadd    59
struct xenpf_mem_hotadd
{
    uint64_t spfn;
    uint64_t epfn;
    uint32_t pxm;
    uint32_t flags;
};

#define XENPF_core_parking  60

#define XEN_CORE_PARKING_SET 1
#define XEN_CORE_PARKING_GET 2
<a  name="Struct_xenpf_core_parking"><strong>struct xenpf_core_parking</strong></a> {
    /* IN variables */
    uint32_t type;
    /* IN variables:  set cpu nums expected to be idled */
    /* OUT variables: get cpu nums actually be idled */
    uint32_t idle_nums;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_core_parking">struct xenpf_core_parking</a> <a  name="Typedef_xenpf_core_parking_t"><strong>xenpf_core_parking_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_core_parking">xenpf_core_parking_t</a>);

/*
 * Access generic platform resources(e.g., accessing MSR, port I/O, etc)
 * in unified way. Batch resource operations in one call are supported and
 * they are always non-preemptible and executed in their original order.
 * The batch itself returns a negative integer for general errors, or a
 * non-negative integer for the number of successful operations. For the latter
 * case, the @ret in the failed entry (if any) indicates the exact error.
 */
#define XENPF_resource_op   61

#define XEN_RESOURCE_OP_MSR_READ  0
#define XEN_RESOURCE_OP_MSR_WRITE 1

<a  name="Struct_xenpf_resource_entry"><strong>struct xenpf_resource_entry</strong></a> {
    union {
        uint32_t cmd;   /* IN: XEN_RESOURCE_OP_* */
        int32_t  ret;   /* OUT: return value for failed entry */
    } u;
    uint32_t rsvd;      /* IN: padding and must be zero */
    uint64_t idx;       /* IN: resource address to access */
    uint64_t val;       /* IN/OUT: resource value to set/get */
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_resource_entry">struct xenpf_resource_entry</a> <a  name="Typedef_xenpf_resource_entry_t"><strong>xenpf_resource_entry_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_resource_entry">xenpf_resource_entry_t</a>);

<a  name="Struct_xenpf_resource_op"><strong>struct xenpf_resource_op</strong></a> {
    uint32_t nr_entries;    /* number of resource entry */
    uint32_t cpu;           /* which cpu to run */
    XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_resource_entry">xenpf_resource_entry_t</a>) entries;
};
typedef <a href="include,public,platform.h.html#Struct_xenpf_resource_op">struct xenpf_resource_op</a> <a  name="Typedef_xenpf_resource_op_t"><strong>xenpf_resource_op_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xenpf_resource_op">xenpf_resource_op_t</a>);

/*
 * ` <a href="include,xen,errno.h.html#Enum_neg_errnoval">enum neg_errnoval</a>
 * ` <a  name="Func_HYPERVISOR_platform_op"><strong>HYPERVISOR_platform_op</strong></a>(const <a href="include,public,platform.h.html#Struct_xen_platform_op">struct xen_platform_op</a>*);
 */
<a  name="Struct_xen_platform_op"><strong>struct xen_platform_op</strong></a> {
    uint32_t cmd;
    uint32_t interface_version; /* XENPF_INTERFACE_VERSION */
    union {
        <a href="include,public,platform.h.html#Struct_xenpf_settime">struct xenpf_settime</a>           settime;
        <a href="include,public,platform.h.html#Struct_xenpf_add_memtype">struct xenpf_add_memtype</a>       add_memtype;
        <a href="include,public,platform.h.html#Struct_xenpf_del_memtype">struct xenpf_del_memtype</a>       del_memtype;
        <a href="include,public,platform.h.html#Struct_xenpf_read_memtype">struct xenpf_read_memtype</a>      read_memtype;
        <a href="include,public,platform.h.html#Struct_xenpf_microcode_update">struct xenpf_microcode_update</a>  microcode;
        <a href="include,public,platform.h.html#Struct_xenpf_platform_quirk">struct xenpf_platform_quirk</a>    platform_quirk;
        <a href="include,public,platform.h.html#Struct_xenpf_efi_runtime_call">struct xenpf_efi_runtime_call</a>  efi_runtime_call;
        <a href="include,public,platform.h.html#Struct_xenpf_firmware_info">struct xenpf_firmware_info</a>     firmware_info;
        <a href="include,public,platform.h.html#Struct_xenpf_enter_acpi_sleep">struct xenpf_enter_acpi_sleep</a>  enter_acpi_sleep;
        <a href="include,public,platform.h.html#Struct_xenpf_change_freq">struct xenpf_change_freq</a>       change_freq;
        <a href="include,public,platform.h.html#Struct_xenpf_getidletime">struct xenpf_getidletime</a>       getidletime;
        <a href="include,public,platform.h.html#Struct_xenpf_set_processor_pminfo">struct xenpf_set_processor_pminfo</a> set_pminfo;
        <a href="include,public,platform.h.html#Struct_xenpf_pcpuinfo">struct xenpf_pcpuinfo</a>          pcpu_info;
        <a href="include,public,platform.h.html#Struct_xenpf_pcpu_version">struct xenpf_pcpu_version</a>      pcpu_version;
        struct xenpf_cpu_ol            cpu_ol;
        struct xenpf_cpu_hotadd        cpu_add;
        struct xenpf_mem_hotadd        mem_add;
        <a href="include,public,platform.h.html#Struct_xenpf_core_parking">struct xenpf_core_parking</a>      core_parking;
        <a href="include,public,platform.h.html#Struct_xenpf_resource_op">struct xenpf_resource_op</a>       resource_op;
        uint8_t                        pad[128];
    } u;
};
typedef <a href="include,public,platform.h.html#Struct_xen_platform_op">struct xen_platform_op</a> <a  name="Typedef_xen_platform_op_t"><strong>xen_platform_op_t</strong></a>;
DEFINE_XEN_GUEST_HANDLE(<a href="include,public,platform.h.html#Struct_xen_platform_op">xen_platform_op_t</a>);
/* [see <a href="include,public,xen.h.html#EnumVal___HYPERVISOR_platform_op">__HYPERVISOR_platform_op</a>] */

#endif /* __XEN_PUBLIC_PLATFORM_H__ */

/*
 * Local variables:
 * mode: C
 * c-file-style: "BSD"
 * c-basic-offset: 4
 * tab-width: 4
 * indent-tabs-mode: nil
 * End:
 */
</pre></body></html>