Re: fix uchcom(4) handling of parity and character size config

2021-10-26 Thread Felix Kronlage-Dammers
On Wed, Oct 27, 2021 at 06:46:38AM +1000, David Gwynne wrote:

Hi David,

> this ports the functionality to support configuring parity and char size
> masks from netbsd src/sys/dev/usb/uchcom.c r1.26. part of that change
> including tweaks to uchcom_reset_chip, which was then changed in r1.28
> back to what we already have, so i left that chunk out.
> 
> ive tested this talking to a device at 19200 with cs8 and even
> parity. more tests would be appreciated to make sure i haven't
> broken existing use functionality.

I use uchcom(4) to connect with 115200 to the pinebook pro. I see no
regressions with your diff, works fine.

felix



pcidevs: intel gemini lake mei

2021-10-21 Thread Felix Kronlage-Dammers
hi,

found this mei pci device id in a gemini lake based shuttle pc.

Index: sys/dev/pci/pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1977
diff -u -p -u -r1.1977 pcidevs
--- sys/dev/pci/pcidevs 29 Sep 2021 12:18:08 -  1.1977
+++ sys/dev/pci/pcidevs 21 Oct 2021 20:49:51 -
@@ -4969,6 +4969,7 @@ product INTEL GLK_DPTF0x318c  Gemini La
 product INTEL GLK_GNA  0x3190  Gemini Lake GNA
 product INTEL GLK_PMC  0x3194  Gemini Lake PMC
 product INTEL GLK_HDA  0x3198  Gemini Lake HD Audio
+product INTEL GLK_MEI  0x319a  Gemini Lake MEI
 product INTEL GLK_XHCI 0x31a8  Gemini Lake xHCI
 product INTEL GLK_I2C_10x31ac  Gemini Lake I2C
 product INTEL GLK_I2C_20x31ae  Gemini Lake I2C


felix

