ia64/xen-unstable

view xen/include/xen/multiboot2.h @ 19800:78962f85c562

IOMMU: Add two generic functions to vendor neutral interface

Add 2 generic functions into the vendor neutral iommu interface, The
reason is that from changeset 19732, there is only one global flag
"iommu_enabled" that controls iommu enablement for both vtd and amd
systems, so we need different code paths for vtd and amd iommu systems
if this flag has been turned on. Also, the early checking of
"iommu_enabled" in iommu_setup() is removed to prevent iommu
functionalities from been disabled on amd systems.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 19 08:41:50 2009 +0100 (2009-06-19)
parents d7d40acebdc1
children
line source
1 /*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License as
4 * published by the Free Software Foundation; either version 2 of the
5 * License, or (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 *
16 * Copyright IBM Corp. 2006, 2007
17 *
18 * Authors: Hollis Blanchard <hollisb@us.ibm.com>
19 *
20 */
22 #ifndef _MULTIBOOT2_H_
23 #define _MULTIBOOT2_H_
25 /* How many bytes from the start of the file we search for the header. */
26 #define MB2_HEADER_SEARCH 8192
28 /* The magic field should contain this. */
29 #define MB2_HEADER_MAGIC 0xe85250d6
31 /* Passed from the bootloader to the kernel. */
32 #define MB2_BOOTLOADER_MAGIC 0x36d76289
34 #define for_each_tag(_tag, _tags) \
35 for ((_tag) = (_tags); \
36 ((_tag)->key != MB2_TAG_END && (_tag)->key != 0); \
37 (_tag) = (void *)(_tag) + (_tag)->len)
39 typedef uint32_t mb2_word;
41 struct mb2_header
42 {
43 uint32_t magic;
44 };
46 struct mb2_tag_header
47 {
48 uint32_t key;
49 uint32_t len;
50 };
52 #define MB2_TAG_START 1
53 struct mb2_tag_start
54 {
55 struct mb2_tag_header header;
56 mb2_word size; /* Total size of all mb2 tags. */
57 };
59 #define MB2_TAG_NAME 2
60 struct mb2_tag_name
61 {
62 struct mb2_tag_header header;
63 char name[1];
64 };
66 #define MB2_TAG_MODULE 3
67 struct mb2_tag_module
68 {
69 struct mb2_tag_header header;
70 mb2_word addr;
71 mb2_word size;
72 unsigned char type[36];
73 unsigned char cmdline[1];
74 };
76 #define MB2_TAG_MEMORY 4
77 struct mb2_tag_memory
78 {
79 struct mb2_tag_header header;
80 mb2_word addr;
81 mb2_word size;
82 mb2_word type;
83 };
85 #define MB2_TAG_UNUSED 5
86 struct mb2_tag_unused
87 {
88 struct mb2_tag_header header;
89 };
91 #define MB2_TAG_END 0xffff
92 struct mb2_tag_end
93 {
94 struct mb2_tag_header header;
95 };
97 #endif