Bare Metal Logging Between Two Physical Systems
Posted: Sat Dec 28, 2024 6:58 pm
Hello
I was looking for advice on what would be a suitable replacement for serial ports when it comes to communicating from my osdev project (which is run on a bare metal machine) with another physically connected machine. I don't wish to use the machine's serial port any longer, as when I try to run my project on various laptops I own, they don't come with COM ports, and my main desktop has a weird COM port on the motherboard that I've spent a lot of money trying to connect to (via various adapters and dupont cables) but haven't ever been able to.
I do love the interface for utilizing the serial port for COM output. It's very easy to use and setup, and I'd love to get as close to this as I can if possible. Another preferable requirement of this setup would be that it works with most basic consumer PC hardware and motherboards without requiring thousands of lines of code to support new hardware.
So far I have experimented with libraries like TinyUSB and lwIP, but to no avail. The former is not designed to work with the USB MCUs on PC motherboards (according to the author), and lwIP appears to require decent sized changes depending on the hardware present. I recently read through the xHCI spec and just about got an interface setup via DbC, but this has also proven to be troublesome.
Does a relatively simple way to setup a communication channel between two consumer PCs exist using typical (or inexpensive) hardware?
Just in case it would be helpful, the specs for my desktop machine are as follows:
Motherboard: ASUS ProArt Z790 (w/ WiFi)
CPU: Intel i9-13900K
USB Controllers: x1 Intel (vendor ID: 0x8086, device ID: 0x7A60) USB 3.10 xHC, x1 Intel USB 3.20 xHC
Network Adapters: x1 Intel Wi-Fi 6E AX211 160MHz (802.11 a/b/g/n/ac/ax), x1 Bluetooth v5.3-capable device, x1 Marvell AQtion 10Gb Ethernet, x1 Intel 2.5Gb Ethernet
I also have several Thunderbolt ports, several USB-serial adapters, and would really love to not attach a DMA device into one of my PCIe slots in order to accomplish this (or buy + plug in some proprietary Segger/J-Link device).
Thank you guys for your time I really appreciate it and happy holidays!
Edit: Also, my osdev project is running in 64-bit mode, and is typically launched via EDK2 in UEFI's DXE space. It can be launched from any environment, however. Just in case that's helpful
I was looking for advice on what would be a suitable replacement for serial ports when it comes to communicating from my osdev project (which is run on a bare metal machine) with another physically connected machine. I don't wish to use the machine's serial port any longer, as when I try to run my project on various laptops I own, they don't come with COM ports, and my main desktop has a weird COM port on the motherboard that I've spent a lot of money trying to connect to (via various adapters and dupont cables) but haven't ever been able to.
I do love the interface for utilizing the serial port for COM output. It's very easy to use and setup, and I'd love to get as close to this as I can if possible. Another preferable requirement of this setup would be that it works with most basic consumer PC hardware and motherboards without requiring thousands of lines of code to support new hardware.
So far I have experimented with libraries like TinyUSB and lwIP, but to no avail. The former is not designed to work with the USB MCUs on PC motherboards (according to the author), and lwIP appears to require decent sized changes depending on the hardware present. I recently read through the xHCI spec and just about got an interface setup via DbC, but this has also proven to be troublesome.
Does a relatively simple way to setup a communication channel between two consumer PCs exist using typical (or inexpensive) hardware?
Just in case it would be helpful, the specs for my desktop machine are as follows:
Motherboard: ASUS ProArt Z790 (w/ WiFi)
CPU: Intel i9-13900K
USB Controllers: x1 Intel (vendor ID: 0x8086, device ID: 0x7A60) USB 3.10 xHC, x1 Intel USB 3.20 xHC
Network Adapters: x1 Intel Wi-Fi 6E AX211 160MHz (802.11 a/b/g/n/ac/ax), x1 Bluetooth v5.3-capable device, x1 Marvell AQtion 10Gb Ethernet, x1 Intel 2.5Gb Ethernet
I also have several Thunderbolt ports, several USB-serial adapters, and would really love to not attach a DMA device into one of my PCIe slots in order to accomplish this (or buy + plug in some proprietary Segger/J-Link device).
Thank you guys for your time I really appreciate it and happy holidays!
Edit: Also, my osdev project is running in 64-bit mode, and is typically launched via EDK2 in UEFI's DXE space. It can be launched from any environment, however. Just in case that's helpful