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. 23288917Sroyger * 24288917Sroyger * Copyright (c) 2006, Keir Fraser 25181624Skmacy */ 26181624Skmacy 27181624Skmacy#ifndef __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ 28181624Skmacy#define __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ 29181624Skmacy 30181624Skmacy#define HVM_INFO_PFN 0x09F 31181624Skmacy#define HVM_INFO_OFFSET 0x800 32181624Skmacy#define HVM_INFO_PADDR ((HVM_INFO_PFN << 12) + HVM_INFO_OFFSET) 33181624Skmacy 34251767Sgibbs/* Maximum we can support with current vLAPIC ID mapping. */ 35251767Sgibbs#define HVM_MAX_VCPUS 128 36251767Sgibbs 37181624Skmacystruct hvm_info_table { 38181624Skmacy char signature[8]; /* "HVM INFO" */ 39181624Skmacy uint32_t length; 40181624Skmacy uint8_t checksum; 41251767Sgibbs 42251767Sgibbs /* Should firmware build APIC descriptors (APIC MADT / MP BIOS)? */ 43181624Skmacy uint8_t apic_mode; 44251767Sgibbs 45251767Sgibbs /* How many CPUs does this domain have? */ 46181624Skmacy uint32_t nr_vcpus; 47251767Sgibbs 48251767Sgibbs /* 49251767Sgibbs * MEMORY MAP provided by HVM domain builder. 50251767Sgibbs * Notes: 51251767Sgibbs * 1. page_to_phys(x) = x << 12 52251767Sgibbs * 2. If a field is zero, the corresponding range does not exist. 53251767Sgibbs */ 54251767Sgibbs /* 55251767Sgibbs * 0x0 to page_to_phys(low_mem_pgend)-1: 56251767Sgibbs * RAM below 4GB (except for VGA hole 0xA0000-0xBFFFF) 57251767Sgibbs */ 58251767Sgibbs uint32_t low_mem_pgend; 59251767Sgibbs /* 60251767Sgibbs * page_to_phys(reserved_mem_pgstart) to 0xFFFFFFFF: 61251767Sgibbs * Reserved for special memory mappings 62251767Sgibbs */ 63251767Sgibbs uint32_t reserved_mem_pgstart; 64251767Sgibbs /* 65251767Sgibbs * 0x100000000 to page_to_phys(high_mem_pgend)-1: 66251767Sgibbs * RAM above 4GB 67251767Sgibbs */ 68251767Sgibbs uint32_t high_mem_pgend; 69251767Sgibbs 70251767Sgibbs /* Bitmap of which CPUs are online at boot time. */ 71251767Sgibbs uint8_t vcpu_online[(HVM_MAX_VCPUS + 7)/8]; 72181624Skmacy}; 73181624Skmacy 74181624Skmacy#endif /* __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ */ 75