platform.h revision a576ab5b6e08c47732b3dedca9eaa8a8cbb85720
/******************************************************************************
*
* 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
* 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 <secs,nsecs> after 00:00:00 UTC,
* 1 January, 1970 if the current system time was <system_time>.
*/
#define XENPF_settime 17
struct xenpf_settime {
/* IN variables. */
};
typedef struct xenpf_settime xenpf_settime_t;
/*
* 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
struct xenpf_add_memtype {
/* IN variables. */
/* OUT variables. */
};
typedef struct xenpf_add_memtype xenpf_add_memtype_t;
/*
* 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
struct xenpf_del_memtype {
/* IN variables. */
};
typedef struct xenpf_del_memtype xenpf_del_memtype_t;
/* Read current type of an MTRR (x86-specific). */
#define XENPF_read_memtype 33
struct xenpf_read_memtype {
/* IN variables. */
/* OUT variables. */
};
typedef struct xenpf_read_memtype xenpf_read_memtype_t;
#define XENPF_microcode_update 35
struct xenpf_microcode_update {
/* IN variables. */
};
typedef struct xenpf_microcode_update xenpf_microcode_update_t;
#define XENPF_platform_quirk 39
struct xenpf_platform_quirk {
/* IN variables. */
};
typedef struct xenpf_platform_quirk xenpf_platform_quirk_t;
#define XENPF_firmware_info 50
struct xenpf_firmware_info {
/* IN variables. */
/* OUT variables. */
union {
struct {
/* Int13, Fn48: Check Extensions Present. */
/* Int13, Fn08: Legacy Get Device Parameters. */
/* 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 {
} disk_mbr_signature; /* XEN_FW_DISK_MBR_SIGNATURE */
struct {
/* Int10, AX=4F15: Get EDID info. */
/* must refer to 128-byte buffer */
} vbeddc_info; /* XEN_FW_VBEDDC_INFO */
} u;
};
typedef struct xenpf_firmware_info xenpf_firmware_info_t;
#define XENPF_panic_init 40
struct xenpf_panic_init {
unsigned long panic_addr;
};
typedef struct xenpf_panic_init xenpf_panic_init_t;
struct xen_platform_op {
union {
struct xenpf_settime settime;
struct xenpf_add_memtype add_memtype;
struct xenpf_del_memtype del_memtype;
struct xenpf_read_memtype read_memtype;
struct xenpf_microcode_update microcode;
struct xenpf_platform_quirk platform_quirk;
struct xenpf_firmware_info firmware_info;
struct xenpf_panic_init panic_init;
} u;
};
typedef struct xen_platform_op xen_platform_op_t;
#endif /* __XEN_PUBLIC_PLATFORM_H__ */
/*
* Local variables:
* mode: C
* c-set-style: "BSD"
* c-basic-offset: 4
* tab-width: 4
* indent-tabs-mode: nil
* End:
*/