tpm crb: Work around BIOS's that report the wrong ACPI region size
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tue, 21 Feb 2017 21:14:24 +0000 (14:14 -0700)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Mon, 3 Apr 2017 19:46:00 +0000 (22:46 +0300)
commitb4e2eb0651ac3180a942d378b040c5cc045113ee
treea1c0dcf430bf20aa9df84594eb2a055d696f968b
parent302a6ad7fc77146191126a1f3e2c5d724fd72416
tpm crb: Work around BIOS's that report the wrong ACPI region size

The expectation is that the if the CRB cmd/rsp buffer falls within the
ACPI region that the entire buffer will be within the reason. Otherwise
resource reservation will fail when it crosses regions.

Work around this BIOS bug by limiting the cmd/rsp buffer to the length
of the declared ACPI region. BIOS vendors should fix this by making
the ACPI and register length declarations consistent.

Reported-by: Davide Guerri <davide.guerri@gmail.com>
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Davide Guerri <davide.guerri@gmail.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm_crb.c