debuggers.hg

view xen/include/asm-x86/fixmap.h @ 3632:fec8b1778268

bitkeeper revision 1.1159.212.60 (41febc4bKKSkh9u-Zes9v2CmBuLZxA)

More bootstrap fixes for x86/64. Next thing to do is sort out the IDT and
get traps.c working; then we can get rid of a bunch of dummy labels from
end of boot/x86_64.S. We're also going to need some kind of entry.S before
we can safely enable interrupts. Also bear in mind that not all of physical
RAM may be mapped (only first 1GB) and no m2p table is yet allocated or
mapped. Plenty to be done!
author kaf24@viper.(none)
date Mon Jan 31 23:16:27 2005 +0000 (2005-01-31)
parents 6b76ae4b9ea7
children bbe8541361dd
line source
1 /*
2 * fixmap.h: compile-time virtual memory allocation
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1998 Ingo Molnar
9 * Modifications for Xen are copyright (c) 2002-2004, K A Fraser
10 */
12 #ifndef _ASM_FIXMAP_H
13 #define _ASM_FIXMAP_H
15 #include <xen/config.h>
16 #include <asm/acpi.h>
17 #include <asm/apicdef.h>
18 #include <asm/page.h>
20 /*
21 * Here we define all the compile-time 'special' virtual
22 * addresses. The point is to have a constant address at
23 * compile time, but to set the physical address only
24 * in the boot process. We allocate these special addresses
25 * from the end of virtual memory backwards.
26 */
27 enum fixed_addresses {
28 #ifdef CONFIG_X86_LOCAL_APIC
29 FIX_APIC_BASE, /* local (CPU) APIC -- required for SMP or not */
30 #endif
31 #ifdef CONFIG_X86_IO_APIC
32 FIX_IO_APIC_BASE_0,
33 FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS-1,
34 #endif
35 #ifdef CONFIG_ACPI_BOOT
36 FIX_ACPI_BEGIN,
37 FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
38 #endif
39 __end_of_fixed_addresses
40 };
42 #define FIXADDR_TOP (IOREMAP_VIRT_END - PAGE_SIZE)
43 #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
44 #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
46 extern void __set_fixmap(
47 enum fixed_addresses idx, unsigned long p, unsigned long flags);
49 #define set_fixmap(idx, phys) \
50 __set_fixmap(idx, phys, PAGE_HYPERVISOR)
52 #define set_fixmap_nocache(idx, phys) \
53 __set_fixmap(idx, phys, PAGE_HYPERVISOR_NOCACHE)
55 #define fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
57 #endif