[coreboot-gerrit] Change in coreboot[master]: src/drivers/pc80/tpm/tis.c: Dont use port value when invalid.
Frans Hendriks (Code Review)
gerrit at coreboot.org
Mon Oct 29 14:59:37 CET 2018
Frans Hendriks has uploaded this change for review. ( https://review.coreboot.org/29331
Change subject: src/drivers/pc80/tpm/tis.c: Dont use port value when invalid.
......................................................................
src/drivers/pc80/tpm/tis.c: Dont use port value when invalid.
port is allocated in ACPI, without checking for value.
Don't use port value when zero.
BUG=N/A
TEST=Portwell PQ-M107
Change-Id: Ia44281b82d003b29bffbf985b774ddd661b65c4e
Signed-off-by: Frans Hendriks <fhendriks at eltan.com>
---
M src/drivers/pc80/tpm/tis.c
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/29331/1
diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c
index 6b84614..f7d9d6f 100644
--- a/src/drivers/pc80/tpm/tis.c
+++ b/src/drivers/pc80/tpm/tis.c
@@ -2,6 +2,7 @@
* This file is part of the coreboot project.
*
* Copyright (C) 2011 The Chromium OS Authors. All rights reserved.
+ * Copyright (C) 2018 Eltan B.V.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -911,7 +912,8 @@
acpigen_write_name("_CRS");
acpigen_write_resourcetemplate_header();
acpigen_write_mem32fixed(1, CONFIG_TPM_TIS_BASE_ADDRESS, 0x5000);
- acpigen_write_io16(port, port, 1, 2, 1);
+ if (port)
+ acpigen_write_io16(port, port, 1, 2, 1);
if (CONFIG_TPM_PIRQ) {
/*
--
To view, visit https://review.coreboot.org/29331
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia44281b82d003b29bffbf985b774ddd661b65c4e
Gerrit-Change-Number: 29331
Gerrit-PatchSet: 1
Gerrit-Owner: Frans Hendriks <fhendriks at eltan.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181029/fa0ec161/attachment.html>
More information about the coreboot-gerrit
mailing list