Re: OpenBSD -current on T495

2019-11-09 Thread Patrick Wildt
On Sat, Nov 09, 2019 at 12:08:35PM +0100, Thomas de Grivel wrote:
> Everything works except wifi, suspend/resume and screen backlight, and
> mute speakers button.

Hi,

I have an X395 which is basically the same machine.

For Wifi I have temporarily replaced the Intel WiFi with a bwfm(4), the
Dell Wireless DW1820a (note the a), which has two antenna connectors.
There's the DW1830 which has three.  My X395 has two connectors, so I
just put in the DW1820a.  Both can be purchased cheaply on eBay.

The mute speaker button works for me, but the light doesn't show up.

I will try to have a look at suspend/resume at one of the next OpenBSD
hackathons.

For the screen backlight I have come up with a diff, but it's not yet
ready to be committed, as it should be done in a different fashion.
Still, I have attached the diff if you want to give it a go.

Patrick

diff --git a/sys/dev/acpi/acpivideo.c b/sys/dev/acpi/acpivideo.c
index 9498465a418..a46a99a67f7 100644
--- a/sys/dev/acpi/acpivideo.c
+++ b/sys/dev/acpi/acpivideo.c
@@ -149,7 +149,7 @@ acpi_foundvout(struct aml_node *node, void *arg)
if (node->parent != sc->sc_devnode)
return (0);
 
-   if (aml_searchname(node, "_BCM") && aml_searchname(node, "_BQC")) {
+   if (aml_searchname(node, "_BCM")) {
memset(, 0, sizeof(aaa));
aaa.aaa_iot = sc->sc_acpi->sc_iot;
aaa.aaa_memt = sc->sc_acpi->sc_memt;
diff --git a/sys/dev/acpi/acpivout.c b/sys/dev/acpi/acpivout.c
index 5fb6973f595..b1957b0c652 100644
--- a/sys/dev/acpi/acpivout.c
+++ b/sys/dev/acpi/acpivout.c
@@ -60,6 +60,7 @@ struct acpivout_softc {
 
int *sc_bcl;
size_t  sc_bcl_len;
+   int sc_bcl_cur;
 };
 
 void   acpivout_brightness_cycle(struct acpivout_softc *);
@@ -113,10 +114,16 @@ acpivout_attach(struct device *parent, struct device 
*self, void *aux)
aml_register_notify(sc->sc_devnode, aaa->aaa_dev,
acpivout_notify, sc, ACPIDEV_NOPOLL);
 
+   acpivout_get_bcl(sc);
+   if (!sc->sc_bcl_len)
+   return;
+
+   sc->sc_bcl_cur = sc->sc_bcl[sc->sc_bcl_len - 1];
+   sc->sc_bcl_cur = acpivout_get_brightness(sc);
+   acpivout_set_brightness(sc, sc->sc_bcl_cur);
+
ws_get_param = acpivout_get_param;
ws_set_param = acpivout_set_param;
-
-   acpivout_get_bcl(sc);
 }
 
 int
@@ -130,12 +137,15 @@ acpivout_notify(struct aml_node *node, int notify, void 
*arg)
break;
case NOTIFY_BRIGHTNESS_UP:
acpivout_brightness_step(sc, 1);
+   wsdisplay_change_brightness(1);
break;
case NOTIFY_BRIGHTNESS_DOWN:
acpivout_brightness_step(sc, -1);
+   wsdisplay_change_brightness(-1);
break;
case NOTIFY_BRIGHTNESS_ZERO:
acpivout_brightness_zero(sc);
+   wsdisplay_change_brightness(0);
break;
case NOTIFY_DISPLAY_OFF:
/* TODO: D3 state change */
@@ -200,7 +210,9 @@ acpivout_get_brightness(struct acpivout_softc *sc)
struct aml_value res;
int level;
 
-   aml_evalname(sc->sc_acpi, sc->sc_devnode, "_BQC", 0, NULL, );
+   if (aml_evalname(sc->sc_acpi, sc->sc_devnode, "_BQC", 0, NULL, ))
+   return sc->sc_bcl_cur;
+
level = aml_val2int();
aml_freevalue();
DPRINTF(("%s: BQC = %d\n", DEVNAME(sc), level));
@@ -242,6 +254,7 @@ acpivout_set_brightness(struct acpivout_softc *sc, int 
level)
aml_evalname(sc->sc_acpi, sc->sc_devnode, "_BCM", 1, , );
 
aml_freevalue();
+   sc->sc_bcl_cur = level;
 }
 
 void
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c 
b/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
index 02a90069f8d..4bad51b7d5f 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
@@ -1656,7 +1656,7 @@ amdgpu_wsioctl(void *v, u_long cmd, caddr_t data, int 
flag, struct proc *p)
case WSDISPLAYIO_PARAM_BRIGHTNESS:
dp->min = 0;
dp->max = bd->props.max_brightness;
-   dp->curval = bd->ops->get_brightness(bd);
+   dp->curval = bd->props.brightness;
return (dp->max > dp->min) ? 0 : -1;
}
break;
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index 61ccd2dae43..eda5c9d8843 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -3369,3 +3369,43 @@ mouse_remove(struct wsscreen *scr)
 }
 
 #endif /* HAVE_WSMOUSED_SUPPORT */
