Make vmware work with pae. Most of the fixups from drahn@
ok todd@
This commit is contained in:
parent
7e09f238dd
commit
31e72ea831
@ -1,12 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.8 2006/07/14 04:23:03 pvalchev Exp $
|
||||
|
||||
BROKEN= "PAE broke this, fix needed"
|
||||
# $OpenBSD: Makefile,v 1.9 2006/07/16 15:13:27 mcbride Exp $
|
||||
|
||||
ONLY_FOR_ARCHS= i386
|
||||
|
||||
COMMENT= "VMware emulator"
|
||||
DISTNAME= VMware-workstation-3.2.1-2242
|
||||
PKGNAME= vmware-3.2.1_2242p3
|
||||
PKGNAME= vmware-3.2.1_2242p4
|
||||
CATEGORIES= emulators
|
||||
MASTER_SITES= http://download3.vmware.com/software/wkst/
|
||||
MASTER_SITES0= http://monkey.org/~marius/vmware-openbsd/
|
||||
|
21
emulators/vmware/3/patches/patch-source_vmmon_include_x86_h
Normal file
21
emulators/vmware/3/patches/patch-source_vmmon_include_x86_h
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-source_vmmon_include_x86_h,v 1.1 2006/07/16 15:13:27 mcbride Exp $
|
||||
--- source/vmmon/include/x86.h.orig Fri Jul 14 11:13:04 2006
|
||||
+++ source/vmmon/include/x86.h Fri Jul 14 11:12:52 2006
|
||||
@@ -299,14 +299,16 @@ OpsizeValue(uint32 value, // IN: The 32
|
||||
|
||||
#define MSR_L2CFG 0x0000011e
|
||||
#if !defined(__NetBSD__) || !defined(MSR_TSC)
|
||||
+# if !defined(__OpenBSD__)
|
||||
#define MSR_TSC 0x00000010
|
||||
+# endif
|
||||
#define MSR_PERFCTR0 0x000000c1
|
||||
#define MSR_PERFCTR1 0x000000c2
|
||||
#define MSR_MTRR_CAP 0x000000fe
|
||||
#define MSD_EVNTSEL0 0x00000186
|
||||
#define MSR_EVNTSEL1 0x00000187
|
||||
#endif
|
||||
-#if !defined(__NetBSD__) || !defined(MSR_SYSENTER_CS)
|
||||
+#if (!defined(__NetBSD__) && !defined(__OpenBSD__)) || !defined(MSR_SYSENTER_CS)
|
||||
#define MSR_SYSENTER_CS 0x00000174
|
||||
#define MSR_SYSENTER_ESP 0x00000175
|
||||
#define MSR_SYSENTER_EIP 0x00000176
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-source_vmmon_openbsd_drv_c,v 1.2 2006/04/10 21:33:36 todd Exp $
|
||||
$OpenBSD: patch-source_vmmon_openbsd_drv_c,v 1.3 2006/07/16 15:13:27 mcbride Exp $
|
||||
--- source/vmmon/openbsd/drv.c.orig Sun Mar 14 15:58:50 2004
|
||||
+++ source/vmmon/openbsd/drv.c Mon Apr 10 16:13:41 2006
|
||||
+++ source/vmmon/openbsd/drv.c Fri Jul 14 11:15:49 2006
|
||||
@@ -414,6 +414,7 @@ vmmon_fake_clonedev(dev_t dev, int flag,
|
||||
#endif
|
||||
|
||||
@ -9,3 +9,19 @@ $OpenBSD: patch-source_vmmon_openbsd_drv_c,v 1.2 2006/04/10 21:33:36 todd Exp $
|
||||
|
||||
return ENXIO;
|
||||
}
|
||||
@@ -436,6 +437,7 @@ vmmon_alloc_low_pages(struct vmx86_softc
|
||||
int error, n;
|
||||
extern paddr_t avail_end;
|
||||
struct rmem_pgrange *pgrp;
|
||||
+#if !defined(__OpenBSD__)
|
||||
#if 0
|
||||
#define ISA_DMA_BOUNCE_THRESHOLD (16UL * 1024 * 1024)
|
||||
#else
|
||||
@@ -445,6 +447,7 @@ vmmon_alloc_low_pages(struct vmx86_softc
|
||||
* So just use any pages we can get.
|
||||
*/
|
||||
#define ISA_DMA_BOUNCE_THRESHOLD (3072UL * 1024 * 1024)
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
if (numPages == 0)
|
||||
|
31
emulators/vmware/3/patches/patch-source_vmmon_openbsd_host_c
Normal file
31
emulators/vmware/3/patches/patch-source_vmmon_openbsd_host_c
Normal file
@ -0,0 +1,31 @@
|
||||
$OpenBSD: patch-source_vmmon_openbsd_host_c,v 1.1 2006/07/16 15:13:27 mcbride Exp $
|
||||
--- source/vmmon/openbsd/host.c.orig Sun Mar 14 21:58:50 2004
|
||||
+++ source/vmmon/openbsd/host.c Sun Jul 16 12:31:29 2006
|
||||
@@ -59,6 +59,8 @@ lyaev Exp $
|
||||
#include <sys/proc.h>
|
||||
|
||||
#include <machine/pio.h>
|
||||
+#include <uvm/uvm_extern.h>
|
||||
+#include <machine/pmap.h>
|
||||
|
||||
#include <uvm/uvm_extern.h>
|
||||
#include <uvm/uvm_param.h>
|
||||
@@ -153,14 +155,11 @@ int host_unlock_ppn(PPN ppn)
|
||||
static INLINE MPN
|
||||
HostifVa2Mpn(VA addr)
|
||||
{
|
||||
- pt_entry_t *pteptr = (pt_entry_t *)vtopte((vaddr_t)addr);
|
||||
- PTE pte;
|
||||
-
|
||||
- pte = *pteptr;
|
||||
- if (pte & PTE_P)
|
||||
- return PTE_2_PFN(pte);
|
||||
- else
|
||||
+ paddr_t pa;
|
||||
+ if (pmap_extract(vm_map_pmap(&curproc->p_vmspace->vm_map), addr, &pa)
|
||||
+ == FALSE)
|
||||
return 0;
|
||||
+ return (pa >> PAGE_SHIFT);
|
||||
}
|
||||
|
||||
/*
|
@ -1,13 +1,10 @@
|
||||
$OpenBSD: patch-source_vmmon_openbsd_rmem_h,v 1.5 2006/04/11 14:10:53 todd Exp $
|
||||
--- source/vmmon/openbsd/rmem.h.orig 2004-02-05 11:10:33.000000000 -0600
|
||||
+++ source/vmmon/openbsd/rmem.h 2004-02-05 11:10:33.000000000 -0600
|
||||
@@ -0,0 +1,21 @@
|
||||
+/*
|
||||
+ * rmem.h
|
||||
+ *
|
||||
+ * Copyright (c) 2004 Marius Aamodt Eriksen <marius@monkey.org>
|
||||
+ * All rights reserved.
|
||||
+ *
|
||||
$OpenBSD: patch-source_vmmon_openbsd_rmem_h,v 1.6 2006/07/16 15:13:27 mcbride Exp $
|
||||
--- source/vmmon/openbsd/rmem.h.orig Fri Feb 13 06:40:21 2004
|
||||
+++ source/vmmon/openbsd/rmem.h Sun Jul 16 08:03:26 2006
|
||||
@@ -4,6 +4,27 @@
|
||||
* Copyright (c) 2004 Marius Aamodt Eriksen <marius@monkey.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
@ -23,3 +20,12 @@ $OpenBSD: patch-source_vmmon_openbsd_rmem_h,v 1.5 2006/04/11 14:10:53 todd Exp $
|
||||
+TAILQ_HEAD(rmem_pglist, rmem_pgrange);
|
||||
+
|
||||
+#endif /* _RMEM_H */
|
||||
+/*
|
||||
+ * rmem.h
|
||||
+ *
|
||||
+ * Copyright (c) 2004 Marius Aamodt Eriksen <marius@monkey.org>
|
||||
+ * All rights reserved.
|
||||
+ *
|
||||
* $Id: patch-source_vmmon_openbsd_rmem_h,v 1.6 2006/07/16 15:13:27 mcbride Exp $
|
||||
*/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user