1181624Skmacy/******************************************************************************
2181624Skmacy * hvm/hvm_info_table.h
3181624Skmacy *
4181624Skmacy * HVM parameter and information table, written into guest memory map.
5181624Skmacy *
6181624Skmacy * Permission is hereby granted, free of charge, to any person obtaining a copy
7181624Skmacy * of this software and associated documentation files (the "Software"), to
8181624Skmacy * deal in the Software without restriction, including without limitation the
9181624Skmacy * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10181624Skmacy * sell copies of the Software, and to permit persons to whom the Software is
11181624Skmacy * furnished to do so, subject to the following conditions:
12181624Skmacy *
13181624Skmacy * The above copyright notice and this permission notice shall be included in
14181624Skmacy * all copies or substantial portions of the Software.
15181624Skmacy *
16181624Skmacy * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17181624Skmacy * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18181624Skmacy * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19181624Skmacy * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20181624Skmacy * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21181624Skmacy * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22181624Skmacy * DEALINGS IN THE SOFTWARE.
23181624Skmacy */
24181624Skmacy
25181624Skmacy#ifndef __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__
26181624Skmacy#define __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__
27181624Skmacy
28181624Skmacy#define HVM_INFO_PFN         0x09F
29181624Skmacy#define HVM_INFO_OFFSET      0x800
30181624Skmacy#define HVM_INFO_PADDR       ((HVM_INFO_PFN << 12) + HVM_INFO_OFFSET)
31181624Skmacy
32251767Sgibbs/* Maximum we can support with current vLAPIC ID mapping. */
33251767Sgibbs#define HVM_MAX_VCPUS        128
34251767Sgibbs
35181624Skmacystruct hvm_info_table {
36181624Skmacy    char        signature[8]; /* "HVM INFO" */
37181624Skmacy    uint32_t    length;
38181624Skmacy    uint8_t     checksum;
39251767Sgibbs
40251767Sgibbs    /* Should firmware build APIC descriptors (APIC MADT / MP BIOS)? */
41181624Skmacy    uint8_t     apic_mode;
42251767Sgibbs
43251767Sgibbs    /* How many CPUs does this domain have? */
44181624Skmacy    uint32_t    nr_vcpus;
45251767Sgibbs
46251767Sgibbs    /*
47251767Sgibbs     * MEMORY MAP provided by HVM domain builder.
48251767Sgibbs     * Notes:
49251767Sgibbs     *  1. page_to_phys(x) = x << 12
50251767Sgibbs     *  2. If a field is zero, the corresponding range does not exist.
51251767Sgibbs     */
52251767Sgibbs    /*
53251767Sgibbs     *  0x0 to page_to_phys(low_mem_pgend)-1:
54251767Sgibbs     *    RAM below 4GB (except for VGA hole 0xA0000-0xBFFFF)
55251767Sgibbs     */
56251767Sgibbs    uint32_t    low_mem_pgend;
57251767Sgibbs    /*
58251767Sgibbs     *  page_to_phys(reserved_mem_pgstart) to 0xFFFFFFFF:
59251767Sgibbs     *    Reserved for special memory mappings
60251767Sgibbs     */
61251767Sgibbs    uint32_t    reserved_mem_pgstart;
62251767Sgibbs    /*
63251767Sgibbs     *  0x100000000 to page_to_phys(high_mem_pgend)-1:
64251767Sgibbs     *    RAM above 4GB
65251767Sgibbs     */
66251767Sgibbs    uint32_t    high_mem_pgend;
67251767Sgibbs
68251767Sgibbs    /* Bitmap of which CPUs are online at boot time. */
69251767Sgibbs    uint8_t     vcpu_online[(HVM_MAX_VCPUS + 7)/8];
70181624Skmacy};
71181624Skmacy
72181624Skmacy#endif /* __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ */
73