+
+int
+wsdisplay_change_brightness(int dir)
+{
+   struct wsdisplay_softc *sc;
+   struct wsdisplay_param dp;
+   int step, ret;
+
+   sc = (struct wsdisplay_softc *)device_lookup(_cd, 0);
+   if (sc == NULL)
+   return ENODEV;
+
+   memset(, 0, sizeof(dp));
+   dp.param = WSDISPLAYIO_PARAM_BRIGHTNESS;
+   ret = 

Re: Value of eax register after BIOS interrupt call from boot(8)

2019-11-09 Thread Philip Guenther
On Friday, November 8, 2019, Theo de Raadt  wrote:

> Philip Guenther  wrote:
>
> > No, it should be the other way, moving the “clear NT flag” block down
> after
> > the “save registers into save area” block
>
> Ah.
>
> Index: arch/amd64/stand/libsa/gidt.S
> ===
> RCS file: /cvs/src/sys/arch/amd64/stand/libsa/gidt.S,v
> retrieving revision 1.11
> diff -u -p -u -r1.11 gidt.S
> --- arch/amd64/stand/libsa/gidt.S   27 Oct 2012 15:43:42 -
> 1.11
> +++ arch/amd64/stand/libsa/gidt.S   9 Nov 2019 06:50:57 -
> @@ -423,14 +423,6 @@ intno  = . - 1
> movl%edx, 0x9*4(%esp)
> movb%bh , 0xe*4(%esp)
>
> -   /* clear NT flag in eflags */
> -   /* Martin Fredriksson  */
> -   pushf
> -   pop %eax
> -   and $0xbfff, %eax
> -   push%eax
> -   popf
> -
> /* save registers into save area */
> movl%eax, _C_LABEL(BIOS_regs)+BIOSR_AX
> movl%ecx, _C_LABEL(BIOS_regs)+BIOSR_CX
> @@ -438,6 +430,13 @@ intno  = . - 1
> movl%ebp, _C_LABEL(BIOS_regs)+BIOSR_BP
> movl%esi, _C_LABEL(BIOS_regs)+BIOSR_SI
> movl%edi, _C_LABEL(BIOS_regs)+BIOSR_DI
> +
> +   /* clear NT flag in eflags */
> +   pushf
> +   pop %eax
> +   and $0xbfff, %eax
> +   push%eax
> +   popf
>
> pop %gs
> pop %fs
> Index: arch/i386/stand/libsa/gidt.S
> ===
> RCS file: /cvs/src/sys/arch/i386/stand/libsa/gidt.S,v
> retrieving revision 1.36
> diff -u -p -u -r1.36 gidt.S
> --- arch/i386/stand/libsa/gidt.S31 Oct 2012 13:55:58 -
> 1.36
> +++ arch/i386/stand/libsa/gidt.S9 Nov 2019 06:51:29 -
> @@ -426,14 +426,6 @@ intno  = . - 1
> movl%edx, 0x9*4(%esp)
> movb%bh , 0xe*4(%esp)
>
> -   /* clear NT flag in eflags */
> -   /* Martin Fredriksson  */
> -   pushf
> -   pop %eax
> -   and $0xbfff, %eax
> -   push%eax
> -   popf
> -
> /* save registers into save area */
> movl%eax, _C_LABEL(BIOS_regs)+BIOSR_AX
> movl%ecx, _C_LABEL(BIOS_regs)+BIOSR_CX
> @@ -441,6 +433,13 @@ intno  = . - 1
> movl%ebp, _C_LABEL(BIOS_regs)+BIOSR_BP
> movl%esi, _C_LABEL(BIOS_regs)+BIOSR_SI
> movl%edi, _C_LABEL(BIOS_regs)+BIOSR_DI
> +
> +   /* clear NT flag in eflags */
> +   pushf
> +   pop %eax
> +   and $0xbfff, %eax
> +   push%eax
> +   popf
>
> pop %gs
> pop %f
>

Ok guenther@


Re: Raid0 max volume size

2019-11-09 Thread Raymond, David
Thanks, that did the trick!

Dave

On 11/9/19, Otto Moerbeek  wrote:
> On Sat, Nov 09, 2019 at 08:24:36AM -0700, Raymond, David wrote:
>
>> Hmmm
>>
>> On install of openbsd a second, non-boot 4 TB disk was initialized by
>> fdisk in the usual way.  My intention was to create a single partition
>> and file system for the whole disk.  However, disklabel limits me to a
>> partition size of 2 TB.  The c partition automatically covers the full
>> disk, but I didn't think one could actually create a file system on
>> the c partition.
>>
>> Is there something I am missing?
>
> yes, use the b command in disklabel to make the OpenBSD partition
> cover the whole disk.
>
> b 
>
> should do it,
>
>   -Otto
>
>
>>
>> Dave
>>
>> On 11/9/19, Otto Moerbeek  wrote:
>> > On Sat, Nov 09, 2019 at 07:01:02AM -0700, Raymond, David wrote:
>> >
>> >> Does raid0 allow the creation of file systems bigger than the 2 TB
>> >> limit
>> >> of ffs?
>> >
>> > Yes. And ffs in general does not have that limit. newfs will move to
>> > ffs2 if needed.
>> >
>> >-Otto
>> >
>> >
>>
>>
>> --
>> David J. Raymond
>> david.raym...@nmt.edu
>> http://physics.nmt.edu/~raymond
>


-- 
David J. Raymond
david.raym...@nmt.edu
http://physics.nmt.edu/~raymond



Re: Raid0 max volume size

2019-11-09 Thread Otto Moerbeek
On Sat, Nov 09, 2019 at 08:24:36AM -0700, Raymond, David wrote:

> Hmmm
> 
> On install of openbsd a second, non-boot 4 TB disk was initialized by
> fdisk in the usual way.  My intention was to create a single partition
> and file system for the whole disk.  However, disklabel limits me to a
> partition size of 2 TB.  The c partition automatically covers the full
> disk, but I didn't think one could actually create a file system on
> the c partition.
> 
> Is there something I am missing?

yes, use the b command in disklabel to make the OpenBSD partition
cover the whole disk.

b 

should do it,

-Otto


> 
> Dave
> 
> On 11/9/19, Otto Moerbeek  wrote:
> > On Sat, Nov 09, 2019 at 07:01:02AM -0700, Raymond, David wrote:
> >
> >> Does raid0 allow the creation of file systems bigger than the 2 TB limit
> >> of ffs?
> >
> > Yes. And ffs in general does not have that limit. newfs will move to
> > ffs2 if needed.
> >
> > -Otto
> >
> >
> 
> 
> -- 
> David J. Raymond
> david.raym...@nmt.edu
> http://physics.nmt.edu/~raymond



Re: Raid0 max volume size

2019-11-09 Thread Raymond, David
Hmmm

On install of openbsd a second, non-boot 4 TB disk was initialized by
fdisk in the usual way.  My intention was to create a single partition
and file system for the whole disk.  However, disklabel limits me to a
partition size of 2 TB.  The c partition automatically covers the full
disk, but I didn't think one could actually create a file system on
the c partition.

Is there something I am missing?

Dave

On 11/9/19, Otto Moerbeek  wrote:
> On Sat, Nov 09, 2019 at 07:01:02AM -0700, Raymond, David wrote:
>
>> Does raid0 allow the creation of file systems bigger than the 2 TB limit
>> of ffs?
>
> Yes. And ffs in general does not have that limit. newfs will move to
> ffs2 if needed.
>
>   -Otto
>
>


-- 
David J. Raymond
david.raym...@nmt.edu
http://physics.nmt.edu/~raymond



Re: Raid0 max volume size

2019-11-09 Thread Josh Grosse
On Sat, Nov 09, 2019 at 07:01:02AM -0700, Raymond, David wrote:
> Does raid0 allow the creation of file systems bigger than the 2 TB limit of 
> ffs?

RAID 0 stripe sizes may be as large as the smallest physical extent.  

FFS2 -- see newfs(8) -- supports a filesystem size up to 64 PB.



Re: random packet drops with syncookies/synproxy

2019-11-09 Thread Claudio Jeker
On Sat, Nov 09, 2019 at 01:30:32PM +0100, Markus Wernig wrote:
> Hm, also no replies to that one :-)
> 
> On 11/6/19 8:15 PM, Markus Wernig wrote:
> 
> > So just to make sure: Is anybody using syncookies and/or synproxy in
> > production in a similar setup?
> 
> So nobody is using syncookies/synproxy at all?

