Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - dbyte

#1
Well .. back to the drawing board. The latest release of OpenSense 24.7 (not sure when this broke) but I can no longer get the MMIO working using the above method. console logs give

ns8250: UART FCR is brokene FIFO> iomem 0xfedc9000-0xfedc9fff,0xfedc7000-0xfedc7fff irq 3 on acpi0
uart2: console (111111,n,8,1)
ioapic0: routing intpin 3 (ISA IRQ 3) to lapic 12 vector 54
uart2: fast interrupt
uart2: PPS capture mode: DCD

Also noted that my 10Gb SFP's (one Opt, One TP) both show up as having no link .. even though tcpdump will show traffic on both interfaces and I have link lights. I have tried a couple different brands with no change.
#2
Thanks Lior for that information. I will give it a try again as using loader.conf.local would be a cleaner way of doing it.

I have a lot of experience in the UNIX world in general and even more searching the net for solutions :)
I originally found the console variable from http://bsdimp.blogspot.com/2018/07/how-to-get-memory-mapped-serial-console.html but he never fully detailed his solution or if it worked properly (This was from 2018)

The right way to fix this problem would be to detect MMIO devices in the OS itself (kernel or otherwise) It seems MMIO devices are not going to go away anytime soon.
#3
So it appears to me to be a bug of some sort.

In Webconsole I added tunables
hw.uart.console      environment   mm:0xfedc9000,rs:2,bd:1

If I enable EFI console only, then I see all of the console output, but get no login
If I enable EFI and comconsole, then the console output freezes very soon after the boot starts and I get no login

/dev/ttyu0 is create either way and it is my MMIO serial connection

if I enable EFI console only and then go to the web GUI and enable serial, I get a login on console immediately. but on reboot, I get the full console freeze

Right now I have solved it this way

1. enable EFI console only
2. I modified /usr/local/etc/inc/system.inc

Line 1157

From
     $on_off_secure_u = $serial_enabled ? (isset($config['system']['serialusb']) ? 'on' : 'onifconsole') . ' secure' : 'off secure';
---
To
     $on_off_secure_u = $serial_enabled ? (isset($config['system']['serialusb']) ? 'on' : 'onifconsole') . ' secure' : 'onifexists secure';


Everything is working for me now, but not the right way to fix this problem




#4
Hi,
   Going a little nuts. I managed to boot and install OPNSense on my new server (SolidRun Bedrock v3000) and it is using a not so standard MMIO serial console. I can interrupt the loader at boot and add the appropriate hw.uart.console, but I am stumped on how to permanently configure this.

at initial boot I put this manually in the loader
hw.uart.console="mm:0xfedc9000,rs:2"

serial console works fine if i manually set it at boot time

I have tried adding it to tunables with no success and trying /boot/loader.conf.local

It appears to be using /dev/ttyu0 for the console when working.

OPNsense 23.7.r2-amd64
FreeBSD 13.2-RELEASE-p1

CPU type   AMD Ryzen Embedded V3C18I 8-Core Processor (8 cores, 16 threads)

root@OPNsense:~ # dmesg | grep -i uart
uart0: <16x50 with 256 byte FIFO> iomem 0xfedc9000-0xfedc9fff,0xfedc7000-0xfedc7fff irq 3 flags 0x10 on acpi0


root@OPNsense:~ # sysctl -a | grep uart
uart0: <16x50 with 256 byte FIFO> iomem 0xfedc9000-0xfedc9fff,0xfedc7000-0xfedc7fff irq 3 flags 0x10 on acpi0
device   uart_ns8250
device   uart
debug.uart_force_poll: 0
debug.uart_poll_freq: 50
irq3: uart0:5 @cpu0(domain0): 0
dev.uart.0.rx_overruns: 0
dev.uart.0.pps_mode: 2
dev.uart.0.%parent: acpi0
dev.uart.0.%pnpinfo: _HID=AMDI0020 _UID=0 _CID=none
dev.uart.0.%location: handle=\_SB_.FUR0
dev.uart.0.%driver: uart
dev.uart.0.%desc: 16x50 with 256 byte FIFO
dev.uart.%parent: