Re: lockmgr exorcism

2013-04-04 Thread Ted Unangst
On Fri, Apr 05, 2013 at 02:06, Ted Unangst wrote:
> take 42. http://marc.info/?l=openbsd-tech&m=130999022613838&w=2
> 
> Updated diff follows below. Add rrwlocks. Make lockmgr a wrapper shim.

> + * Copyright (c) 2011 Thordur Bjornsson 

I suffered a minor highlighted text targeting failure here, but have
corrected thib's email in my tree. As change sensitive as scary
vfs diffs are, I believe the previously mailed version will suffice
for testing purposes.



lockmgr exorcism

2013-04-04 Thread Ted Unangst
take 42. http://marc.info/?l=openbsd-tech&m=130999022613838&w=2

Updated diff follows below. Add rrwlocks. Make lockmgr a wrapper shim.

Tests, oks, the whole nine yards, please. And maybe if I get lucky this
can get committed before it's two years old...

Index: kern/kern_lock.c
===
RCS file: /cvs/src/sys/kern/kern_lock.c,v
retrieving revision 1.39
diff -u -p -r1.39 kern_lock.c
--- kern/kern_lock.c28 Mar 2013 16:55:25 -  1.39
+++ kern/kern_lock.c5 Apr 2013 05:57:38 -
@@ -41,39 +41,10 @@
 #include 
 #include 
 
-
-/*
- * Locking primitives implementation.
- * Locks provide shared/exclusive synchronization.
- */
-
-/*
- * Acquire a resource.  We sleep on the address of the lk_sharecount
- * member normally; if waiting for it to drain we sleep on the address
- * of the lk_waitcount member instead.
- */
-#define ACQUIRE(lkp, error, extflags, drain, wanted)   \
-do {   \
-   for (error = 0; wanted; ) { \
-   if ((drain))\
-   (lkp)->lk_flags |= LK_WAITDRAIN;\
-   else\
-   (lkp)->lk_waitcount++;  \
-   error = tsleep((drain) ?\
-   &(lkp)->lk_waitcount : &(lkp)->lk_sharecount,   \
-   (lkp)->lk_prio, (lkp)->lk_wmesg, (lkp)->lk_timo);   \
-   if ((drain) == 0)   \
-   (lkp)->lk_waitcount--;  \
-   if (error)  \
-   break;  \
-   }   \
-} while (0)
-
-#defineSETHOLDER(lkp, pid, cpu_id) 
\
-   (lkp)->lk_lockholder = (pid)
-
-#defineWEHOLDIT(lkp, pid, cpu_id)  
\
-   ((lkp)->lk_lockholder == (pid))
+#ifdef MP_LOCKDEBUG
+/* CPU-dependent timing, needs this to be settable from ddb. */
+int __mp_lock_spinout = 2;
+#endif
 
 /*
  * Initialize a lock; required before use.
@@ -81,261 +52,46 @@ do {   
\
 void
 lockinit(struct lock *lkp, int prio, char *wmesg, int timo, int flags)
 {
+   KASSERT(flags == 0);
 
bzero(lkp, sizeof(struct lock));
-   lkp->lk_flags = flags & LK_EXTFLG_MASK;
-   lkp->lk_lockholder = LK_NOPROC;
-   lkp->lk_prio = prio;
-   lkp->lk_timo = timo;
-   lkp->lk_wmesg = wmesg;  /* just a name for spin locks */
+   rrw_init(&lkp->lk_lck, wmesg);
 }
 
-/*
- * Determine the status of a lock.
- */
 int
 lockstatus(struct lock *lkp)
 {
-   int lock_type = 0;
-
-   if (lkp->lk_exclusivecount != 0)
-   lock_type = LK_EXCLUSIVE;
-   else if (lkp->lk_sharecount != 0)
-   lock_type = LK_SHARED;
-   return (lock_type);
+   return (rrw_status(&lkp->lk_lck));
 }
 
-/*
- * Set, change, or release a lock.
- *
- * Shared requests increment the shared count. Exclusive requests set the
- * LK_WANT_EXCL flag (preventing further shared locks), and wait for already
- * accepted shared locks and shared-to-exclusive upgrades to go away.
- */
 int
-lockmgr(__volatile struct lock *lkp, u_int flags, void *notused)
+lockmgr(struct lock *lkp, u_int flags, void *notused)
 {
-   int error;
-   pid_t pid;
-   int extflags;
-   cpuid_t cpu_id;
-   struct proc *p = curproc;
-
-   error = 0;
-   extflags = (flags | lkp->lk_flags) & LK_EXTFLG_MASK;
-
-#ifdef DIAGNOSTIC
-   if (p == NULL)
-   panic("lockmgr: process context required");
-#endif 
-   /* Process context required. */
-   pid = p->p_pid;
-   cpu_id = cpu_number();
-
-   /*
-* Once a lock has drained, the LK_DRAINING flag is set and an
-* exclusive lock is returned. The only valid operation thereafter
-* is a single release of that exclusive lock. This final release
-* clears the LK_DRAINING flag and sets the LK_DRAINED flag. Any
-* further requests of any sort will result in a panic. The bits
-* selected for these two flags are chosen so that they will be set
-* in memory that is freed (freed memory is filled with 0xdeadbeef).
-*/
-   if (lkp->lk_flags & (LK_DRAINING|LK_DRAINED)) {
-#ifdef DIAGNOSTIC
-   if (lkp->lk_flags & LK_DRAINED)
-   panic("lockmgr: using decommissioned lock");
-   if ((flags & LK_TYPE_MASK) != LK_RELEASE ||
-   WEHOLDIT(lkp, pid, cpu_id) == 0)
-   pan

Re: Stolen memory

2013-04-04 Thread James Turner
On Thu, Apr 04, 2013 at 11:06:16PM +0200, Mark Kettenis wrote:
> Machines with Intel integrated graphics have this concept of stolen
> memory; system memory set aside by the BIOS for use by the graphics
> chip.  On OpenBSD we don't touch that memory since we don't want to
> step on the BIOS' toes.  We also assume that this memory is mapped in
> the graphics translation table (GTT).  So we reserve a block of the
> size of the stolen memory at the start of the aperture and never use
> it.
> 
> On modern machines this strategy doesn't make a lot of sense.  The
> size of the stolen memory can be larger than the graphics aperture,
> leaving inteldrm(4) no space to map framebuffers and other graphics
> objects.
> 
> The diff below gets rid of this policy on Sandy Bridge and Ivy Bridge
> CPUs, making the full aperture available for use by inteldrm(4).  This
> works fine on my x220, but before I commit this, I'd like to see a
> little bit more testing.  If you have a machine with Intel HD Graphics
> 2000/3000/2500/4000, please give this diff a try.  If possible, test
> the following:
> 
>  * Check that X still works properly.
> 
>  * Check that suspend/resume still works.  (Don't bother if
>suspend/resume doesn't work without this diff).
> 
>  * Disable the inteldrm driver (boot with the -c option, disable
>inteldrm at the UKC> prompt) and check if the VGA text console
>still works properly.
> 
> Thanks,
> 
> Mark
> 

All the above scenerios worked fine on a Dell XPS 13 with Intel HD
Graphics 3000.

-- 
James Turner



biowaittime

2013-04-04 Thread Ted Unangst
This is a stupid simple diff to see just how much time you spend
waiting for your disk. If you're into measuring that kind of thing.

Index: vfs_bio.c
===
RCS file: /cvs/src/sys/kern/vfs_bio.c,v
retrieving revision 1.146
diff -u -p -r1.146 vfs_bio.c
--- vfs_bio.c   17 Feb 2013 17:39:29 -  1.146
+++ vfs_bio.c   5 Apr 2013 01:34:03 -
@@ -1153,6 +1153,8 @@ buf_daemon(struct proc *p)
}
 }
 
+uint64_t biowaittime;
+
 /*
  * Wait for operations on the buffer to complete.
  * When they do, extract and return the I/O's error value.
@@ -1161,12 +1163,18 @@ int
 biowait(struct buf *bp)
 {
int s;
+   struct timespec before, after, diff;
 
KASSERT(!(bp->b_flags & B_ASYNC));
 
s = splbio();
+   nanotime(&before);
while (!ISSET(bp->b_flags, B_DONE))
tsleep(bp, PRIBIO + 1, "biowait", 0);
+   nanotime(&after);
+   timespecsub(&after, &before, &diff);
+   biowaittime += diff.tv_nsec;
+   biowaittime += diff.tv_sec * 10L;
splx(s);
 
/* check for interruption of I/O (e.g. via NFS), then errors. */



libc warnings

2013-04-04 Thread Ted Unangst
To prevent the future recurrence of some rather serious libc build
bugs, such as a macro like strong_alias suddenly turning into an
implicit function prototype, I think we should add some warnings and
use as much -Werror as possible. (I'm not entirely sure this would
have caught the missing strong_alias macro, but it seems like a good
idea anyway.)

This adds a (very) few warnings and fixes some of the fallout. The
diff is a bit of a mix of things, since I initially tried -Wall before
I ran away screaming. Over time, maybe some brave pioneers can expand
the frontier.

Index: Makefile.inc
===
RCS file: /cvs/src/lib/libc/Makefile.inc,v
retrieving revision 1.18
diff -u -p -r1.18 Makefile.inc
--- Makefile.inc28 Mar 2013 16:43:08 -  1.18
+++ Makefile.inc5 Apr 2013 01:22:39 -
@@ -13,6 +13,8 @@ CFLAGS+=  -I${LIBCSRCDIR}/include
 # Include link-time warnings about unsafe API uses (ie. strcpy)
 CFLAGS+=-DAPIWARN
 
+CFLAGS+=-Wimplicit -Wparentheses -Wbounded -Werror
+
 .if (${YP:L} == "yes")
 CFLAGS+=-DYP -I${LIBCSRCDIR}/yp
 .endif
Index: crypt/crypt2.c
===
RCS file: /cvs/src/lib/libc/crypt/crypt2.c,v
retrieving revision 1.3
diff -u -p -r1.3 crypt2.c
--- crypt/crypt2.c  8 Aug 2005 08:05:33 -   1.3
+++ crypt/crypt2.c  5 Apr 2013 01:22:39 -
@@ -59,6 +59,9 @@
 extern const u_char _des_bits8[8];
 extern const u_int32_t _des_bits32[32];
 extern int _des_initialised;
+void   _des_init(void);
+void _des_setup_salt(int32_t salt);
+int _des_do_des(u_int32_t , u_int32_t , u_int32_t *, u_int32_t *, int);
 
 int
 setkey(const char *key)
Index: gen/getcwd.c
===
RCS file: /cvs/src/lib/libc/gen/getcwd.c,v
retrieving revision 1.17
diff -u -p -r1.17 getcwd.c
--- gen/getcwd.c27 May 2006 18:06:29 -  1.17
+++ gen/getcwd.c5 Apr 2013 01:22:39 -
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 int __getcwd(char *buf, size_t len);
 
Index: gen/getgrent.c
===
RCS file: /cvs/src/lib/libc/gen/getgrent.c,v
retrieving revision 1.37
diff -u -p -r1.37 getgrent.c
--- gen/getgrent.c  25 Apr 2011 20:10:10 -  1.37
+++ gen/getgrent.c  5 Apr 2013 01:22:39 -
@@ -392,7 +392,7 @@ grscan(int search, gid_t gid, const char
goto found_it;
default:
bp = strsep(&bp, ":\n") + 1;
-   if (search && name && strcmp(bp, name) ||
+   if ((search && name && strcmp(bp, name)) ||
__ypexclude_is(&__ypexhead, bp))
continue;
r = yp_match(__ypdomain, "group.byname",
Index: gen/getgrouplist.c
===
RCS file: /cvs/src/lib/libc/gen/getgrouplist.c,v
retrieving revision 1.21
diff -u -p -r1.21 getgrouplist.c
--- gen/getgrouplist.c  9 Nov 2009 00:18:27 -   1.21
+++ gen/getgrouplist.c  5 Apr 2013 01:22:39 -
@@ -202,7 +202,7 @@ getgrouplist(const char *uname, gid_t ag
 
/* Construct the netid key to look up. */
if (getpwnam_r(uname, &pwstore, buf, sizeof buf, NULL) ||
-   !__ypdomain && yp_get_default_domain(&__ypdomain))
+   (!__ypdomain && yp_get_default_domain(&__ypdomain)))
goto out;
asprintf(&key, "unix.%u@%s", pwstore.pw_uid, __ypdomain);
if (key == NULL)
Index: gen/isatty.c
===
RCS file: /cvs/src/lib/libc/gen/isatty.c,v
retrieving revision 1.7
diff -u -p -r1.7 isatty.c
--- gen/isatty.c23 May 2007 18:30:07 -  1.7
+++ gen/isatty.c5 Apr 2013 01:22:39 -
@@ -29,6 +29,7 @@
  */
 
 #include 
+#include 
 
 int
 isatty(int fd)
Index: gen/readdir_r.c
===
RCS file: /cvs/src/lib/libc/gen/readdir_r.c,v
retrieving revision 1.2
diff -u -p -r1.2 readdir_r.c
--- gen/readdir_r.c 22 Mar 2012 04:11:53 -  1.2
+++ gen/readdir_r.c 5 Apr 2013 01:22:39 -
@@ -35,6 +35,8 @@
 #include "telldir.h"
 #include "thread_private.h"
 
+int _readdir_unlocked(DIR *, struct dirent **, int);
+
 int
 readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)
 {
Index: gen/scandir.c
===
RCS file: /cvs/src/lib/libc/gen/scandir.c,v
retrieving revision 1.15
diff -u -p -r1.15 scandir.c
--- gen/scandir.c   29 Nov 2012 02:15:44 -  1.15
+++ gen/scandir.c   5 Apr 2013 01:22:39 -
@@ -125,7 +125,8 @@ scandir(const char *dirname, struct dire
}

Stolen memory

2013-04-04 Thread Mark Kettenis
Machines with Intel integrated graphics have this concept of stolen
memory; system memory set aside by the BIOS for use by the graphics
chip.  On OpenBSD we don't touch that memory since we don't want to
step on the BIOS' toes.  We also assume that this memory is mapped in
the graphics translation table (GTT).  So we reserve a block of the
size of the stolen memory at the start of the aperture and never use
it.

On modern machines this strategy doesn't make a lot of sense.  The
size of the stolen memory can be larger than the graphics aperture,
leaving inteldrm(4) no space to map framebuffers and other graphics
objects.

The diff below gets rid of this policy on Sandy Bridge and Ivy Bridge
CPUs, making the full aperture available for use by inteldrm(4).  This
works fine on my x220, but before I commit this, I'd like to see a
little bit more testing.  If you have a machine with Intel HD Graphics
2000/3000/2500/4000, please give this diff a try.  If possible, test
the following:

 * Check that X still works properly.

 * Check that suspend/resume still works.  (Don't bother if
   suspend/resume doesn't work without this diff).

 * Disable the inteldrm driver (boot with the -c option, disable
   inteldrm at the UKC> prompt) and check if the VGA text console
   still works properly.

Thanks,

Mark

Index: agp_i810.c
===
RCS file: /cvs/src/sys/dev/pci/agp_i810.c,v
retrieving revision 1.74
diff -u -p -r1.74 agp_i810.c
--- agp_i810.c  18 Mar 2013 12:02:56 -  1.74
+++ agp_i810.c  4 Apr 2013 20:38:14 -
@@ -506,79 +506,11 @@ agp_i810_attach(struct device *parent, s
 
case CHIP_SANDYBRIDGE:
case CHIP_IVYBRIDGE:
-
-   /* Stolen memory is set up at the beginning of the aperture by
-* the BIOS, consisting of the GATT followed by 4kb for the
-* BIOS display.
+   /*
+* Even though stolen memory exists on these machines,
+* it isn't necessarily mapped into the aperture.
 */
-
-   gcc1 = (u_int16_t)pci_conf_read(bpa.pa_pc, bpa.pa_tag,
-   AGP_INTEL_SNB_GMCH_CTRL);
-
-   stolen = 4;
-
-   switch (gcc1 & AGP_INTEL_SNB_GMCH_GMS_STOLEN_MASK) {
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_32M:
-   isc->stolen = (32768 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_64M:
-   isc->stolen = (65536 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_96M:
-   isc->stolen = (98304 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_128M:
-   isc->stolen = (131072 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_160M:
-   isc->stolen = (163840 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_192M:
-   isc->stolen = (196608 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_224M:
-   isc->stolen = (229376 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_256M:
-   isc->stolen = (262144 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_288M:
-   isc->stolen = (294912 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_320M:
-   isc->stolen = (327680 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_352M:
-   isc->stolen = (360448 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_384M:
-   isc->stolen = (393216 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_416M:
-   isc->stolen = (425984 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_448M:
-   isc->stolen = (458752 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_480M:
-   isc->stolen = (491520 - stolen) * 1024 / 4096;
-   break;
-   case AGP_INTEL_SNB_GMCH_GMS_STOLEN_512M:
-   isc->stolen = (524288 - stolen) * 1024 / 4096;
-   break;
-   default:
-   isc->stolen = 0;
-   printf("unknown memory configuration, disabling\n");
-   

Re: 5.3 -current installation problem

2013-04-04 Thread RD Thrush
On 04/03/13 09:08, Stuart Henderson wrote:
> moving this to tech@ - original message with dmesg is at
> http://marc.info/?l=openbsd-misc&m=136498447228598&w=2 - summary:
> asus P8H77-M, intel 7 series chipset, "Intel HD Graphics 3000"
> running i386 or amd64, fails during boot with recent kernels unless
> inteldrm disabled.
> [ snip ]
> 
> The most useful thing if it's possible (short of getting a system to
> a developer working in this area), would probably be to get a serial
> console on the machine and capture a boot log with "option DRMDEBUG"
> in kernel config. Though maybe someone on tech@ will have an idea of
> something else to try.

I've attached the boot log from a kernel compiled with both "option DRMDEBUG"
and Mark Kettenis patch.

booting hd0a:bsd.dbg2: 6107292+1771500+1021568+0+638720 
[80+550488+367351]=0xdfa3a0
entry point at 0x10001e0 [7205c766, 3404, 24448b12, 1978a304]
[ using 918688 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2013 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 5.3-current (GENERIC.MP) #6: Thu Apr  4 08:54:28 EDT 2013
r...@a8v.thrush.com:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16818126848 (16039MB)
avail mem = 16362627072 (15604MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeba40 (112 entries)
bios0: vendor American Megatrends Inc. version "1002" date 02/04/2013
bios0: ASUSTeK COMPUTER INC. P8Q77-M
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SSDT SSDT SSDT BGRT DMAR ASF!
acpi0: wakeup devices PS2K(S4) PS2M(S4) UAR1(S4) P0P1(S4) PXSX(S4) RP01(S4) 
PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) 
PXSX(S4) RP06(S4) PXSX(S4) RP07(S4) PXSX(S4) RP08(S4) PEGP(S4) PEG0(S4) 
PEG1(S4) PEG2(S4) PEG3(S4) GLAN(S4) EHC1(S4) EHC2(S4) XHC_(S4) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, 3400.51 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 100MHz
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, 3400.03 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu1: 256KB 64b/line 8-way L2 cache
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, 3400.03 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu2: 256KB 64b/line 8-way L2 cache
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, 3400.03 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu3: 256KB 64b/line 8-way L2 cache
cpu4 at mainbus0: apid 1 (application processor)
cpu4: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, 3400.03 MHz
cpu4: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu4: 256KB 64b/line 8-way L2 cache
cpu5 at mainbus0: apid 3 (application processor)
cpu5: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, 3400.03 MHz
cpu5: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu5: 256KB 64b/line 8-way L2 cache
cpu6 at mainbus0: apid 5 (application processor)
cpu6: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, 3400.03 MHz
cpu6: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT