]> git.ipfire.org Git - thirdparty/grub.git/commit
term/ns8250-spcr: Return if redirection is disabled
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 21 Jan 2025 17:01:26 +0000 (11:01 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 26 Feb 2025 18:34:57 +0000 (19:34 +0100)
commitf0a08324d0f923527ba611887a3780c1f2cb1578
tree74b697c0ea45f08b89c5e4fcadd081474345ff6c
parent7161e2437dda654c69b930edb2fd18bbfe5c1f05
term/ns8250-spcr: Return if redirection is disabled

The Microsoft spec for SPCR says "The base address of the Serial Port
register set described using the ACPI Generic Address Structure, or
0 if console redirection is disabled". So, return early if redirection
is disabled (base address = 0). If this check is not done we may get
invalid ports on machines with redirection disabled and boot may hang
when reading the grub.cfg file.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Leo Sandoval <lsandova@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/term/ns8250-spcr.c