arch: initialize 4th serial port

Fix an off by one in the loop range so that all 4 UARTs are initialized.

Note that the 4th serial port (/dev/ttyS3) still doesn't work in Linux;
this is because our UART doesn't correctly emulate the loopback mode,
which is tested by the Linux serial driver.  This test is skipped for
the first three ports due to the UPF_SKIP_TEST flag in STD_COMX_FLAGS,
whereas STD_COM4_FLAGS does not set UPF_SKIP_TEST (and fails the test).
This will need to be resolved separately.

BUG=chromium:953983
TEST=`echo test > /dev/ttyS3` inside VM

Change-Id: Ic768584820e8b532ee4241df79ef8b9c17c4657a
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1620703
Tested-by: kokoro <noreply+kokoro@google.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Trent Begin <tbegin@chromium.org>
This commit is contained in:
Daniel Verkamp 2019-05-20 13:33:20 -07:00 committed by chrome-bot
parent 03b238bcc0
commit af00eb7e26

View file

@ -237,7 +237,7 @@ pub fn add_serial_devices(
let mut stdio_serial_num = None;
let mut stdio_serial = None;
for x in 0..3 {
for x in 0..=3 {
let com_evt = match x {
0 => com_evt_1_3,
1 => com_evt_2_4,