I guess that is a reasonably safe assumption. syncookies are rather new
and probably need more battle testing. synproxy never helped me much in
case of a SYN attack since it will cause pf(4) to hit the state limit no
matter what you do and then stuff starts to break.

-- 
:wq Claudio



Re: Raid0 max volume size

2019-11-09 Thread Otto Moerbeek
On Sat, Nov 09, 2019 at 07:01:02AM -0700, Raymond, David wrote:

> Does raid0 allow the creation of file systems bigger than the 2 TB limit of 
> ffs?

Yes. And ffs in general does not have that limit. newfs will move to
ffs2 if needed.

-Otto



Raid0 max volume size

2019-11-09 Thread Raymond, David
Does raid0 allow the creation of file systems bigger than the 2 TB limit of ffs?

Dave Raymond

-- 
David J. Raymond
david.raym...@nmt.edu
http://physics.nmt.edu/~raymond



Re: Display flickers after upgrade to 6.6

2019-11-09 Thread Claus Reheis
The

xfwm4 --vblank=xpresent --replace &

did fix this for me until last update made the problem gone for me
permanently!

Thx

Here is my dmesg:

OpenBSD 6.6 (GENERIC.MP) #0: Sat Oct 26 08:08:07 MDT 2019
r...@syspatch-66-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/
GENERIC.MP
real mem = 8468377600 (8076MB)
avail mem = 8199020544 (7819MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xec1b0 (28 entries)
bios0: vendor American Megatrends Inc. version "UX303LAB.210" date
08/25/2015
bios0: ASUSTeK COMPUTER INC. UX303LAB
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT ECDT MCFG HPET SSDT UEFI SSDT ASF!
SSDT SSDT TPM2 SSDT SSDT SSDT PCCT SSDT SSDT DMAR BGRT
acpi0: wakeup devices PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) PEGP(S4)
RP01(S4) RP02(S4) RP03(S4) RP04(S4) RP05(S4) RP06(S4) RP07(S4) RP08(S4)
GLAN(S4) EHC1(S3) [...]
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) i5-5200U CPU @ 2.20GHz, 2494.68 MHz, 06-3d-04
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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz, 2494.24 MHz, 06-3d-04
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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz, 2494.23 MHz, 06-3d-04
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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz, 2494.23 MHz, 06-3d-04
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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
acpimadt0: bogus nmi for apid 0
acpimadt0: bogus nmi for apid 2
acpimadt0: bogus nmi for apid 1
acpimadt0: bogus nmi for apid 3
acpiec0 at acpi0
acpimcfg0 at acpi0
acpimcfg0: addr 0xf800, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 1 (RP01)
acpiprt5 at acpi0: bus -1 (RP02)
acpiprt6 at acpi0: bus -1 (RP03)
acpiprt7 at acpi0: bus 2 (RP04)
acpiprt8 at acpi0: bus -1 (RP05)
acpiprt9 at acpi0: bus -1 (RP06)
acpiprt10 at acpi0: bus -1 (RP07)
acpiprt11 at acpi0: bus -1 (RP08)
acpicpu0 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PG00, resource for PEG0
acpipwrres1 at acpi0: PG01, resource for PEG1
acpipwrres2 at acpi0: PG02, resource for PEG2
acpitz0 at acpi0: 

