On szo, szept 15, 2012 at 22:49:42 +0200, LEVAI Daniel wrote:
[...]
> > > OpenBSD 5.2-current (GENERIC.MP) #6: Mon Aug 27 20:40:45 MDT 2012
> > > [email protected]:/usr/src/sys/arch/i386/compile/GENERIC.MP
> > > cpu0: AMD Phenom(tm) II X4 B50 Processor ("AuthenticAMD" 686-class, 512KB
> > > L2 cac
> > > he) 3.11 GHz
> > > cpu0:
> > > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CF
> > > LUSH,MMX,FXSR,SSE,SSE2,NXE,MMXX,FFXSR,3DNOW2,3DNOW,SSE3,CX16,POPCNT,LAHF,CMPLEG,
> > > SVM,AMCR8,ABM,SSE4A,MASSE,3DNOWP
> > > real mem = 536395776 (511MB)
> > > avail mem = 516698112 (492MB)
> > > mainbus0 at root
> > > bios0 at mainbus0: AT/286+ BIOS, date 06/23/99, BIOS32 rev. 0 @ 0xff046,
> > > SMBIOS
> > > rev. 2.4 @ 0xfd900 (11 entries)
> > > bios0: vendor Bochs version "Bochs" date 01/01/2007
> > > bios0: Bochs Bochs
> > > acpi0 at bios0: rev 0
> > > acpi0: sleep states S3 S4 S5
> > > acpi0: tables DSDT FACP SSDT APIC HPET
> > > acpi0: wakeup devices
> > > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > > acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> > > acpihpet0 at acpi0: 100000000 Hz
> > > acpiprt0 at acpi0: bus 0 (PCI0)
> > > mpbios0 at bios0: Intel MP Specification 1.4
> > > cpu0 at mainbus0: apid 0 (boot processor)
> > > kernel: protection fault trap, code=0
> > > Stopped at viac3_rnd+0x9f: rdmsr
> > > viac3_rnd(d0b025a0,d09e3268,d08f384b,3,4) at viac3_rnd+0x9f
> > > amd64_errata(d0b025a0,d0b025a0,d0bbbbf8,d078eb77,d0b025a0) at
> > > amd64_errata+0xb9
> > >
> > > cpu_init(d0b025a0,0,2000,0,d0bbbc04) at cpu_init+0x19
> > > cpu_attach(d164bfc0,d155e400,d0bbbc4c,d03ee29b,d078de30) at
> > > cpu_attach+0x297
> > > config_attach(d164bfc0,d09d45c0,d0bbbc4c,d078cb20,800,0,0,d08f3129,0,1,d09f21c0
> > > ,100f42,78bfbff) at config_attach+0x1bb
> > > mpbios_cpu(f51a5a9c,d16737c0,2,1,2) at mpbios_cpu+0x85
> > > mpbios_scan(d16737c0,d16737c0,d0bbbd60,d03ee29b,0) at mpbios_scan+0x2dc
> > > config_attach(d164bf80,d09d45a0,d0bbbd60,d0789d30,b) at
> > > config_attach+0x1bb
> > > biosattach(d164bfc0,d164bf80,d0bbbe58,d03ee29b,0) at biosattach+0x517
> > > config_attach(d164bfc0,d09d4560,d0bbbe58,d05afb60,30000000) at
> > > config_attach+0x
> > > 1bb
> > > ddb{0}>
> > >
> > >
> > > The host has an AMD Phenom(tm) II X4 B50 Processor.
[...]
Well, who knew; even a broken watch is right two times a day :)
I've started to rummage through the openbsd-cvs mails, and searched for
a similar commit, and after 'viac3_rnd' didn't yield much result, the
next search, 'amd64_errata' was fruitful.
There were two commits back in March by jsg@, namely to
sys/arch/i386/i386/amd64errata.c(r1.3) and
sys/arch/i386/include/specialreg.h(r1.41) about some workaround for AMD.
Reverting these two little patches solved this issue on the i386 guest:
--- src/sys/arch/i386/include/specialreg.h 2011/11/03 00:53:44 1.40
+++ src/sys/arch/i386/include/specialreg.h 2012/03/27 06:59:46 1.41
@@ -1,4 +1,4 @@
-/* $OpenBSD: specialreg.h,v 1.40 2011/11/02 23:53:44 jsg Exp $ */
+/* $OpenBSD: specialreg.h,v 1.41 2012/03/27 05:59:46 jsg Exp $ */
/* $NetBSD: specialreg.h,v 1.7 1994/10/27 04:16:26 cgd Exp $ */
/*-
@@ -305,6 +305,9 @@
#define MSR_GSBASE 0xc0000101 /* 64bit offset for gs: */
#define MSR_KERNELGSBASE 0xc0000102 /* storage for swapgs ins */
#define MSR_INT_PEN_MSG 0xc0010055 /* Interrupt pending
message */
+
+#define MSR_DE_CFG 0xc0011029 /* Decode Configuration */
+#define DE_CFG_721 0x00000001 /* errata 721 */
#define IPM_C1E_CMP_HLT 0x10000000
#define IPM_SMI_CMP_HLT 0x08000000
--- src/sys/arch/i386/i386/amd64errata.c 2008/06/26 06:42:10 1.2
+++ src/sys/arch/i386/i386/amd64errata.c 2012/03/27 06:59:46 1.3
@@ -1,4 +1,4 @@
-/* $OpenBSD: amd64errata.c,v 1.2 2008/06/26 05:42:10 ray Exp $ */
+/* $OpenBSD: amd64errata.c,v 1.3 2012/03/27 05:59:46 jsg Exp $ */
/* $NetBSD: errata.c,v 1.6 2007/02/05 21:05:45 ad Exp $ */
/*-
@@ -64,6 +64,8 @@ typedef struct errata {
typedef enum cpurev {
BH_E4, CH_CG, CH_D0, DH_CG, DH_D0, DH_E3, DH_E6, JH_E1,
JH_E6, SH_B0, SH_B3, SH_C0, SH_CG, SH_D0, SH_E4, SH_E5,
+ DR_BA, DR_B2, DR_B3, RB_C2, RB_C3, BL_C2, BL_C3, DA_C2,
+ DA_C3, HY_D0, HY_D1, HY_D1_G34R1, PH_E0, LN_B0,
OINK
} cpurev_t;
@@ -78,6 +80,11 @@ static const u_int cpurevs[] = {
SH_CG, 0x0000f4a, SH_CG, 0x0000f5a, SH_CG, 0x0000f7a,
SH_D0, 0x0010f40, SH_D0, 0x0010f50, SH_D0, 0x0010f70,
SH_E4, 0x0020f51, SH_E4, 0x0020f71, SH_E5, 0x0020f42,
+ DR_BA, 0x0100f2a, DR_B2, 0x0100f22, DR_B3, 0x0100f23,
+ RB_C2, 0x0100f42, RB_C3, 0x0100f43, BL_C2, 0x0100f52,
+ BL_C3, 0x0100f53, DA_C2, 0x0100f62, DA_C3, 0x0100f63,
+ HY_D0, 0x0100f80, HY_D1, 0x0100f81, HY_D1_G34R1, 0x0100f91,
+ PH_E0, 0x0100fa0, LN_B0, 0x0300f10,
OINK
};
@@ -117,6 +124,11 @@ static const uint8_t amd64_errata_set8[] = {
SH_D0, SH_D0, SH_D0, SH_E4, SH_E4, SH_E5, OINK
};
+static const uint8_t amd64_errata_set9[] = {
+ DR_BA, DR_B2, DR_B3, RB_C2, RB_C3, BL_C2, BL_C3, DA_C2,
+ DA_C3, HY_D0, HY_D1, HY_D1_G34R1, PH_E0, LN_B0, OINK
+};
+
static int amd64_errata_setmsr(struct cpu_info *, errata_t *);
static int amd64_errata_testmsr(struct cpu_info *, errata_t *);
@@ -222,6 +234,13 @@ static errata_t errata[] = {
},
#endif
#endif /* MULTIPROCESSOR */
+ /*
+ * 721: Processor May Incorrectly Update Stack Pointer
+ */
+ {
+ 721, 0, MSR_DE_CFG, amd64_errata_set9,
+ amd64_errata_setmsr, DE_CFG_721
+ },
};
static int
Here is the dmesg for the now working i386 guest:
OpenBSD 5.2-current (GENERIC.MP) #0: Sun Sep 16 00:03:59 CEST 2012
[email protected]:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: AMD Phenom(tm) II X4 B50 Processor ("AuthenticAMD" 686-class, 512KB L2
cache) 3.11 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,NXE,MMXX,FFXSR,3DNOW2,3DNOW,SSE3,CX16,POPCNT,LAHF,CMPLEG,SVM,AMCR8,ABM,SSE4A,MASSE,3DNOWP
real mem = 536399872 (511MB)
avail mem = 516698112 (492MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 06/23/99, BIOS32 rev. 0 @ 0xff046, SMBIOS
rev. 2.4 @ 0xfd8c0 (11 entries)
bios0: vendor Bochs version "Bochs" date 01/01/2011
bios0: Bochs Bochs
acpi0 at bios0: rev 0
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP SSDT APIC HPET SSDT
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
acpihpet0 at acpi0: 100000000 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
mpbios0 at bios0: Intel MP Specification 1.4
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 1000MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Phenom(tm) II X4 B50 Processor ("AuthenticAMD" 686-class, 512KB L2
cache) 3.11 GHz
cpu1:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,NXE,MMXX,FFXSR,3DNOW2,3DNOW,SSE3,CX16,POPCNT,LAHF,CMPLEG,SVM,AMCR8,ABM,SSE4A,MASSE,3DNOWP
mpbios0: bus 0 is type PCI
mpbios0: bus 1 is type ISA
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins
bios0: ROM list: 0xc0000/0x8c00 0xc9000/0xa00 0xca000/0x2400 0xee800/0x1800!
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <QEMU HARDDISK>
wd0: 16-sector PIO, LBA48, 5120MB, 10485760 sectors
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <QEMU, QEMU DVD-ROM, 1.2.> ATAPI 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03: apic 0 int 9
iic0 at piixpm0
iic0: addr 0x19 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00=0000 01=0000
02=0000 03=0000 04=0000 05=0000 06=0000 07=0000
iic0: addr 0x1b 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00=0000 01=0000
02=0000 03=0000 04=0000 05=0000 06=0000 07=0000
iic0: addr 0x1c 0f=00 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00=0000 01=0000
02=0000 03=0000 04=0000 05=0000 06=0000 07=0000
iic0: addr 0x1d 0f=00 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00=0000 01=0000
02=0000 03=0000 04=0000 05=0000 06=0000 07=0000
iic0: addr 0x1e 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00=0000 01=0000
02=0000 03=0000 04=0000 05=0000 06=0000 07=0000
iic0: addr 0x1f 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00=0000 01=0000
02=0000 03=0000 04=0000 05=0000 06=0000 07=0000
iic0: addr 0x29 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words
00=0000 01=0000 02=0000 03=0000 04=0000 05=0000 06=0000 07=0000
iic0: addr 0x2b 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words
00=0000 01=0000 02=0000 03=0000 04=0000 05=0000 06=0000 07=0000
iic0: addr 0x4c 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words
00=0000 01=0000 02=0000 03=0000 04=0000 05=0000 06=0000 07=0000
iic0: addr 0x4e 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words
00=0000 01=0000 02=0000 03=0000 04=0000 05=0000 06=0000 07=0000
vga1 at pci0 dev 2 function 0 "Cirrus Logic CL-GD5446" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
em0 at pci0 dev 3 function 0 "Intel PRO/1000MT (82540EM)" rev 0x03: apic 0 int
11, address 52:54:00:12:34:56
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
fd1 at fdc0 drive 1: density unknown
mtrr: Pentium Pro MTRR support
nvram: invalid checksum
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on wd0a (f1e4cd633878446e.a) swap on wd0b dump on wd0b
clock: unknown CMOS layout
Daniel
--
LÉVAI Dániel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F