VirtualBox

Opened 6 years ago

Last modified 6 years ago

#17326 new defect

Serial ports do not work correctly

Reported by: apianti Owned by:
Component: EFI Version: VirtualBox 5.1.30
Keywords: Cc:
Guest type: all Host type: all

Description

Only serial ports COM1 and COM2 work in EFI mode. Any other serial port configurations are either not detected or do not perform any requested actions. EFI_SERIAL_IO_PROTOCOL seems to not be reliable in writing to the serial port, timeout happens before the timeout could have possibly passed, set to multiple seconds and it fails instantly. Trying to solve this by writing in a loop produces incorrect results as the size written is incorrectly reported so some data gets written multiple times. Also, garbage is always written to a serial port when the machine is started, sometime during post. This can be proven by assigning COM1 or COM2 to a Raw file output. I have attached an two examples. I have tested this in Windows, Linux, and macOS, so it appears to be a core EFI issue.

Attachments (2)

Output.1.txt (2.4 KB ) - added by apianti 6 years ago.
Output of serial port connected to raw file output
Output.2.txt (87 bytes ) - added by apianti 6 years ago.
Another output of serial port connected to raw file output

Download all attachments as: .zip

Change History (5)

by apianti, 6 years ago

Attachment: Output.1.txt added

Output of serial port connected to raw file output

by apianti, 6 years ago

Attachment: Output.2.txt added

Another output of serial port connected to raw file output

comment:1 by apianti, 6 years ago

It appears that the returned written size issue is not occurring anymore in VirtualBox 5.2.2 but the rest still applies.

EDIT: I was wrong about this, the timeout problem was just happening less but when it does happen the result is the same. The size is not updated when the result does not appear to be EFI_SUCCESS, and if it is updated, it's not correct. Also there appears to be times when the EFI_SERIAL_IO_PROTOCOL->Write method returns EFI_SUCCESS but writes multiples of some bytes.

Last edited 6 years ago by apianti (previous) (diff)

comment:2 by Valery Ushakov, 6 years ago

Problems with polled output: xref #12162

comment:3 by apianti, 6 years ago

This is a different but appears related issue. As I said you cannot use any serial port but COM1 or COM2 in EFI mode, the rest produce no EFI_SERIAL_IO_PROTOCOL or they don't work if they do. Garbage is still being written to the serial port in 5.2.2, as I attached above.

Last edited 6 years ago by apianti (previous) (diff)
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use