Re: OpenBSD -current on T495

2019-11-09 Thread Thomas de Grivel
Sure, here it is :

OpenBSD 6.6-current (GENERIC.MP) #442: Sat Nov  9 01:36:23 MST 2019
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 23478448128 (22390MB)
avail mem = 22754553856 (21700MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.1 @ 0xb9ecc000 (63 entries)
bios0: vendor LENOVO version "R12ET44W(1.14 )" date 09/14/2019
bios0: LENOVO 20NJCTO1WW
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT SSDT SSDT TPM2 SSDT MSDM SLIC BATB HPET
APIC MCFG SBST WSMT IVRS SSDT CRAT CDIT FPDT SSDT SSDT SSDT UEFI
acpi0: wakeup devices GPP0(S3) GPP1(S3) GPP2(S3) GPP3(S3) GPP4(S3)
L850(S3) GPP5(S3) GPP6(S3) GP17(S3) XHC0(S3) XHC1(S3) GP18(S3)
LID_(S3) SLPB(S3)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Ryzen 7 PRO 3700U w/ Radeon Vega Mobile Gfx, 2295.97 MHz, 17-18-01
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
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 7 PRO 3700U w/ Radeon Vega Mobile Gfx, 2295.66 MHz, 17-18-01
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
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD Ryzen 7 PRO 3700U w/ Radeon Vega Mobile Gfx, 2295.66 MHz, 17-18-01
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
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD Ryzen 7 PRO 3700U w/ Radeon Vega Mobile Gfx, 2295.67 MHz, 17-18-01
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
cpu3: smt 1, core 1, package 0
cpu4 at mainbus0: apid 4 (application processor)
cpu4: AMD Ryzen 7 PRO 3700U w/ Radeon Vega Mobile Gfx, 2295.66 MHz, 17-18-01
cpu4: 

Re: random packet drops with syncookies/synproxy

2019-11-09 Thread Markus Wernig
Hm, also no replies to that one :-)

