Progress on WatchGuard T-70 hardware
-
@stephenw10 said in Progress on WatchGuard T-70 hardware:
You might also choose to use the filer pkg to store scripts in the config if you need to do that.
What files are required there? It's using it's own driver?
Nope. Agent determined that we didn't need to bring anything into the box directly. Uses registers directly to control the LEDs (with guardrails against hitting PIN2 and knocking off the entire network stack).
AI Summary:
The whole thing runs on what pfSense CE 2.9.0 already ships.Why there's no driver: pfSense has no Braswell GPIO driver. chvgpio(4) isn't in the kernel and there are no /dev/gpioc* nodes, so gpioctl is not an option. Rather than build or import a kernel module, chvpad.py mmaps /dev/mem and writes the SoC pad-control registers directly — north pad community at 0xFED88000, PADCTRL0 at 0x4400 + 8 × line, active-low. That's why everything, including t70-led show, needs root: /dev/mem is root:kmem.
What it depends on, all stock:
Dependency/Source
- /usr/local/bin/python3.11 (with mmap) ships with CE 2.9.0
- /sbin/ifconfig, /sbin/pfctl, /usr/bin/netstat FreeBSD base
- dpinger socket + /var/run files pfSense's own gateway monitoring
- config.xml parsing Python stdlib xml.etree
The Python modules import only stdlib (mmap, struct, os, socket, subprocess, glob, re, xml.etree) — no pip, no pkg install, nothing from ports. That was deliberate: pfSense discourages pulling packages in, and the on-box python3.11 made it unnecessary.
The one real cost of going register-direct is that line 2 of the same community is the NIC/PHY reset, so a stray write would reset every Ethernet port. Two guards sit in front of that: chvpad writes only lines 1/3/5/7, and the target's PADCTRL0 must match the LED-pad signature (& 0xFFFFFFFC == 0x00118100), which line 2 fails on the TERM_UP bit.
-
Ah, interesting. We might be able to get that module included. Though writing directly is probably more version independent. Hmm.
Is this code up somewhere?
-
@stephenw10 said in Progress on WatchGuard T-70 hardware:
Ah, interesting. We might be able to get that module included. Though writing directly is probably more version independent. Hmm.
Is this code up somewhere?
Not yet, waiting on my switch controller results. Which I should have time to work on in a couple of days. I'll do the same thing I did for the Ubuntu version, I'll get a public repo up on Github and link it here for you either way.
-
Just for reference it looks to find the gpios OK but you need the gpiobus modules too:
gpio0: <Intel Cherry View GPIO> iomem 0xfed80000-0xfed87fff irq 49 on acpi0 gpiobus0: <GPIO bus (ACPI-hinted)> on gpio0 gpioc0: <GPIO controller> at pins 0-55 on gpiobus0 gpio1: <Intel Cherry View GPIO> iomem 0xfed88000-0xfed8ffff irq 48 on acpi0 gpiobus1: <GPIO bus (ACPI-hinted)> on gpio1 gpioc1: <GPIO controller> at pins 0-58 on gpiobus1 gpio2: <Intel Cherry View GPIO> iomem 0xfed90000-0xfed97fff irq 50 on acpi0 gpiobus2: <GPIO bus (ACPI-hinted)> on gpio2 gpioc2: <GPIO controller> at pins 0-23 on gpiobus2 gpio3: <Intel Cherry View GPIO> iomem 0xfed98000-0xfed9ffff irq 91 on acpi0 gpiobus3: <GPIO bus (ACPI-hinted)> on gpio3 gpioc3: <GPIO controller> at pins 0-54 on gpiobus3 gpiobus3: invalid pin 0x51, max: 0x36 (bad ACPI tables?) [2.9.0-RELEASE][admin@t70.stevew.lan]/root: ls /dev/gp gpioc0% gpioc1% gpioc2% gpioc3% gpt/ [2.9.0-RELEASE][admin@t70.stevew.lan]/root: gpioctl Usage: gpioctl [-f ctldev] -l [-v] gpioctl [-f ctldev] [-pN] -t pin gpioctl [-f ctldev] [-pN] -c pin flag ... gpioctl [-f ctldev] [-pN] -n pin pin-name gpioctl [-f ctldev] [-pN] pin [0|1] [2.9.0-RELEASE][admin@t70.stevew.lan]/root: gpioctl -f /dev/gpioc1 -l pin 00: 1 GPIO_DFX0_PAD<OUT> pin 01: 0 GPIO_DFX3_PAD<IN> pin 02: 0 GPIO_DFX7_PAD<IN> pin 03: 0 GPIO_DFX1_PAD<IN> pin 04: 1 GPIO_DFX5_PAD<OUT> pin 05: 0 GPIO_DFX4_PAD<IN> pin 06: 1 GPIO_DFX8_PAD<OUT> pin 07: 0 GPIO_DFX2_PAD<IN> pin 08: 0 GPIO_DFX6_PAD<> pin 09: -1 <> pin 10: -1 <> pin 11: -1 <> pin 12: -1 <> pin 13: -1 <> pin 14: -1 <> pin 15: 0 SEC_GPIO_SUS11_PAD<IN> pin 16: 0 GPIO_SUS4_PAD<> pin 17: 0 SEC_GPIO_SUS8_PAD<> pin 18: 1 GPIO_SUS2_PAD<OUT> pin 19: 0 GPIO_SUS6_PAD<> pin 20: 0 CX_PREQ_B_PAD<IN> pin 21: 0 SEC_GPIO_SUS9_PAD<> pin 22: 0 TRST_B_PAD<IN> pin 23: 0 TCK_PAD<> pin 24: 0 PROCHOT_B_PAD<IN> pin 25: 1 SVID0_DATA_PAD<OUT> pin 26: 1 TMS_PAD<OUT> pin 27: 0 CX_PRDY_B_2_PAD<> pin 28: -1 <> pin 29: -1 <> pin 30: 0 SVID0_ALERT_B_PAD<> pin 31: 0 TDO_PAD<> pin 32: 1 SVID0_CLK_PAD<OUT> pin 33: 1 TDI_PAD<OUT> pin 34: 1 GP_CAMERASB05_PAD<OUT> pin 35: 1 GP_CAMERASB02_PAD<OUT> pin 36: 1 GP_CAMERASB08_PAD<OUT> pin 37: 1 GP_CAMERASB00_PAD<OUT> pin 38: 1 GP_CAMERASB06_PAD<OUT> pin 39: 1 GP_CAMERASB10_PAD<OUT> pin 40: 1 GP_CAMERASB03_PAD<OUT> pin 41: 1 GP_CAMERASB09_PAD<OUT> pin 42: -1 <> pin 43: -1 <> pin 44: -1 <> pin 45: 0 GP_CAMERASB04_PAD<> pin 46: 0 PANEL0_BKLTEN_PAD<> pin 47: 0 HV_DDI0_HPD_PAD<> pin 48: 0 HV_DDI2_DDC_SDA_PAD<> pin 49: 0 PANEL1_BKLTCTL_PAD<> pin 50: 0 HV_DDI1_HPD_PAD<> pin 51: 0 PANEL0_BKLTCTL_PAD<> pin 52: 0 HV_DDI0_DDC_SDA_PAD<> pin 53: 0 HV_DDI2_DDC_SCL_PAD<> pin 54: 0 HV_DDI2_HPD_PAD<> pin 55: 0 PANEL1_VDDEN_PAD<> pin 56: 0 PANEL1_BKLTEN_PAD<> pin 57: -1 <> pin 58: -1 <>Neither module is in a 2.9.0 install by default as you found.
-
I've installed ubuntu server (latest) on my Firebox T70, and can confirm that your kernel module and scripts works flawlessly. Can't wait to have them ported to freebsd / pfsense!
Naturally, my test hardware is available for use!
-
@ema81 said in Progress on WatchGuard T-70 hardware:
I've installed ubuntu server (latest) on my Firebox T70, and can confirm that your kernel module and scripts works flawlessly. Can't wait to have them ported to freebsd / pfsense!
Naturally, my test hardware is available for use!
Awesome! I believe you are the very first user of my very first public repo!
I'm burning personal tokens on the development so I have to spread it out over the week(s) in-between my other projects, etc. but I've started working on the pfSense port. LED control is sorted and I'm directing my Agent on the draft plan for the networking control.
-
It will be very interesting to try this on the T55 because that only has the switch ports. Basically useless without being able to use them separately.
-
Hi all,
I found this thread while researching the exact same problem (WatchGuard T70 ports 3-7 dead under OPNsense/FreeBSD). Full disclosure up front: I'm not a developer — I'm an IT technician, and I used an AI assistant to help with the reverse engineering, writing the code, and documenting all of it. I'm posting this so you know the context and can judge the work accordingly, not as something written by an experienced kernel developer.
That said, it's been tested end-to-end on a real T70: the Marvell 88E6176 switch behind igb3 comes up, ports 3-7 get link, and I've confirmed real traffic (DHCP + ping with an external device) through one of them. It also survives a reboot via an OPNsense boot script.
The FreeBSD-specific piece that was missing (and that cost the most time to find): WatchGuard's actual driver calls e1000_set_i2c_bb() on igb3 before touching CTRL_EXT/I2CPARAMS that FreeBSD's if_igb(4)never sets by default (Linux's mainline igb does, which is probably why @rtober's Ubuntu driver never needed this step explicitly).
Everything is a userspace tool for now (no real kernel module yet — that's the next step, and exactly where I'd need help from someone who actually knows FreeBSD's newbus/mdio(4)/e6000sw(4) stack).
Repo, with the full writeup and register-level evidence: https://github.com/Bullo995/t70-marvell-switch-driver
-
Fixed your link.
Looks interesting.
I would say that you shouldn't need to configure the switch with the tool. You only need to expose the mdio interface and then use etherswitchcfg to configure it. Then you can (potentially) use the switch gui components to set that up.
-
Mmm, it might actually be quite easy to do this. The mdio and switch drivers only require some device hints to tell them where the hardware. So on the M270 for example:
hint.mdio.0.at="ix1" hint.e6000sw.0.addr=0 hint.e6000sw.0.is6190=1 hint.e6000sw.0.port0disabled=1 hint.e6000sw.0.port9cpu=1 hint.e6000sw.0.port10cpu=1 hint.e6000sw.0.port9speed=2500 hint.e6000sw.0.port10speed=2500That required mdio support to be added to ixgbe: https://reviews.freebsd.org/D50128
Replicating that effort for igb would likely suffice here.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy