debuggers.hg

annotate 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
rev   line source
kaf24@1490 1 /*
kaf24@1490 2 * fixmap.h: compile-time virtual memory allocation
kaf24@1490 3 *
kaf24@1490 4 * This file is subject to the terms and conditions of the GNU General Public
kaf24@1490 5 * License. See the file "COPYING" in the main directory of this archive
kaf24@1490 6 * for more details.
kaf24@1490 7 *
kaf24@1490 8 * Copyright (C) 1998 Ingo Molnar
kaf24@1546 9 * Modifications for Xen are copyright (c) 2002-2004, K A Fraser
kaf24@1490 10 */
kaf24@1490 11
kaf24@1490 12 #ifndef _ASM_FIXMAP_H
kaf24@1490 13 #define _ASM_FIXMAP_H
kaf24@1490 14
kaf24@1490 15 #include <xen/config.h>
kaf24@1490 16 #include <asm/acpi.h>
kaf24@1490 17 #include <asm/apicdef.h>
kaf24@1490 18 #include <asm/page.h>
kaf24@1490 19
kaf24@1490 20 /*
kaf24@1490 21 * Here we define all the compile-time 'special' virtual
kaf24@1490 22 * addresses. The point is to have a constant address at
kaf24@1490 23 * compile time, but to set the physical address only
kaf24@1546 24 * in the boot process. We allocate these special addresses
kaf24@1546 25 * from the end of virtual memory backwards.
kaf24@1490 26 */
kaf24@1490 27 enum fixed_addresses {
kaf24@1490 28 #ifdef CONFIG_X86_LOCAL_APIC
mafetter@3545 29 FIX_APIC_BASE, /* local (CPU) APIC -- required for SMP or not */
kaf24@1490 30 #endif
kaf24@1490 31 #ifdef CONFIG_X86_IO_APIC
kaf24@1546 32 FIX_IO_APIC_BASE_0,
kaf24@1546 33 FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS-1,
kaf24@1490 34 #endif
kaf24@1490 35 #ifdef CONFIG_ACPI_BOOT
kaf24@1546 36 FIX_ACPI_BEGIN,
kaf24@1546 37 FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
kaf24@1490 38 #endif
kaf24@1546 39 __end_of_fixed_addresses
kaf24@1490 40 };
kaf24@1490 41
kaf24@3632 42 #define FIXADDR_TOP (IOREMAP_VIRT_END - PAGE_SIZE)
kaf24@1546 43 #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
kaf24@1546 44 #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
kaf24@1546 45
kaf24@3632 46 extern void __set_fixmap(
kaf24@3632 47 enum fixed_addresses idx, unsigned long p, unsigned long flags);
kaf24@1490 48
kaf24@1490 49 #define set_fixmap(idx, phys) \
kaf24@3632 50 __set_fixmap(idx, phys, PAGE_HYPERVISOR)
kaf24@1490 51
kaf24@1546 52 #define set_fixmap_nocache(idx, phys) \
kaf24@3632 53 __set_fixmap(idx, phys, PAGE_HYPERVISOR_NOCACHE)
kaf24@1490 54
kaf24@1546 55 #define fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
kaf24@1490 56
kaf24@1490 57 #endif