soc/amd/common/espi_util: espi_std_io_decode: fix edge case bug
When address and data register for the SIO control register access is passed as one I/O region with a size of 2, the corresponding special decode enable register should be used instead of a generic one to save the rather limited generic ones for other decode ranges. Change-Id: Ie54ff6afa2bd2156f7b3a3cf83091f1f932b6993 Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/44351 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
4bf419fbf7
commit
c0d4eeb387
|
@ -104,6 +104,9 @@ static int espi_get_unused_io_window(void)
|
|||
*/
|
||||
static int espi_std_io_decode(uint16_t base, size_t size)
|
||||
{
|
||||
if (size == 2 && base == 0x2e)
|
||||
return ESPI_DECODE_IO_0X2E_0X2F_EN;
|
||||
|
||||
if (size != 1)
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue