firmware: google: Probe for a GSMI handler in firmware
authorArthur Heymans <arthur@aheymans.xyz>
Mon, 18 Nov 2019 10:19:31 +0000 (11:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jan 2020 20:46:48 +0000 (21:46 +0100)
commite4924ee263b015cc2e397ca871d870925e2673b4
treed12c1388810f353196fc882be8a4a4a6b0250686
parentc6e7af0515daca800d84b9cfa1bf19e53c4f5bc3
firmware: google: Probe for a GSMI handler in firmware

Currently this driver is loaded if the DMI string matches coreboot
and has a proper smi_command in the ACPI FADT table, but a GSMI handler in
SMM is an optional feature in coreboot.

So probe for a SMM GSMI handler before initializing the driver.
If the smihandler leaves the calling argument in %eax in the SMM save state
untouched that generally means the is no handler for GSMI.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20191118101934.22526-4-patrick.rudolph@9elements.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/google/gsmi.c