-- 
GPG:   824CE0F0 /  2082 651E 5104 F989 4D18  BB2E 0B26 6738 824C E0F0 
https://hazardous.org/  -  f...@hazardous.org  -  fkr@irc - @felixkronlage
OpenBSD 7.0-current (GENERIC.MP) #25: Thu Oct 21 23:11:33 CEST 2021
f...@shuttle.fritz.box:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16961589248 (16175MB)
avail mem = 16431550464 (15670MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xea900 (51 entries)
bios0: vendor American Megatrends Inc. version "1.00" date 01/26/2018
bios0: Shuttle Inc. DL10J
acpi0 at bios0: ACPI 6.1
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP FPDT FIDT MCFG HPET LPIT APIC NPKT SSDT SLIC SSDT SSDT 
SSDT SSDT SSDT SSDT UEFI DBGP DBG2 DMAR WDAT WSMT
acpi0: wakeup devices HDAS(S3) XHC_(S4) XDCI(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)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimcfg0 at acpi0
acpimcfg0: addr 0xe000, bus 0-255
acpihpet0 at acpi0: 1920 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Celeron(R) J4005 CPU @ 2.00GHz, 1994.48 MHz, 06-7a-01
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,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu0: 4MB 64b/line 16-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 19MHz
cpu0: mwait min=64, max=64, C-substates=0.2.0.2.4.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Celeron(R) J4005 CPU @ 2.00GHz, 1994.48 MHz, 06-7a-01
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,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 120 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 4 (RP01)
acpiprt2 at acpi0: bus 5 (RP02)
acpiprt3 at acpi0: bus 1 (RP03)
acpiprt4 at acpi0: bus -1 (RP04)
acpiprt5 at acpi0: bus 2 (RP05)
acpiprt6 at acpi0: bus 3 (RP06)
acpiec0 at acpi0: not present
acpipci0 at acpi0 PCI0: 0x0004 0x0011 0x0001
acpicmos0 at acpi0
acpibtn0 at acpi0: PWRB
glkgpio0 at acpi0 GPO1 uid 1 addr 0xd0c4/0xcef irq 14, 80 pins
glkgpio1 at acpi0 GPO0 uid 2 addr 0xd0c5/0xaff irq 14, 80 pins
glkgpio2 at acpi0 GPO2 uid 3 addr 0xd0c9/0x7bf irq 15, 20 pins
glkgpio3 at acpi0 GPO3 uid 4 addr 0xd0c8/0x82f irq 14, 35 pins
"INT33A1" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
acpipwrres0 at acpi0: DRST
acpipwrres1 at acpi0: DRST
acpipwrres2 at acpi0: DRST
acpipwrres3 at acpi0: DRST
acpipwrres4 at acpi0: DRST
acpipwrres5 at acpi0: DRST
acpipwrres6 at acpi0: WRST
acpicpu0 at acpi0: C3(10@150 mwait.1@0x60), C2(10@50 mwait.1@0x21), C1(1000@1 
mwait.1@0x1), PSS
acpicpu1 at acpi0: C3(10@150 mwait.1@0x60), C2(10@50 mwait.1@0x21), C1(1000@1 
mwait.1@0x1), PSS
acpipwrres7 at acpi0: FN00, resource for FAN0
acpitz0 at acpi0: critical temperature is 95 degC
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 1994 MHz: speeds: 2001, 2000, 1900, 1800, 1700, 1600, 
1500, 1400, 1300, 1200, 1100, 1000, 900, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Gemini Lake Host" rev 0x03
inteldrm0 at pci0 dev 2 function 0 "Intel UHD 

Re: agintc(4): initialize IGROUP (tests required on RK3399 like RockPro64 or Pinebook Pro)

2021-10-21 Thread Felix Kronlage-Dammers
On Thu, Oct 21, 2021 at 08:18:40PM +0200, Patrick Wildt wrote:

Hi Patrick,

> This diff is one of two steps in getting Parallels on Apple M1s to work.
> It initializes two registers to configure the interrupts as GNS1.
> 
> It works fine on the Ampere machine that I have access to, but it would
> be very nice if someone can give this a try on an RK3399 machine like
> the Pinebook Pro or the RockPro64.
> 
> Expected outcome: Machines continue to boot up and work like before.

seems fine on the Pinebook Pro here, boots just like before.

felix

-- 
GPG:   824CE0F0 /  2082 651E 5104 F989 4D18  BB2E 0B26 6738 824C E0F0 
https://hazardous.org/  -  f...@hazardous.org  -  fkr@irc - @felixkronlage



Re: iwx(4) 40MHz channel support

2021-10-12 Thread Felix Kronlage-Dammers
On Tue, Oct 12, 2021 at 04:29:47PM +0200, Hrvoje Popovski wrote:

> > Please sync your source tree before attempting to apply this patch.
> > I have committed some changes to this driver today which this patch
> > is based on.
> > Works for me on AX200/AX201. Does anyone else want to do a pre-commit test?
> with this diff i'm getting 150Mbps vs 100Mbps without it here at home

similar difference for me. 90/100 (with) vs. 50/60 (without) diff here.

felix

-- 
GPG:   824CE0F0 /  2082 651E 5104 F989 4D18  BB2E 0B26 6738 824C E0F0 
https://hazardous.org/  -  f...@hazardous.org  -  fkr@irc - @felixkronlage



Adjust url of SD Association in comment in sdhc.c

2021-06-12 Thread Felix Kronlage-Dammers
hi,

the legit URL of the SD Associations is www.sdcard.org, not
www.sdcard.com.

felix



Index: sys/dev/sdmmc/sdhc.c
===
RCS file: /cvs/src/sys/dev/sdmmc/sdhc.c,v
retrieving revision 1.69
diff -u -p -u -r1.69 sdhc.c
--- sys/dev/sdmmc/sdhc.c14 Aug 2020 14:49:04 -  1.69
+++ sys/dev/sdmmc/sdhc.c13 Jun 2021 03:36:39 -
@@ -18,7 +18,7 @@
 
 /*
  * SD Host Controller driver based on the SD Host Controller Standard
- * Simplified Specification Version 1.00 (www.sdcard.com).
+ * Simplified Specification Version 1.00 (www.sdcard.org).
  */
 
 #include 

-- 
GPG/PGP:   7A0B612C /  5F4D 9B06 C240 3250 35BF  66ED 1AD3 A9B8 7A0B 612C
https://hazardous.org/  -  f...@hazardous.org  -  fkr@irc - @felixkronlage



couple devices found on a intel nuc 10i7FNH

2021-05-30 Thread Felix Kronlage-Dammers
ahoi,

recognize couple devices found in a Intel Nuc 10i7FNH.
Since the JHL7540 exists with a few pci ids, this suffixes the existing
one so it matches with the new addition.

felix



Index: sys/dev/pci/pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1970
diff -u -p -u -r1.1970 pcidevs
--- sys/dev/pci/pcidevs 19 May 2021 05:20:48 -  1.1970
+++ sys/dev/pci/pcidevs 30 May 2021 19:24:05 -
@@ -302,6 +302,7 @@ vendor  ALTIMA  0x173b  Altima
 vendor ANTARES 0x1754  Antares Microsystems
 vendor CAVIUM  0x177d  Cavium
 vendor BELKIN2 0x1799  Belkin
+vendor GENESYS 0x17a0  Genesys Logic
 vendor LENOVO  0x17aa  Lenovo
 vendor HAWKING 0x17b3  Hawking Technology
 vendor NETCHIP 0x17cc  NetChip Technology
@@ -3034,6 +3035,9 @@ product FUSIONIO IOXTREME_PRO 0x1007  ioX
 /* Future Domain products */
 product FUTUREDOMAIN TMC_18C30 0x  TMC-18C30
 
+/* Genesys Logic products */
+product GENESYS GLI_9755   0x9755  SDHC
+
 /* Guillemot products */
 product GEMTEK PR103   0x1001  PR103
 
@@ -3977,9 +3981,12 @@ product INTEL I219_V90x15e2  I219-V
 product INTEL I219_LM5 0x15e3  I219-LM
 product INTEL X550EM_A_1G_T0x15e4  X553 SGMII
 product INTEL X550EM_A_1G_T_L  0x15e5  X553 SGMII
-product INTEL JHL7540_PCIE 0x15ea  JHL7540 Thunderbolt 3
-product INTEL JHL7540  0x15eb  JHL7540 Thunderbolt 3
-product INTEL JHL7540_XHCI 0x15ec  JHL7540 Thunderbolt 3
+product INTEL JHL7540_PCIE_1   0x15e7  JHL7540 Thunderbolt 3
+product INTEL JHL7540_10x15e8  JHL7540 Thunderbolt 3
+product INTEL JHL7540_XHCI_1   0x15e9  JHL7540 Thunderbolt 3
+product INTEL JHL7540_PCIE_2   0x15ea  JHL7540 Thunderbolt 3
+product INTEL JHL7540_20x15eb  JHL7540 Thunderbolt 3
+product INTEL JHL7540_XHCI_2   0x15ec  JHL7540 Thunderbolt 3
 product INTEL I225_LM  0x15f2  I225-LM
 product INTEL I225_V   0x15f3  I225-V
 product INTEL I219_LM150x15f4  I219-LM


-- 
GPG/PGP:   7A0B612C /  5F4D 9B06 C240 3250 35BF  66ED 1AD3 A9B8 7A0B 612C



recognize eMMC/SDXC Intel 100 Series found in Tuxedo InfinityBook 14 v2

2019-08-22 Thread Felix Kronlage-Dammers
Hi,

couple devices found in the Tuxedo InfinityBook 14 v2.

felix


Index: sys/dev/pci/pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1894
diff -u -p -u -r1.1894 pcidevs
--- sys/dev/pci/pcidevs 13 Aug 2019 03:17:11 -  1.1894
+++ sys/dev/pci/pcidevs 22 Aug 2019 18:17:44 -
@@ -5343,6 +5343,8 @@ product INTEL 100SERIES_LP_UART_1 0x9d27
 product INTEL 100SERIES_LP_UART_2  0x9d28  100 Series UART
 product INTEL 100SERIES_LP_SPI_2   0x9d29  100 Series SPI
 product INTEL 100SERIES_LP_SPI_3   0x9d2a  100 Series SPI
+product INTEL 100SERIES_LP_EMMC0x9d2b  100 Series eMMC
+product INTEL 100SERIES_LP_SDXC0x9d2d  100 Series SDXC
 product INTEL 100SERIES_LP_XHCI0x9d2f  100 Series xHCI
 product INTEL 100SERIES_LP_THERM   0x9d31  100 Series Thermal
 product INTEL 100SERIES_LP_ISH 0x9d35  100 Series ISH

-- 
GPG/PGP:   7A0B612C /  5F4D 9B06 C240 3250 35BF  66ED 1AD3 A9B8 7A0B 612C
https://hazardous.org/  -  fe...@kronlage.de  -  fkr@irc - @felixkronlage



Re: ldapd: add bsd.schema?

2018-05-16 Thread Felix Kronlage

Hi Reyk,

Reyk Floeter wrote:


could we add an LDAP schema file that makes it easier to use sshd's
"AuthorizedKeysCommand"?

While most howtos out there agree on the attribute name
"sshPublicKey", there is no common LDAP schema that implements it.
Some people patch nis.schema (which seems a bad idea), others add
their own schema files.


ack! Especially in regard to patching nis.schema.


What about adding our own schema (using OpenBSD's allocated
1.3.6.1.4.1.30155 PEN) that includes the required "sshPublicKey"
attribute?  It can be used to extend existing LDAP users with the
additional bsdAccount objectClass.


I think, this is a good idea.


felix



Re: Backout mclgeti for vr(4).

2010-08-31 Thread Felix Kronlage
On Mon, Aug 30, 2010 at 11:46:20PM +, Thordur I Bjornsson wrote:

Hi Thib!

  I have two machines with vr(4) interfaces running 4.7, and I can't seem
  to find any problem running ping -f against them.
  vr0 at pci0 dev 12 function 0 VIA VT6105 RhineIII rev 0x86: apic 2 int
  19 (irq 10), address 00:19:5b:82:a1:e0
  vr0 at pci0 dev 16 function 0 VIA Rhine/RhineII rev 0x06: irq 9,
  address 00:50:ba:bd:89:4d
  Is it possible that this bug only effects a few models?
 Possible. I can't remember what model I had (as I no longer have access
 to the machines) but it was a soekris.
 It was pretty easy for me to crash the machine, ~8 ping -f's (from
 two different hosts on a 1G lan).

