summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/identcpu.c12
-rw-r--r--sys/arch/amd64/amd64/mainbus.c20
-rw-r--r--sys/arch/amd64/conf/GENERIC6
-rw-r--r--sys/arch/amd64/conf/files.amd648
-rw-r--r--sys/arch/i386/conf/GENERIC6
-rw-r--r--sys/arch/i386/conf/files.i3868
-rw-r--r--sys/arch/i386/i386/machdep.c12
-rw-r--r--sys/arch/i386/i386/mainbus.c20
8 files changed, 64 insertions, 28 deletions
diff --git a/sys/arch/amd64/amd64/identcpu.c b/sys/arch/amd64/amd64/identcpu.c
index ed7dbd336d7..e074300642b 100644
--- a/sys/arch/amd64/amd64/identcpu.c
+++ b/sys/arch/amd64/amd64/identcpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: identcpu.c,v 1.62 2015/05/28 20:10:58 guenther Exp $ */
+/* $OpenBSD: identcpu.c,v 1.63 2015/07/21 03:38:22 reyk Exp $ */
/* $NetBSD: identcpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */
/*
@@ -56,6 +56,11 @@ int amd64_has_aesni;
#endif
int has_rdrand;
+#include "pvbus.h"
+#if NPVBUS > 0
+#include <dev/pv/pvvar.h>
+#endif
+
const struct {
u_int32_t bit;
char str[12];
@@ -561,6 +566,11 @@ identifycpu(struct cpu_info *ci)
if (cpu_ecxfeature & CPUIDECX_RDRAND)
has_rdrand = 1;
+#if NPVBUS > 0
+ if (cpu_ecxfeature & CPUIDECX_HV)
+ has_hv_cpuid = 1;
+#endif
+
if (ci->ci_feature_sefflags & SEFF0EBX_SMAP)
replacesmap();
}
diff --git a/sys/arch/amd64/amd64/mainbus.c b/sys/arch/amd64/amd64/mainbus.c
index b0dc4c04da4..4bfb0601f4d 100644
--- a/sys/arch/amd64/amd64/mainbus.c
+++ b/sys/arch/amd64/amd64/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.28 2015/03/14 03:38:46 jsg Exp $ */
+/* $OpenBSD: mainbus.c,v 1.29 2015/07/21 03:38:22 reyk Exp $ */
/* $NetBSD: mainbus.c,v 1.1 2003/04/26 18:39:29 fvdl Exp $ */
/*
@@ -48,7 +48,7 @@
#include "ipmi.h"
#include "bios.h"
#include "mpbios.h"
-#include "vmt.h"
+#include "pvbus.h"
#include <machine/cpuvar.h>
#include <machine/i82093var.h>
@@ -59,8 +59,8 @@
#include <dev/ipmivar.h>
#endif
-#if NVMT > 0
-#include <dev/vmtvar.h>
+#if NPVBUS > 0
+#include <dev/pv/pvvar.h>
#endif
#if NBIOS > 0
@@ -92,6 +92,9 @@ union mainbus_attach_args {
#if NBIOS > 0
struct bios_attach_args mba_bios;
#endif
+#if NPVBUS > 0
+ struct pvbus_attach_args mba_pvba;
+#endif
};
/*
@@ -170,10 +173,11 @@ mainbus_attach(struct device *parent, struct device *self, void *aux)
}
#endif
-#if NVMT > 0
- if (vmt_probe()) {
- mba.mba_busname = "vmt";
- config_found(self, &mba.mba_busname, mainbus_print);
+#if NPVBUS > 0
+ /* Probe first to hide the "not configured" message */
+ if (pvbus_probe()) {
+ mba.mba_pvba.pvba_busname = "pvbus";
+ config_found(self, &mba.mba_pvba.pvba_busname, mainbus_print);
}
#endif
diff --git a/sys/arch/amd64/conf/GENERIC b/sys/arch/amd64/conf/GENERIC
index cb96cf9aa6d..33e8361c22d 100644
--- a/sys/arch/amd64/conf/GENERIC
+++ b/sys/arch/amd64/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.390 2015/07/19 18:17:06 bmercer Exp $
+# $OpenBSD: GENERIC,v 1.391 2015/07/21 03:38:22 reyk Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -38,6 +38,7 @@ isa0 at pcib?
isa0 at amdpcib?
isa0 at tcpcib?
pci* at mainbus0
+pvbus0 at mainbus0
acpi0 at bios0
acpitimer* at acpi?
@@ -64,7 +65,8 @@ aibs* at acpi?
mpbios0 at bios0
ipmi0 at mainbus? disable # IPMI
-vmt0 at mainbus? # VMware Tools
+
+vmt0 at pvbus? # VMware Tools
option PCIVERBOSE
option USBVERBOSE
diff --git a/sys/arch/amd64/conf/files.amd64 b/sys/arch/amd64/conf/files.amd64
index 270dffd2cb7..57942f9410c 100644
--- a/sys/arch/amd64/conf/files.amd64
+++ b/sys/arch/amd64/conf/files.amd64
@@ -1,4 +1,4 @@
-# $OpenBSD: files.amd64,v 1.78 2015/07/17 22:52:28 tedu Exp $
+# $OpenBSD: files.amd64,v 1.79 2015/07/21 03:38:22 reyk Exp $
maxpartitions 16
maxusers 2 16 128
@@ -234,8 +234,10 @@ include "dev/onewire/files.onewire"
#
attach ipmi at mainbus
-# VMware Tools
-attach vmt at mainbus
+#
+# Paravirtual device bus
+#
+include "dev/pv/files.pv"
#
# device major numbers
diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC
index 13767a85c8f..a2378e6fc4d 100644
--- a/sys/arch/i386/conf/GENERIC
+++ b/sys/arch/i386/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.800 2015/07/19 18:17:06 bmercer Exp $
+# $OpenBSD: GENERIC,v 1.801 2015/07/21 03:38:22 reyk Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -42,10 +42,12 @@ acpi0 at bios?
mpbios0 at bios0
pcibios0 at bios0 flags 0x0000 # use 0x30 for a total verbose
ipmi0 at mainbus? disable # IPMI
-vmt0 at mainbus? # VMware Tools
esm0 at mainbus? # Dell Embedded Server Management
amdmsr0 at mainbus? # MSR access for AMD Geode LX CPUs with GP
+pvbus0 at mainbus0 # Paravirtual device bus
+vmt0 at pvbus? # VMware Tools
+
acpitimer* at acpi?
acpihpet* at acpi?
acpiac* at acpi?
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386
index a1b2c3b8b1c..25e96b1cbfe 100644
--- a/sys/arch/i386/conf/files.i386
+++ b/sys/arch/i386/conf/files.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: files.i386,v 1.224 2015/07/17 22:52:28 tedu Exp $
+# $OpenBSD: files.i386,v 1.225 2015/07/21 03:38:22 reyk Exp $
#
# new style config file for i386 architecture
#
@@ -392,8 +392,10 @@ file arch/i386/i386/acpi_wakecode.S acpi & !small_kernel
#
attach ipmi at mainbus
-# VMware Tools
-attach vmt at mainbus
+#
+# Paravirtual device bus
+#
+include "dev/pv/files.pv"
# Dell Embedded Systems Management
device esm
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 959832f4dc0..1dc4a2637fc 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.573 2015/07/16 23:03:40 sf Exp $ */
+/* $OpenBSD: machdep.c,v 1.574 2015/07/21 03:38:22 reyk Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -316,6 +316,11 @@ int allowaperture = 0;
int has_rdrand;
+#include "pvbus.h"
+#if NPVBUS > 0
+#include <dev/pv/pvvar.h>
+#endif
+
void winchip_cpu_setup(struct cpu_info *);
void amd_family5_setperf_setup(struct cpu_info *);
void amd_family5_setup(struct cpu_info *);
@@ -2011,6 +2016,11 @@ identifycpu(struct cpu_info *ci)
if (ci->ci_feature_sefflags & SEFF0EBX_SMAP)
replacesmap();
#endif
+
+#if NPVBUS > 0
+ if (cpu_ecxfeature & CPUIDECX_HV)
+ has_hv_cpuid = 1;
+#endif
}
#ifndef SMALL_KERNEL
diff --git a/sys/arch/i386/i386/mainbus.c b/sys/arch/i386/i386/mainbus.c
index 1af1664aa48..9a471600571 100644
--- a/sys/arch/i386/i386/mainbus.c
+++ b/sys/arch/i386/i386/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.50 2012/10/04 08:32:20 ehrhardt Exp $ */
+/* $OpenBSD: mainbus.c,v 1.51 2015/07/21 03:38:22 reyk Exp $ */
/* $NetBSD: mainbus.c,v 1.21 1997/06/06 23:14:20 thorpej Exp $ */
/*
@@ -52,9 +52,9 @@
#include "acpi.h"
#include "ipmi.h"
#include "esm.h"
-#include "vmt.h"
#include "vesabios.h"
#include "amdmsr.h"
+#include "pvbus.h"
#include <machine/cpuvar.h>
#include <machine/i82093var.h>
@@ -69,8 +69,8 @@
#include <dev/ipmivar.h>
#endif
-#if NVMT > 0
-#include <dev/vmtvar.h>
+#if NPVBUS > 0
+#include <dev/pv/pvvar.h>
#endif
#if NAMDMSR > 0
@@ -115,6 +115,9 @@ union mainbus_attach_args {
#if NESM > 0
struct esm_attach_args mba_eaa;
#endif
+#if NPVBUS > 0
+ struct pvbus_attach_args mba_pvba;
+#endif
};
/*
@@ -164,10 +167,11 @@ mainbus_attach(struct device *parent, struct device *self, void *aux)
}
#endif
-#if NVMT > 0
- if (vmt_probe()) {
- mba.mba_busname = "vmt";
- config_found(self, &mba.mba_busname, mainbus_print);
+#if NPVBUS > 0
+ /* Probe first to hide the "not configured" message */
+ if (pvbus_probe()) {
+ mba.mba_pvba.pvba_busname = "pvbus";
+ config_found(self, &mba.mba_pvba.pvba_busname, mainbus_print);
}
#endif