aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-05-08 14:32:11 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-05-08 14:32:11 +0100
commit84d54d5d8b3155ff68be6f683f43d25d4dc9c5a8 (patch)
tree241446d05b35c8145a6def1ed585e6aca0168949 /extras/mini-os
parent1aa3c54a31a5aec90f3705a37258988a69279308 (diff)
downloadxen-84d54d5d8b3155ff68be6f683f43d25d4dc9c5a8.tar.gz
xen-84d54d5d8b3155ff68be6f683f43d25d4dc9c5a8.tar.bz2
xen-84d54d5d8b3155ff68be6f683f43d25d4dc9c5a8.zip
i386: Remove non-PAE hypervisor build target.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'extras/mini-os')
-rw-r--r--extras/mini-os/Config.mk8
-rw-r--r--extras/mini-os/arch/x86/arch.mk5
-rw-r--r--extras/mini-os/arch/x86/mm.c15
-rw-r--r--extras/mini-os/arch/x86/setup.c2
-rw-r--r--extras/mini-os/arch/x86/traps.c5
-rw-r--r--extras/mini-os/arch/x86/x86_32.S4
-rw-r--r--extras/mini-os/include/types.h6
-rw-r--r--extras/mini-os/include/x86/arch_limits.h2
-rw-r--r--extras/mini-os/include/x86/arch_mm.h30
-rw-r--r--extras/mini-os/include/x86/x86_32/hypercall-x86_32.h12
10 files changed, 7 insertions, 82 deletions
diff --git a/extras/mini-os/Config.mk b/extras/mini-os/Config.mk
index e38fae99cb..1eb68d2f4b 100644
--- a/extras/mini-os/Config.mk
+++ b/extras/mini-os/Config.mk
@@ -2,9 +2,6 @@
MINI-OS_ROOT=$(XEN_ROOT)/extras/mini-os
export MINI-OS_ROOT
-ifeq ($(XEN_TARGET_ARCH),x86_32)
-export pae ?= y
-endif
libc = $(stubdom)
XEN_INTERFACE_VERSION := 0x00030205
@@ -25,7 +22,6 @@ TARGET_ARCH_DIR := arch/$(TARGET_ARCH_FAM)
# Export these variables for possible use in architecture dependent makefiles.
export TARGET_ARCH_DIR
export TARGET_ARCH_FAM
-export XEN_TARGET_X86_PAE
# This is used for architecture specific links.
# This can be overwritten from arch specific rules.
@@ -70,7 +66,3 @@ endif
ifneq ($(CAMLDIR),)
caml=y
endif
-
-ifeq ($(pae),y)
-DEF_CPPFLAGS += -DCONFIG_X86_PAE
-endif
diff --git a/extras/mini-os/arch/x86/arch.mk b/extras/mini-os/arch/x86/arch.mk
index 1680362789..b27f322316 100644
--- a/extras/mini-os/arch/x86/arch.mk
+++ b/extras/mini-os/arch/x86/arch.mk
@@ -9,11 +9,6 @@ ARCH_LDFLAGS := -m elf_i386
ARCH_ASFLAGS := -m32
EXTRA_INC += $(TARGET_ARCH_FAM)/$(XEN_TARGET_ARCH)
EXTRA_SRC += arch/$(EXTRA_INC)
-
-ifeq ($(XEN_TARGET_X86_PAE),y)
-ARCH_CFLAGS += -DCONFIG_X86_PAE=1
-ARCH_ASFLAGS += -DCONFIG_X86_PAE=1
-endif
endif
ifeq ($(XEN_TARGET_ARCH),x86_64)
diff --git a/extras/mini-os/arch/x86/mm.c b/extras/mini-os/arch/x86/mm.c
index 8bc90eddea..1ef083aca8 100644
--- a/extras/mini-os/arch/x86/mm.c
+++ b/extras/mini-os/arch/x86/mm.c
@@ -79,13 +79,11 @@ void new_pt_frame(unsigned long *pt_pfn, unsigned long prev_l_mfn,
prot_t = L2_PROT;
pincmd = MMUEXT_PIN_L1_TABLE;
break;
-#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
case L2_FRAME:
prot_e = L2_PROT;
prot_t = L3_PROT;
pincmd = MMUEXT_PIN_L2_TABLE;
break;
-#endif
#if defined(__x86_64__)
case L3_FRAME:
prot_e = L3_PROT;
@@ -102,11 +100,8 @@ void new_pt_frame(unsigned long *pt_pfn, unsigned long prev_l_mfn,
/* Update the entry */
#if defined(__x86_64__)
tab = pte_to_virt(tab[l4_table_offset(pt_page)]);
- tab = pte_to_virt(tab[l3_table_offset(pt_page)]);
#endif
-#if defined(CONFIG_X86_PAE)
tab = pte_to_virt(tab[l3_table_offset(pt_page)]);
-#endif
mmu_updates[0].ptr = ((pgentry_t)tab[l2_table_offset(pt_page)] & PAGE_MASK) +
sizeof(pgentry_t) * l1_table_offset(pt_page);
@@ -164,7 +159,6 @@ static int need_pt_frame(unsigned long virt_address, int level)
} else
#endif
-#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
if(level == L2_FRAME)
{
#if defined(__x86_64__)
@@ -181,7 +175,6 @@ static int need_pt_frame(unsigned long virt_address, int level)
return 1;
} else
-#endif /* defined(__x86_64__) || defined(CONFIG_X86_PAE) */
/* Always need l1 frames */
if(level == L1_FRAME)
@@ -236,7 +229,6 @@ void build_pagetable(unsigned long *start_pfn, unsigned long *max_pfn)
mfn = pte_to_mfn(page);
tab = to_virt(mfn_to_pfn(mfn) << PAGE_SHIFT);
#endif
-#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
offset = l3_table_offset(start_address);
/* Need new L2 pt frame */
if(!(start_address & L2_MASK))
@@ -246,7 +238,6 @@ void build_pagetable(unsigned long *start_pfn, unsigned long *max_pfn)
page = tab[offset];
mfn = pte_to_mfn(page);
tab = to_virt(mfn_to_pfn(mfn) << PAGE_SHIFT);
-#endif
offset = l2_table_offset(start_address);
/* Need new L1 pt frame */
if(!(start_address & L1_MASK))
@@ -298,12 +289,10 @@ static void set_readonly(void *text, void *etext)
mfn = pte_to_mfn(page);
tab = to_virt(mfn_to_pfn(mfn) << PAGE_SHIFT);
#endif
-#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
offset = l3_table_offset(start_address);
page = tab[offset];
mfn = pte_to_mfn(page);
tab = to_virt(mfn_to_pfn(mfn) << PAGE_SHIFT);
-#endif
offset = l2_table_offset(start_address);
page = tab[offset];
mfn = pte_to_mfn(page);
@@ -382,13 +371,11 @@ static pgentry_t *get_pgt(unsigned long addr)
mfn = pte_to_mfn(tab[offset]);
tab = mfn_to_virt(mfn);
#endif
-#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
offset = l3_table_offset(addr);
if (!(tab[offset] & _PAGE_PRESENT))
return NULL;
mfn = pte_to_mfn(tab[offset]);
tab = mfn_to_virt(mfn);
-#endif
offset = l2_table_offset(addr);
if (!(tab[offset] & _PAGE_PRESENT))
return NULL;
@@ -418,7 +405,6 @@ static pgentry_t *need_pgt(unsigned long addr)
mfn = pte_to_mfn(tab[offset]);
tab = mfn_to_virt(mfn);
#endif
-#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
offset = l3_table_offset(addr);
if (!(tab[offset] & _PAGE_PRESENT)) {
pt_pfn = virt_to_pfn(alloc_page());
@@ -427,7 +413,6 @@ static pgentry_t *need_pgt(unsigned long addr)
ASSERT(tab[offset] & _PAGE_PRESENT);
mfn = pte_to_mfn(tab[offset]);
tab = mfn_to_virt(mfn);
-#endif
offset = l2_table_offset(addr);
if (!(tab[offset] & _PAGE_PRESENT)) {
pt_pfn = virt_to_pfn(alloc_page());
diff --git a/extras/mini-os/arch/x86/setup.c b/extras/mini-os/arch/x86/setup.c
index 066c87f5b7..ca97131315 100644
--- a/extras/mini-os/arch/x86/setup.c
+++ b/extras/mini-os/arch/x86/setup.c
@@ -53,7 +53,7 @@ extern char shared_info[PAGE_SIZE];
void hypervisor_callback(void);
void failsafe_callback(void);
-#if !defined(CONFIG_X86_PAE)
+#if defined(__x86_64__)
#define __pte(x) ((pte_t) { (x) } )
#else
#define __pte(x) ({ unsigned long long _x = (x); \
diff --git a/extras/mini-os/arch/x86/traps.c b/extras/mini-os/arch/x86/traps.c
index 2d65c312d2..5719f741e1 100644
--- a/extras/mini-os/arch/x86/traps.c
+++ b/extras/mini-os/arch/x86/traps.c
@@ -104,11 +104,9 @@ void page_walk(unsigned long virt_address)
tab = pte_to_virt(page);
printk(" L4 = %"PRIpte" (%p) [offset = %lx]\n", page, tab, l4_table_offset(addr));
#endif
-#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
page = tab[l3_table_offset(addr)];
tab = pte_to_virt(page);
printk(" L3 = %"PRIpte" (%p) [offset = %lx]\n", page, tab, l3_table_offset(addr));
-#endif
page = tab[l2_table_offset(addr)];
tab = pte_to_virt(page);
printk(" L2 = %"PRIpte" (%p) [offset = %lx]\n", page, tab, l2_table_offset(addr));
@@ -129,12 +127,11 @@ static int handle_cow(unsigned long addr) {
return 0;
tab = pte_to_virt(page);
#endif
-#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
page = tab[l3_table_offset(addr)];
if (!(page & _PAGE_PRESENT))
return 0;
tab = pte_to_virt(page);
-#endif
+
page = tab[l2_table_offset(addr)];
if (!(page & _PAGE_PRESENT))
return 0;
diff --git a/extras/mini-os/arch/x86/x86_32.S b/extras/mini-os/arch/x86/x86_32.S
index 7f01851f0c..1dfaf12524 100644
--- a/extras/mini-os/arch/x86/x86_32.S
+++ b/extras/mini-os/arch/x86/x86_32.S
@@ -8,11 +8,7 @@
.ascii ",VIRT_BASE=0x0" /* &_text from minios_x86_32.lds */
.ascii ",ELF_PADDR_OFFSET=0x0"
.ascii ",HYPERCALL_PAGE=0x2"
-#ifdef CONFIG_X86_PAE
.ascii ",PAE=yes"
-#else
- .ascii ",PAE=no"
-#endif
.ascii ",LOADER=generic"
.byte 0
.text
diff --git a/extras/mini-os/include/types.h b/extras/mini-os/include/types.h
index c11765167d..bf34373637 100644
--- a/extras/mini-os/include/types.h
+++ b/extras/mini-os/include/types.h
@@ -43,11 +43,7 @@ typedef unsigned long u_long;
typedef long long quad_t;
typedef unsigned long long u_quad_t;
-#if !defined(CONFIG_X86_PAE)
-typedef struct { unsigned long pte_low; } pte_t;
-#else
typedef struct { unsigned long pte_low, pte_high; } pte_t;
-#endif /* CONFIG_X86_PAE */
#elif defined(__x86_64__) || defined(__ia64__)
typedef long quad_t;
@@ -56,7 +52,7 @@ typedef unsigned long u_quad_t;
typedef struct { unsigned long pte; } pte_t;
#endif /* __i386__ || __x86_64__ */
-#if !defined(CONFIG_X86_PAE)
+#ifdef __x86_64__
#define __pte(x) ((pte_t) { (x) } )
#else
#define __pte(x) ({ unsigned long long _x = (x); \
diff --git a/extras/mini-os/include/x86/arch_limits.h b/extras/mini-os/include/x86/arch_limits.h
index 7f0351c67f..41f86207dc 100644
--- a/extras/mini-os/include/x86/arch_limits.h
+++ b/extras/mini-os/include/x86/arch_limits.h
@@ -7,7 +7,7 @@
#ifdef __ASSEMBLY__
#define __PAGE_SIZE (1 << __PAGE_SHIFT)
#else
-#ifndef CONFIG_X86_PAE
+#ifdef __x86_64__
#define __PAGE_SIZE (1UL << __PAGE_SHIFT)
#else
#define __PAGE_SIZE (1ULL << __PAGE_SHIFT)
diff --git a/extras/mini-os/include/x86/arch_mm.h b/extras/mini-os/include/x86/arch_mm.h
index 7ad8bc14be..98876b130b 100644
--- a/extras/mini-os/include/x86/arch_mm.h
+++ b/extras/mini-os/include/x86/arch_mm.h
@@ -44,24 +44,6 @@
#if defined(__i386__)
-#if !defined(CONFIG_X86_PAE)
-
-#define L2_PAGETABLE_SHIFT 22
-
-#define L1_PAGETABLE_ENTRIES 1024
-#define L2_PAGETABLE_ENTRIES 1024
-
-#define PADDR_BITS 32
-#define PADDR_MASK (~0UL)
-
-#define NOT_L1_FRAMES 1
-#define PRIpte "08lx"
-#ifndef __ASSEMBLY__
-typedef unsigned long pgentry_t;
-#endif
-
-#else /* defined(CONFIG_X86_PAE) */
-
#define L2_PAGETABLE_SHIFT 21
#define L3_PAGETABLE_SHIFT 30
@@ -85,8 +67,6 @@ typedef unsigned long pgentry_t;
typedef uint64_t pgentry_t;
#endif
-#endif /* !defined(CONFIG_X86_PAE) */
-
#elif defined(__x86_64__)
#define L2_PAGETABLE_SHIFT 21
@@ -122,10 +102,8 @@ typedef unsigned long pgentry_t;
(((_a) >> L1_PAGETABLE_SHIFT) & (L1_PAGETABLE_ENTRIES - 1))
#define l2_table_offset(_a) \
(((_a) >> L2_PAGETABLE_SHIFT) & (L2_PAGETABLE_ENTRIES - 1))
-#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
#define l3_table_offset(_a) \
(((_a) >> L3_PAGETABLE_SHIFT) & (L3_PAGETABLE_ENTRIES - 1))
-#endif
#if defined(__x86_64__)
#define l4_table_offset(_a) \
(((_a) >> L4_PAGETABLE_SHIFT) & (L4_PAGETABLE_ENTRIES - 1))
@@ -146,9 +124,7 @@ typedef unsigned long pgentry_t;
#define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED)
#define L1_PROT_RO (_PAGE_PRESENT|_PAGE_ACCESSED)
#define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY |_PAGE_USER)
-#if defined(CONFIG_X86_PAE)
#define L3_PROT (_PAGE_PRESENT)
-#endif /* CONFIG_X86_PAE */
#elif defined(__x86_64__)
#define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_USER)
#define L1_PROT_RO (_PAGE_PRESENT|_PAGE_ACCESSED|_PAGE_USER)
@@ -172,7 +148,7 @@ typedef unsigned long pgentry_t;
#ifndef __ASSEMBLY__
/* Definitions for machine and pseudophysical addresses. */
-#ifdef CONFIG_X86_PAE
+#ifdef __i386__
typedef unsigned long long paddr_t;
typedef unsigned long long maddr_t;
#else
@@ -225,14 +201,10 @@ static __inline__ paddr_t machine_to_phys(maddr_t machine)
#define virtual_to_l3(_virt) PT_BASE
#endif
-#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
#define virtual_to_l2(_virt) ({ \
unsigned long __virt2 = (_virt); \
(pgentry_t *) pte_to_virt(virtual_to_l3(__virt2)[l3_table_offset(__virt2)]); \
})
-#else
-#define virtual_to_l2(_virt) PT_BASE
-#endif
#define virtual_to_l1(_virt) ({ \
unsigned long __virt1 = (_virt); \
diff --git a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
index fbaa7ba16e..e11010b413 100644
--- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
+++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
@@ -220,12 +220,8 @@ static inline int
HYPERVISOR_update_va_mapping(
unsigned long va, pte_t new_val, unsigned long flags)
{
- unsigned long pte_hi = 0;
-#ifdef CONFIG_X86_PAE
- pte_hi = new_val.pte_high;
-#endif
return _hypercall4(int, update_va_mapping, va,
- new_val.pte_low, pte_hi, flags);
+ new_val.pte_low, new_val.pte_high, flags);
}
static inline int
@@ -267,12 +263,8 @@ static inline int
HYPERVISOR_update_va_mapping_otherdomain(
unsigned long va, pte_t new_val, unsigned long flags, domid_t domid)
{
- unsigned long pte_hi = 0;
-#ifdef CONFIG_X86_PAE
- pte_hi = new_val.pte_high;
-#endif
return _hypercall5(int, update_va_mapping_otherdomain, va,
- new_val.pte_low, pte_hi, flags, domid);
+ new_val.pte_low, new_val.pte_high, flags, domid);
}
static inline int