On 11/6/19 8:15 PM, Markus Wernig wrote:

> So just to make sure: Is anybody using syncookies and/or synproxy in
> production in a similar setup?

So nobody is using syncookies/synproxy at all?

best /m



Re: OpenBSD -current on T495

2019-11-09 Thread Tony Boston
Could you please provide a dmesg output? The info you gave is not very helpful 
without it.

--
Tony

GPG-FP: 49CC8250 CDCF2183 6209C1AE 625677C1 F7783D5F
Threema: DN8PJX4Z






> On 9. Nov 2019, at 12:08, Thomas de Grivel  wrote:
> 
> Everything works except wifi, suspend/resume and screen backlight, and
> mute speakers button.
> 
> --
> Thomas de Grivel
> kmx.io
> 



OpenBSD -current on T495

2019-11-09 Thread Thomas de Grivel
Everything works except wifi, suspend/resume and screen backlight, and
mute speakers button.

--
 Thomas de Grivel
 kmx.io



Re: Value of eax register after BIOS interrupt call from boot(8)

2019-11-09 Thread Julius Zint
> 
> Index: arch/amd64/stand/libsa/gidt.S
> ===
> RCS file: /cvs/src/sys/arch/amd64/stand/libsa/gidt.S,v
> retrieving revision 1.11
> diff -u -p -u -r1.11 gidt.S
> --- arch/amd64/stand/libsa/gidt.S 27 Oct 2012 15:43:42 -  1.11
> +++ arch/amd64/stand/libsa/gidt.S 9 Nov 2019 06:50:57 -
> @@ -423,14 +423,6 @@ intno= . - 1
>   movl%edx, 0x9*4(%esp)
>   movb%bh , 0xe*4(%esp)
> 
> - /* clear NT flag in eflags */
> - /* Martin Fredriksson  */
> - pushf
> - pop %eax
> - and $0xbfff, %eax
> - push%eax
> - popf
> -
>   /* save registers into save area */
>   movl%eax, _C_LABEL(BIOS_regs)+BIOSR_AX
>   movl%ecx, _C_LABEL(BIOS_regs)+BIOSR_CX
> @@ -438,6 +430,13 @@ intno= . - 1
>   movl%ebp, _C_LABEL(BIOS_regs)+BIOSR_BP
>   movl%esi, _C_LABEL(BIOS_regs)+BIOSR_SI
>   movl%edi, _C_LABEL(BIOS_regs)+BIOSR_DI
> +
> + /* clear NT flag in eflags */
> + pushf
> + pop %eax
> + and $0xbfff, %eax
> + push%eax
> + popf
> 
>   pop %gs
>   pop %fs
> Index: arch/i386/stand/libsa/gidt.S
> ===
> RCS file: /cvs/src/sys/arch/i386/stand/libsa/gidt.S,v
> retrieving revision 1.36
> diff -u -p -u -r1.36 gidt.S
> --- arch/i386/stand/libsa/gidt.S  31 Oct 2012 13:55:58 -  1.36
> +++ arch/i386/stand/libsa/gidt.S  9 Nov 2019 06:51:29 -
> @@ -426,14 +426,6 @@ intno= . - 1
>   movl%edx, 0x9*4(%esp)
>   movb%bh , 0xe*4(%esp)
> 
> - /* clear NT flag in eflags */
> - /* Martin Fredriksson  */
> - pushf
> - pop %eax
> - and $0xbfff, %eax
> - push%eax
> - popf
> -
>   /* save registers into save area */
>   movl%eax, _C_LABEL(BIOS_regs)+BIOSR_AX
>   movl%ecx, _C_LABEL(BIOS_regs)+BIOSR_CX
> @@ -441,6 +433,13 @@ intno= . - 1
>   movl%ebp, _C_LABEL(BIOS_regs)+BIOSR_BP
>   movl%esi, _C_LABEL(BIOS_regs)+BIOSR_SI
>   movl%edi, _C_LABEL(BIOS_regs)+BIOSR_DI
> +
> + /* clear NT flag in eflags */
> + pushf
> + pop %eax
> + and $0xbfff, %eax
> + push%eax
> + popf
> 
>   pop %gs
>   pop %fs

These changes work for me. As part of my Masterthesis im working on a
measured boot with OpenBSD and to communicate with the TPM from within boot
(8) BIOS calls are a convenient way to do so.

Thanks for the fast response

Julius