github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/cpvmm/vmm/config.h (about) 1 /* 2 * config.h: project-wide definitions 3 * 4 * Copyright (c) 2006-2010, Intel Corporation 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 11 * * Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * * Redistributions in binary form must reproduce the above 14 * copyright notice, this list of conditions and the following 15 * disclaimer in the documentation and/or other materials provided 16 * with the distribution. 17 * * Neither the name of the Intel Corporation nor the names of its 18 * contributors may be used to endorse or promote products derived 19 * from this software without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 32 * OF THE POSSIBILITY OF SUCH DAMAGE. 33 */ 34 35 #ifndef __CONFIG_H__ 36 #define __CONFIG_H__ 37 38 /* 39 * build/support flags 40 */ 41 42 /* address tboot will load and execute at */ 43 #define TBOOT_START 0x0804000 44 45 /* start address of tboot MLE page table, also the beginning of tboot memory */ 46 #define TBOOT_BASE_ADDR 0x0800000 47 48 /* address that tboot will do s3 resume at */ 49 /* (must be in lower 1MB (real mode) and less than Xen trampoline @ 0x8c000) */ 50 #define TBOOT_S3_WAKEUP_ADDR 0x8a000 51 52 53 /* these addrs must be in low memory so that they are mapped by the */ 54 /* kernel at startup */ 55 56 /* address/size for memory-resident serial log (when enabled) */ 57 #define TBOOT_SERIAL_LOG_ADDR 0x60000 58 #define TBOOT_SERIAL_LOG_SIZE 0x08000 59 60 /* address/size for modified e820 table */ 61 #define TBOOT_E820_COPY_ADDR (TBOOT_SERIAL_LOG_ADDR + \ 62 TBOOT_SERIAL_LOG_SIZE) 63 #define TBOOT_E820_COPY_SIZE 0x01800 64 65 /* address/size for modified VMM/kernel command line */ 66 #define TBOOT_KERNEL_CMDLINE_ADDR (TBOOT_E820_COPY_ADDR + \ 67 TBOOT_E820_COPY_SIZE) 68 #define TBOOT_KERNEL_CMDLINE_SIZE 0x0400 69 70 71 #ifndef NR_CPUS 72 #define NR_CPUS 256 73 #endif 74 75 #ifdef __ASSEMBLY__ 76 #define ENTRY(name) \ 77 .globl name; \ 78 .align 16,0x90; \ 79 name: 80 #else 81 extern char _start[]; /* start of tboot */ 82 extern char _end[]; /* end of tboot */ 83 #endif 84 85 86 #define COMPILE_TIME_ASSERT(e) \ 87 { \ 88 struct tmp { \ 89 int a : ((e) ? 1 : -1); \ 90 }; \ 91 } 92 93 94 #define __data __attribute__ ((__section__ (".data"))) 95 #define __text __attribute__ ((__section__ (".text"))) 96 #define __mlept __attribute__ ((__section__ (".mlept"))) 97 98 #define __packed __attribute__ ((packed)) 99 100 /* tboot log level */ 101 #define TBOOT_NONE "<0>" 102 #define TBOOT_ERR "<1>" 103 #define TBOOT_WARN "<2>" 104 #define TBOOT_INFO "<3>" 105 #define TBOOT_ALL "<4>" 106 107 #endif /* __CONFIG_H__ */ 108 109 110 /* 111 * Local variables: 112 * mode: C 113 * c-set-style: "BSD" 114 * c-basic-offset: 4 115 * tab-width: 4 116 * indent-tabs-mode: nil 117 * End: 118 */