On Mon, Aug 05, 2019 at 04:58:27PM +0300, Paul Irofti wrote:
> Hi,
> 
> Here is a third version of the TSC diff that also take into
> consideration the suspend-resume path which was ignored by the previous
> thus rendering resume broken.
> 
> Have a go at it. Reports are welcome. So far I only got ONE report from
> a machine with broken TSC :(
> 
> Paul
> 
> 
> Index: arch/amd64/amd64/acpi_machdep.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/amd64/acpi_machdep.c,v
> retrieving revision 1.86
> diff -u -p -u -p -r1.86 acpi_machdep.c
> --- arch/amd64/amd64/acpi_machdep.c   23 Oct 2018 17:51:32 -0000      1.86
> +++ arch/amd64/amd64/acpi_machdep.c   5 Aug 2019 13:54:33 -0000
> @@ -60,6 +60,8 @@ extern paddr_t tramp_pdirpa;
>  
>  extern int acpi_savecpu(void) __returns_twice;
>  
> +extern int64_t tsc_drift_observed;
> +
>  #define ACPI_BIOS_RSDP_WINDOW_BASE        0xe0000
>  #define ACPI_BIOS_RSDP_WINDOW_SIZE        0x20000
>  
> @@ -481,6 +483,8 @@ acpi_resume_cpu(struct acpi_softc *sc)
>  {
>       fpuinit(&cpu_info_primary);
>  
> +     cpu_info_primary.cpu_cc_skew = 0;       /* futile */
> +     tsc_drift_observed = 0;                 /* reset tsc drift on resume */
>       cpu_init(&cpu_info_primary);
>       cpu_ucode_apply(&cpu_info_primary);
>  
> Index: arch/amd64/amd64/cpu.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/amd64/cpu.c,v
> retrieving revision 1.137
> diff -u -p -u -p -r1.137 cpu.c
> --- arch/amd64/amd64/cpu.c    28 May 2019 18:17:01 -0000      1.137
> +++ arch/amd64/amd64/cpu.c    5 Aug 2019 13:54:34 -0000
> @@ -754,6 +754,10 @@ cpu_init(struct cpu_info *ci)
>       cr4 = rcr4();
>       lcr4(cr4 & ~CR4_PGE);
>       lcr4(cr4);
> +
> +     /* Synchronize TSC */
> +     if (cold && !CPU_IS_PRIMARY(ci))
> +           tsc_sync_ap(ci);
>  #endif
>  }
>  
> @@ -808,6 +812,7 @@ void
>  cpu_start_secondary(struct cpu_info *ci)
>  {
>       int i;
> +     u_long s;
>  
>       ci->ci_flags |= CPUF_AP;
>  
> @@ -828,6 +833,17 @@ cpu_start_secondary(struct cpu_info *ci)
>               printf("dropping into debugger; continue from here to resume 
> boot\n");
>               db_enter();
>  #endif
> +     } else {
> +             /*
> +              * Synchronize time stamp counters. Invalidate cache and do
> +              * twice (in tsc_sync_bp) to minimize possible cache effects.
> +              * Disable interrupts to try and rule out any external
> +              * interference.
> +              */
> +             s = intr_disable();
> +             wbinvd();
> +             tsc_sync_bp(ci);
> +             intr_restore(s);
>       }
>  
>       if ((ci->ci_flags & CPUF_IDENTIFIED) == 0) {
> @@ -852,6 +868,8 @@ void
>  cpu_boot_secondary(struct cpu_info *ci)
>  {
>       int i;
> +     int64_t drift;
> +     u_long s;
>  
>       atomic_setbits_int(&ci->ci_flags, CPUF_GO);
>  
> @@ -864,6 +882,17 @@ cpu_boot_secondary(struct cpu_info *ci)
>               printf("dropping into debugger; continue from here to resume 
> boot\n");
>               db_enter();
>  #endif
> +     } else if (cold) {
> +             /* Synchronize TSC again, check for drift. */
> +             drift = ci->cpu_cc_skew;
> +             s = intr_disable();
> +             wbinvd();
> +             tsc_sync_bp(ci);
> +             intr_restore(s);
> +             drift -= ci->cpu_cc_skew;
> +             printf("TSC skew=%lld drift=%lld\n",
> +                 (long long)ci->cpu_cc_skew, (long long)drift);
> +             tsc_sync_drift(drift);
>       }
>  }
>  
> @@ -888,7 +917,14 @@ cpu_hatch(void *v)
>               panic("%s: already running!?", ci->ci_dev->dv_xname);
>  #endif
>  
> +     /*
> +      * Synchronize the TSC for the first time. Note that interrupts are
> +      * off at this point.
> +      */
> +     wbinvd();
>       ci->ci_flags |= CPUF_PRESENT;
> +     ci->cpu_cc_skew = 0;    /* reset on resume */
> +     tsc_sync_ap(ci);
>  
>       lapic_enable();
>       lapic_startclock();
> Index: arch/amd64/amd64/tsc.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/amd64/tsc.c,v
> retrieving revision 1.11
> diff -u -p -u -p -r1.11 tsc.c
> --- arch/amd64/amd64/tsc.c    6 Jun 2019 19:43:35 -0000       1.11
> +++ arch/amd64/amd64/tsc.c    5 Aug 2019 13:54:34 -0000
> @@ -1,8 +1,10 @@
>  /*   $OpenBSD: tsc.c,v 1.11 2019/06/06 19:43:35 kettenis Exp $       */
>  /*
> + * Copyright (c) 2008 The NetBSD Foundation, Inc.
>   * Copyright (c) 2016,2017 Reyk Floeter <r...@openbsd.org>
>   * Copyright (c) 2017 Adam Steen <a...@adamsteen.com.au>
>   * Copyright (c) 2017 Mike Belopuhov <m...@openbsd.org>
> + * Copyright (c) 2019 Paul Irofti <piro...@openbsd.org>
>   *
>   * Permission to use, copy, modify, and distribute this software for any
>   * purpose with or without fee is hereby granted, provided that the above
> @@ -20,6 +22,7 @@
>  #include <sys/param.h>
>  #include <sys/systm.h>
>  #include <sys/timetc.h>
> +#include <sys/atomic.h>
>  
>  #include <machine/cpu.h>
>  #include <machine/cpufunc.h>
> @@ -33,6 +36,13 @@ int                tsc_recalibrate;
>  uint64_t     tsc_frequency;
>  int          tsc_is_invariant;
>  
> +int64_t      tsc_drift_max = 250;    /* max cycles */
> +int64_t      tsc_drift_observed;
> +bool tsc_good;
> +
> +volatile int64_t     tsc_sync_val;
> +volatile struct cpu_info     *tsc_sync_cpu;
> +
>  uint         tsc_get_timecount(struct timecounter *tc);
>  
>  struct timecounter tsc_timecounter = {
> @@ -172,10 +182,8 @@ calibrate_tsc_freq(void)
>               return;
>       tsc_frequency = freq;
>       tsc_timecounter.tc_frequency = freq;
> -#ifndef MULTIPROCESSOR
>       if (tsc_is_invariant)
>               tsc_timecounter.tc_quality = 2000;
> -#endif
>  }
>  
>  void
> @@ -194,26 +202,25 @@ cpu_recalibrate_tsc(struct timecounter *
>  uint
>  tsc_get_timecount(struct timecounter *tc)
>  {
> -     return rdtsc();
> +     return rdtsc() + curcpu()->cpu_cc_skew;
>  }
>  
>  void
>  tsc_timecounter_init(struct cpu_info *ci, uint64_t cpufreq)
>  {
> -     if (!(ci->ci_flags & CPUF_PRIMARY) ||
> -         !(ci->ci_flags & CPUF_CONST_TSC) ||
> +     if (!(ci->ci_flags & CPUF_CONST_TSC) ||
>           !(ci->ci_flags & CPUF_INVAR_TSC))
>               return;
>  
>       tsc_frequency = tsc_freq_cpuid(ci);
>       tsc_is_invariant = 1;
>  
> +     tsc_good = (rdmsr(MSR_TSC) != 0 || rdmsr(MSR_TSC) != 0);
> +
>       /* Newer CPUs don't require recalibration */
>       if (tsc_frequency > 0) {
>               tsc_timecounter.tc_frequency = tsc_frequency;
> -#ifndef MULTIPROCESSOR
>               tsc_timecounter.tc_quality = 2000;
> -#endif
>       } else {
>               tsc_recalibrate = 1;
>               tsc_frequency = cpufreq;
> @@ -221,5 +228,112 @@ tsc_timecounter_init(struct cpu_info *ci
>               calibrate_tsc_freq();
>       }
>  
> -     tc_init(&tsc_timecounter);
> +     if (tsc_drift_observed > tsc_drift_max) {
> +             printf("ERROR: %lld cycle TSC drift observed\n",
> +                 (long long)tsc_drift_observed);
> +             tsc_timecounter.tc_quality = -100;
> +             tsc_is_invariant = 0;
> +     }
> +
> +     printf("%s: TSC skew=%lld observed drift=%lld\n", __func__,
> +         (long long)ci->cpu_cc_skew, (long long)tsc_drift_observed);
> +
> +     if (ci->ci_flags & CPUF_PRIMARY)
> +             tc_init(&tsc_timecounter);
> +}
> +
> +static uint64_t
> +cpu_counter_serializing(struct cpu_info *ci)
> +{
> +     if (tsc_good)
> +             return rdmsr(MSR_TSC);
> +     else
> +             return (rdtsc() + ci->cpu_cc_skew);
> +}
> +
> +/*
> + * Record drift (in clock cycles).  Called during AP startup.
> + */
> +void
> +tsc_sync_drift(int64_t drift)
> +{
> +     if (drift < 0)
> +             drift = -drift;
> +     if (drift > tsc_drift_observed)
> +             tsc_drift_observed = drift;
> +}
> +
> +/*
> + * Called during startup of APs, by the boot processor.  Interrupts
> + * are disabled on entry.
> + */
> +static void
> +tsc_read_bp(struct cpu_info *ci, uint64_t *bptscp, uint64_t *aptscp)
> +{
> +     uint64_t bptsc;
> +
> +     if (atomic_swap_ptr(&tsc_sync_cpu, ci) != NULL)
> +             panic("tsc_sync_bp: 1");
> +
> +     /* Flag it and read our TSC. */
> +     atomic_setbits_int(&ci->ci_flags, CPUF_SYNCTSC);
> +     bptsc = cpu_counter_serializing(ci) >> 1;
> +
> +     /* Wait for remote to complete, and read ours again. */
> +     while ((ci->ci_flags & CPUF_SYNCTSC) != 0)
> +             membar_consumer();
> +     bptsc += (cpu_counter_serializing(ci) >> 1);
> +
> +     /* Wait for the results to come in. */
> +     while (tsc_sync_cpu == ci)
> +             CPU_BUSY_CYCLE();
> +     if (tsc_sync_cpu != NULL)
> +             panic("tsc_sync_bp: 2");
> +
> +     *bptscp = bptsc;
> +     *aptscp = tsc_sync_val;
> +}
> +
> +void
> +tsc_sync_bp(struct cpu_info *ci)
> +{
> +     uint64_t bptsc, aptsc;
> +
> +     tsc_read_bp(ci, &bptsc, &aptsc); /* discarded - cache effects */
> +     tsc_read_bp(ci, &bptsc, &aptsc);
> +
> +     /* Compute final value to adjust for skew. */
> +     ci->cpu_cc_skew = bptsc - aptsc;
> +}
> +
> +/*
> + * Called during startup of AP, by the AP itself.  Interrupts are
> + * disabled on entry.
> + */
> +static void
> +tsc_post_ap(struct cpu_info *ci)
> +{
> +     uint64_t tsc;
> +
> +     /* Wait for go-ahead from primary. */
> +     while ((ci->ci_flags & CPUF_SYNCTSC) == 0)
> +             membar_consumer();
> +     tsc = (cpu_counter_serializing(ci) >> 1);
> +
> +     /* Instruct primary to read its counter. */
> +     atomic_clearbits_int(&ci->ci_flags, CPUF_SYNCTSC);
> +     tsc += (cpu_counter_serializing(ci) >> 1);
> +
> +     /* Post result.  Ensure the whole value goes out atomically. */
> +     (void)atomic_swap_64(&tsc_sync_val, tsc);
> +
> +     if (atomic_swap_ptr(&tsc_sync_cpu, NULL) != ci)
> +             panic("tsc_sync_ap");
> +}
> +
> +void
> +tsc_sync_ap(struct cpu_info *ci)
> +{
> +     tsc_post_ap(ci);
> +     tsc_post_ap(ci);
>  }
> Index: arch/amd64/include/cpu.h
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/include/cpu.h,v
> retrieving revision 1.131
> diff -u -p -u -p -r1.131 cpu.h
> --- arch/amd64/include/cpu.h  17 May 2019 19:07:16 -0000      1.131
> +++ arch/amd64/include/cpu.h  5 Aug 2019 13:54:34 -0000
> @@ -206,6 +206,8 @@ struct cpu_info {
>       union           vmm_cpu_cap ci_vmm_cap;
>       paddr_t         ci_vmxon_region_pa;
>       struct vmxon_region *ci_vmxon_region;
> +
> +     int64_t         cpu_cc_skew;            /* counter skew vs cpu0 */
>  };
>  
>  #define CPUF_BSP     0x0001          /* CPU is the original BSP */
> @@ -221,6 +223,7 @@ struct cpu_info {
>  #define CPUF_INVAR_TSC       0x0100          /* CPU has invariant TSC */
>  #define CPUF_USERXSTATE      0x0200          /* CPU has curproc's xsave 
> state */
>  
> +#define      CPUF_SYNCTSC    0x0800          /* Synchronize TSC */
>  #define CPUF_PRESENT 0x1000          /* CPU is present */
>  #define CPUF_RUNNING 0x2000          /* CPU is running */
>  #define CPUF_PAUSE   0x4000          /* CPU is paused in DDB */
> Index: arch/amd64/include/cpuvar.h
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/include/cpuvar.h,v
> retrieving revision 1.9
> diff -u -p -u -p -r1.9 cpuvar.h
> --- arch/amd64/include/cpuvar.h       6 Oct 2017 13:33:53 -0000       1.9
> +++ arch/amd64/include/cpuvar.h       5 Aug 2019 13:54:34 -0000
> @@ -98,4 +98,8 @@ void cpu_init(struct cpu_info *);
>  void cpu_init_first(void);
>  void cpu_adjust_tsc_freq(uint64_t (*)());
>  
> +void tsc_sync_drift(int64_t);
> +void tsc_sync_bp(struct cpu_info *);
> +void tsc_sync_ap(struct cpu_info *);
> +
>  #endif

I tested this, and confirmed that it's automatically preferring the tsc
timecounter.hadware. I waited a hour or two and it seems fine, and also
ran regress/sys/kern/clock_gettime with no issues reported.

As mentioned seperately, I'm not able to test suspend/resume as it is
not currently working on this machine.

-Bryan.

OpenBSD 6.5-current (AMDGPU) #7: Mon Aug  5 14:03:35 EDT 2019
    bry...@matebook.brynet.biz.tm:/home/brynet/src/sys/arch/amd64/compile/AMDGPU
real mem = 7396610048 (7053MB)
avail mem = 7159779328 (6828MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.10 @ 0x8c4ec000 (24 entries)
bios0: vendor HUAWEI version "1.22" date 02/26/2019
bios0: HUAWEI KPL-W0X
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP UEFI MSDM SSDT SSDT CRAT CDIT ASF! BOOT HPET APIC MCFG 
WSMT UEFI VFCT SSDT TPM2 IVRS SSDT SSDT SSDT SSDT FPDT BGRT
acpi0: wakeup devices GPP0(S4) GPP1(S4) GPP2(S4) GPP3(S4) GPP4(S4) GPP5(S4) 
GPP6(S4) GP17(S4) XHC0(S0) XHC1(S0) GP18(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 1996.62 MHz, 17-11-00
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu0: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 
8-way L2 cache, 4MB 64b/line 16-way L3 cache
cpu0: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu0: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
tsc_timecounter_init: TSC skew=0 observed drift=0
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 24MHz
cpu0: mwait min=64, max=64, C-substates=1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 1996.23 MHz, 17-11-00
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu1: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 
8-way L2 cache, 4MB 64b/line 16-way L3 cache
cpu1: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu1: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
tsc_timecounter_init: TSC skew=0 observed drift=0
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 1996.23 MHz, 17-11-00
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu2: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 
8-way L2 cache, 4MB 64b/line 16-way L3 cache
cpu2: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu2: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
tsc_timecounter_init: TSC skew=-30 observed drift=0
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 1996.23 MHz, 17-11-00
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu3: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 
8-way L2 cache, 4MB 64b/line 16-way L3 cache
cpu3: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu3: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
tsc_timecounter_init: TSC skew=0 observed drift=0
cpu3: smt 1, core 1, package 0
cpu4 at mainbus0: apid 4 (application processor)
cpu4: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 1996.23 MHz, 17-11-00
cpu4: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu4: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 
8-way L2 cache, 4MB 64b/line 16-way L3 cache
cpu4: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu4: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
tsc_timecounter_init: TSC skew=-30 observed drift=0
cpu4: smt 0, core 2, package 0
cpu5 at mainbus0: apid 5 (application processor)
cpu5: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 1996.23 MHz, 17-11-00
cpu5: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu5: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 
8-way L2 cache, 4MB 64b/line 16-way L3 cache
cpu5: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu5: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
tsc_timecounter_init: TSC skew=-20 observed drift=0
cpu5: smt 1, core 2, package 0
cpu6 at mainbus0: apid 6 (application processor)
cpu6: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 1996.23 MHz, 17-11-00
cpu6: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu6: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 
8-way L2 cache, 4MB 64b/line 16-way L3 cache
cpu6: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu6: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
tsc_timecounter_init: TSC skew=-70 observed drift=0
cpu6: smt 0, core 3, package 0
cpu7 at mainbus0: apid 7 (application processor)
cpu7: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 1996.23 MHz, 17-11-00
cpu7: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu7: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 
8-way L2 cache, 4MB 64b/line 16-way L3 cache
cpu7: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu7: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
tsc_timecounter_init: TSC skew=-40 observed drift=0
cpu7: smt 1, core 3, package 0
ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 21, 24 pins, remapped
ioapic1 at mainbus0: apid 5 pa 0xfec01000, version 21, 32 pins, remapped
acpimcfg0 at acpi0
acpimcfg0: addr 0xf8000000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (GPP0)
acpiprt2 at acpi0: bus 1 (GPP1)
acpiprt3 at acpi0: bus -1 (GPP2)
acpiprt4 at acpi0: bus -1 (GPP3)
acpiprt5 at acpi0: bus -1 (GPP4)
acpiprt6 at acpi0: bus -1 (GPP5)
acpiprt7 at acpi0: bus -1 (GPP6)
acpiprt8 at acpi0: bus 2 (GP17)
acpiprt9 at acpi0: bus 3 (GP18)
acpiec0 at acpi0
acpicpu0 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS
acpicpu1 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS
acpicpu2 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS
acpicpu3 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS
acpicpu4 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS
acpicpu5 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS
acpicpu6 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS
acpicpu7 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS
acpipwrres0 at acpi0: P0ST, resource for SATA
acpipwrres1 at acpi0: P3ST, resource for SATA
acpibtn0 at acpi0: PWRB
acpipci0 at acpi0 PCI0: 0x00000010 0x00000011 0x00000000
acpicmos0 at acpi0
"WDT0001" at acpi0 not configured
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT1 model "HB4593R1ECW" serial 7748 type LIon oem "DYNAPACK"
acpibtn1 at acpi0: LID0
"AMDI0030" at acpi0 not configured
dwiic0 at acpi0 I2CC addr 0xfedc4000/0x1000
iic0 at dwiic0
ihidev0 at iic0 addr 0xa , can't establish interrupt (polling), vendor 0x56a 
product 0x48cf, WCOM48CF
ihidev0: 14 report ids
hid at ihidev0 reportid 2 not configured
hid at ihidev0 reportid 3 not configured
hid at ihidev0 reportid 4 not configured
hid at ihidev0 reportid 7 not configured
hid at ihidev0 reportid 8 not configured
hid at ihidev0 reportid 9 not configured
hid at ihidev0 reportid 10 not configured
ims0 at ihidev0 reportid 12: 1 button, tip
wsmouse0 at ims0 mux 0
hid at ihidev0 reportid 13 not configured
hid at ihidev0 reportid 14 not configured
dwiic1 at acpi0 I2CD addr 0xfedc5000/0x1000
iic1 at dwiic1
ihidev1 at iic1 addr 0x15, disabling for pms driver
"MSFT0101" at acpi0 not configured
"PNP0C14" at acpi0 not configured
acpivideo0 at acpi0: VGA_
acpivideo1 at acpi0: VGA_
acpivideo2 at acpi0: VGA_
cpu0: 1996 MHz: speeds: 2000 1700 1600 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 17h/1xh Root Complex" rev 0x00
"AMD AMD64 17h/1xh IOMMU" rev 0x00 at pci0 dev 0 function 2 not configured
pchb1 at pci0 dev 1 function 0 "AMD AMD64 17h PCIE" rev 0x00
ppb0 at pci0 dev 1 function 2 "AMD AMD64 17h/1xh PCIE" rev 0x00: msi
pci1 at ppb0 bus 1
iwm0 at pci1 dev 0 function 0 "Intel Dual Band Wireless-AC 8265" rev 0x78, msi
pchb2 at pci0 dev 8 function 0 "AMD AMD64 17h PCIE" rev 0x00
ppb1 at pci0 dev 8 function 1 "AMD AMD64 17h/1xh PCIE" rev 0x00
pci2 at ppb1 bus 2
amdgpu0 at pci2 dev 0 function 0 "ATI Radeon Vega" rev 0xc4
drm0 at amdgpu0
amdgpu0: msi
azalia0 at pci2 dev 0 function 1 "ATI Radeon Vega HD Audio" rev 0x00: msi
azalia0: no supported codecs
ccp0 at pci2 dev 0 function 2 "AMD AMD64 17h/1xh Crypto" rev 0x00
xhci0 at pci2 dev 0 function 3 "AMD AMD64 17h/1xh xHCI" rev 0x00: msi, xHCI 1.10
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 
addr 1
xhci1 at pci2 dev 0 function 4 "AMD AMD64 17h/1xh xHCI" rev 0x00: msi, xHCI 1.10
usb1 at xhci1: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 
addr 1
"AMD AMD64 17h/1xh I2S Audio" rev 0x00 at pci2 dev 0 function 5 not configured
azalia1 at pci2 dev 0 function 6 "AMD AMD64 17h/1xh HD Audio" rev 0x00: apic 5 
int 30
azalia1: codecs: Realtek/0x0256
audio0 at azalia1
ppb2 at pci0 dev 8 function 2 "AMD AMD64 17h/1xh PCIE" rev 0x00
pci3 at ppb2 bus 3
ahci0 at pci3 dev 0 function 0 "AMD FCH AHCI" rev 0x61: msi, AHCI 1.3.1
ahci0: port 1: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 1 lun 0: <ATA, SanDisk SD9SN8W2, X610> SCSI3 0/direct 
fixed naa.5001b448b6a2ccc5
sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
"AMD FCH SMBus" rev 0x61 at pci0 dev 20 function 0 not configured
pcib0 at pci0 dev 20 function 3 "AMD FCH LPC" rev 0x51
pchb3 at pci0 dev 24 function 0 "AMD AMD64 17h/1xh Data Fabric" rev 0x00
pchb4 at pci0 dev 24 function 1 "AMD AMD64 17h/1xh Data Fabric" rev 0x00
pchb5 at pci0 dev 24 function 2 "AMD AMD64 17h/1xh Data Fabric" rev 0x00
pchb6 at pci0 dev 24 function 3 "AMD AMD64 17h/1xh Data Fabric" rev 0x00
pchb7 at pci0 dev 24 function 4 "AMD AMD64 17h/1xh Data Fabric" rev 0x00
pchb8 at pci0 dev 24 function 5 "AMD AMD64 17h/1xh Data Fabric" rev 0x00
pchb9 at pci0 dev 24 function 6 "AMD AMD64 17h/1xh Data Fabric" rev 0x00
pchb10 at pci0 dev 24 function 7 "AMD AMD64 17h/1xh Data Fabric" rev 0x00
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: probed fifo depth: 0 bytes
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
wsmouse1 at pms0 mux 0
pms0: Elantech Clickpad, version 4, firmware 0x4f1001
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: SVM/RVI
efifb at mainbus0 not configured
uvideo0 at uhub1 port 1 configuration 1 interface 0 "SunplusIT Inc 
hm1091_techfront" rev 2.00/0.13 addr 2
video0 at uvideo0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (467069f697e9c83d.a) swap on sd0b dump on sd0b
iwm0: hw rev 0x230, fw ver 22.361476.0, address 7c:76:35:ba:bd:28
initializing kernel modesetting (RAVEN 0x1002:0x15DD 0x19E5:0x3E06 0xC4).
amdgpu0: 1920x1080, 32bpp
wsdisplay0 at amdgpu0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)

Reply via email to