summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-28 18:08:43 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-28 18:09:03 +0100
commit944e9c2a28eb6b4d24708047c80db103c07417f8 (patch)
treed1f7b9cb4583378847174710a2f27f1e7b9d984f
parent4f915f16cf37aa6536ed2e53c0c62101de1ff975 (diff)
Remove duplicate 64bit file
xen.c is the same as in 32bit. * x86_64/xen.c: Remove file.
-rw-r--r--x86_64/Makefrag.am2
-rw-r--r--x86_64/xen.c78
2 files changed, 1 insertions, 79 deletions
diff --git a/x86_64/Makefrag.am b/x86_64/Makefrag.am
index 7c906eaf..fe9f559a 100644
--- a/x86_64/Makefrag.am
+++ b/x86_64/Makefrag.am
@@ -267,7 +267,7 @@ EXTRA_DIST += \
if PLATFORM_xen
libkernel_a_SOURCES += \
- x86_64/xen.c \
+ i386/i386/xen.c \
i386/i386/xen.h
gnumach_LINKFLAGS += \
diff --git a/x86_64/xen.c b/x86_64/xen.c
deleted file mode 100644
index d10ecf39..00000000
--- a/x86_64/xen.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2006-2009 Free Software Foundation
- *
- * This program is free software ; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation ; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY ; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the program ; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <kern/printf.h>
-#include <kern/debug.h>
-#include <kern/mach_clock.h>
-
-#include <mach/machine/eflags.h>
-#include <machine/thread.h>
-#include <machine/ipl.h>
-
-#include <machine/model_dep.h>
-
-unsigned long cr3;
-
-struct failsafe_callback_regs {
- unsigned int ds;
- unsigned int es;
- unsigned int fs;
- unsigned int gs;
- unsigned int ip;
- unsigned int cs_and_mask;
- unsigned int flags;
-};
-
-void hyp_failsafe_c_callback(struct failsafe_callback_regs *regs) {
- printf("Fail-Safe callback!\n");
- printf("IP: %08X CS: %4X DS: %4X ES: %4X FS: %4X GS: %4X FLAGS %08X MASK %04X\n", regs->ip, regs->cs_and_mask & 0xffff, regs->ds, regs->es, regs->fs, regs->gs, regs->flags, regs->cs_and_mask >> 16);
- panic("failsafe");
-}
-
-extern void return_to_iret;
-
-void hypclock_machine_intr(int old_ipl, void *ret_addr, struct i386_interrupt_state *regs, uint64_t delta) {
- if (ret_addr == &return_to_iret) {
- clock_interrupt(delta/1000, /* usec per tick */
- (regs->efl & EFL_VM) || /* user mode */
- ((regs->cs & 0x02) != 0), /* user mode */
- old_ipl == SPL0, /* base priority */
- regs->eip); /* interrupted eip */
- } else
- clock_interrupt(delta/1000, FALSE, FALSE, 0);
-}
-
-void hyp_p2m_init(void) {
- unsigned long nb_pfns = vm_page_table_size();
-#ifdef MACH_PSEUDO_PHYS
-#define P2M_PAGE_ENTRIES (PAGE_SIZE / sizeof(unsigned long))
- unsigned long *l3 = (unsigned long *)phystokv(pmap_grab_page()), *l2 = NULL;
- unsigned long i;
-
- for (i = 0; i < (nb_pfns + P2M_PAGE_ENTRIES) / P2M_PAGE_ENTRIES; i++) {
- if (!(i % P2M_PAGE_ENTRIES)) {
- l2 = (unsigned long *) phystokv(pmap_grab_page());
- l3[i / P2M_PAGE_ENTRIES] = kv_to_mfn(l2);
- }
- l2[i % P2M_PAGE_ENTRIES] = kv_to_mfn(&mfn_list[i * P2M_PAGE_ENTRIES]);
- }
-
- hyp_shared_info.arch.pfn_to_mfn_frame_list_list = kv_to_mfn(l3);
-#endif
- hyp_shared_info.arch.max_pfn = nb_pfns;
-}