Open akashgj opened 4 years ago
I didn't try to set polling mode, but have the same: if VUART is used for host-BMC serial communications, it works only during POST stage. Update: Just tried to enable polling mode via setserial and there is a communication via VUART.
There's a solution discussed in this thread:
Unfortunately lore didn't archive the message with the solution for the UART routing (possibly due to it being an HTML message), but it's available here:
https://lists.ozlabs.org/pipermail/openbmc/attachments/20210802/bfd7d272/attachment.htm
The recipe is the following:
baud = 115200 local-tty = ttyS3 local-tty-baud = 115200
root@:/sys/devices/platform/ahb/ahb:apb/1e789000.lpc/1e78909c.uart_routing# echo -n uart4 > uart1 root@:/sys/devices/platform/ahb/ahb:apb/1e789000.lpc/1e78909c.uart_routing# echo -n uart1 > uart4 root@:/sys/devices/platform/ahb/ahb:apb/1e789000.lpc/1e78909c.uart_routing# cat uart* io1 io2 io3 io4 uart2 uart3 [uart4] io6 [io2] io3 io4 io1 uart3 uart4 uart1 io6 [io3] io4 io1 io2 uart4 uart1 uart2 io6 io4 io1 io2 io3 [uart1] uart2 uart3 io6 [io5] io1 io2 io3 io4 uart1 uart2 uart3 uart4 io6 root@:/sys/devices/platform/ahb/ahb:apb/1e789000.lpc/1e78909c.uart_routing#
uart1_clock_en() { local val=$(devmem 0x1e6e200c) local val2=$(iotools and $val 0xffff7fff) devmem 0x1e6e200c w $val2 || : }
or by patching kernel:
`
diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c
index bc8d130..a32502b 100644
--- a/drivers/clk/clk-aspeed.c
+++ b/drivers/clk/clk-aspeed.c
@@ -67,8 +67,8 @@ static const struct aspeed_gate_data aspeed_gates[] = {
[ASPEED_CLK_GATE_D1CLK] = { 10, 13, "d1clk-gate", NULL, 0 }, / GFX CRT /
[ASPEED_CLK_GATE_YCLK] = { 13, 4, "yclk-gate", NULL, 0 }, / HAC /
[ASPEED_CLK_GATE_USBPORT1CLK] = { 14, 14, "usb-port1-gate", NULL, 0 }, / USB2 hub/USB2 host port 1/USB1.1 dev /
` In latter case it is probably necessary to set up 0x1e6e200c register in U-Boot.
In case you want to use VUART there are 2 ways:
Fundamentally that all shouldn't be necessary. I haven't had the bandwidth to understand the problem and figure out what's going wrong.
The VUARTs work fine with interrupts on Power systems.
I am using BMC Aspeed AST-2500 in our motherboard with OpenBMC firmware. 'obmc-console' is used to get host messages over BMC. obmc-console.conf looks like
lpc-address = 0x3f8 sirq = 4 local-tty = ttyS4 local-tty-baud = 115200
BIOS serial redirection is enabled over COM port 0 (0x3f8, sirq=4, baudrate=115200) for super-IO.
we set /dev/ttyS0 in CentOS to work in polling mode by making its irq=0 using the following command
$ setserial /dev/ttyS0 uart 16550a irq 0
Now we are getting CentOS login prompt on SOL.
When we change /dev/ttyS0 back to interrupt mode with irq=4, we are not getting login prompt on SOL.