For various reasons, I maintain a 4.5 copy of the vr(4) driver that
I've added the mclgeti and other things from current a while ago locally.
I just looked wether I get the box to crash or behave in any weird way.

| andor2 # ping -f foo.bytemine.net 
| PING foo.bytemine.net (134.106.XXX.XXX): 56 data bytes
| --- foo.bytemine.net ping statistics ---
| 1281377 packets transmitted, 1281369 packets received, 0.0% packet loss
| round-trip min/avg/max/std-dev = 0.160/0.493/64.885/0.683 ms

I will let that run for a while now and see. This is a Soekris 5501-60 with
vr(4). If it keeps running stable like that, I will go ahead and diff the
vr(4) drivers and see what the differences are.

felix



watchdog support for wbsio(4)

2010-01-18 Thread Felix Kronlage
+wbsio_wdog_set_timeout(void *self, int seconds)
+{
+   struct wbsio_softc *sc = (struct wbsio_softc *)self;
+   u_int8_t timer_reg;
+   int s;
+
+   DPRINTF((wbsio_set_timeout: %d\n, seconds));
+
+   if ((sc-sc_type == WBSIO_ID_W83627HF) || 
+   (sc-sc_type == WBSIO_ID_W83627THF))
+   timer_reg = WBSIO_WDOG_83627_TIMER;
+   if (sc-sc_type == WBSIO_ID_W83697HF)
+   timer_reg = WBSIO_WDOG_83697_TIMER;
+
+   s = splclock();
+
+   wbsio_conf_enable(sc-sc_iot, sc-sc_ioh);
+
+   if (seconds)
+   wbsio_conf_write(sc-sc_iot, sc-sc_ioh, timer_reg, seconds);
+   else
+   wbsio_conf_write(sc-sc_iot, sc-sc_ioh, timer_reg, 0);
+
+   wbsio_conf_disable(sc-sc_iot, sc-sc_ioh);
+   splx(s);
+   return seconds;
 }
Index: share/man/man4/wbsio.4
===
RCS file: /cvs/src/share/man/man4/wbsio.4,v
retrieving revision 1.2
diff -u -r1.2 wbsio.4
--- share/man/man4/wbsio.4  17 Feb 2008 16:48:47 -  1.2
+++ share/man/man4/wbsio.4  2 Jan 2010 16:00:19 -
@@ -27,22 +27,31 @@
 The
 .Nm
 driver provides support for the Winbond LPC Super I/O ICs.
-Only the hardware monitoring function is currently supported.
+Only the hardware monitoring and watchdog functions are currently supported.
 .Pp
 Support for the hardware monitor function is provided through the
 .Xr lm 4
 driver.
+.Pp
+The watchdog timer may be configured via
+.Xr sysctl 8 .
 .Sh SEE ALSO
 .Xr intro 4 ,
 .Xr isa 4 ,
-.Xr lm 4
+.Xr lm 4 ,
+.Xr watchdog 4 ,
+.Xr sysctl 8 
 .Sh HISTORY
 The
 .Nm
 driver first appeared in
 .Ox 4.3 .
+Support for the watchdog was added in
+.Ox 4.7 .
 .Sh AUTHORS
 The
 .Nm
 driver was written by
 .An Mark Kettenis Aq kette...@openbsd.org .
+Support for the watchdog timer was written by
+.An Felix Kronlage Aq f...@openbsd.org .