ia64/xen-unstable

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