From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: linux-integrity@vger.kernel.org, jarkko.sakkinen@linux.intel.com
Cc: linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org,
Stefan Berger <stefanb@linux.vnet.ibm.com>
Subject: [PATCH 1/5] tpm: ppi: pass function revision ID to tpm_eval_dsm()
Date: Wed, 9 Jan 2019 17:10:59 -0500 [thread overview]
Message-ID: <20190109221103.1897677-2-stefanb@linux.vnet.ibm.com> (raw)
In-Reply-To: <20190109221103.1897677-1-stefanb@linux.vnet.ibm.com>
Since we will need to pass different function revision numbers
to tpm_eval_dsm, convert this function now to take the function revision
as an additional parameter.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
---
drivers/char/tpm/tpm_ppi.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c
index 86dd8521feef..90b69aeadc99 100644
--- a/drivers/char/tpm/tpm_ppi.c
+++ b/drivers/char/tpm/tpm_ppi.c
@@ -38,12 +38,11 @@ static const guid_t tpm_ppi_guid =
static inline union acpi_object *
tpm_eval_dsm(acpi_handle ppi_handle, int func, acpi_object_type type,
- union acpi_object *argv4)
+ union acpi_object *argv4, u64 rev)
{
BUG_ON(!ppi_handle);
return acpi_evaluate_dsm_typed(ppi_handle, &tpm_ppi_guid,
- TPM_PPI_REVISION_ID,
- func, argv4, type);
+ rev, func, argv4, type);
}
static ssize_t tpm_show_ppi_version(struct device *dev,
@@ -62,7 +61,7 @@ static ssize_t tpm_show_ppi_request(struct device *dev,
struct tpm_chip *chip = to_tpm_chip(dev);
obj = tpm_eval_dsm(chip->acpi_dev_handle, TPM_PPI_FN_GETREQ,
- ACPI_TYPE_PACKAGE, NULL);
+ ACPI_TYPE_PACKAGE, NULL, TPM_PPI_REVISION_ID);
if (!obj)
return -ENXIO;
@@ -126,7 +125,7 @@ static ssize_t tpm_store_ppi_request(struct device *dev,
}
obj = tpm_eval_dsm(chip->acpi_dev_handle, func, ACPI_TYPE_INTEGER,
- &argv4);
+ &argv4, TPM_PPI_REVISION_ID);
if (!obj) {
return -ENXIO;
} else {
@@ -170,7 +169,7 @@ static ssize_t tpm_show_ppi_transition_action(struct device *dev,
if (strcmp(chip->ppi_version, "1.2") < 0)
obj = &tmp;
obj = tpm_eval_dsm(chip->acpi_dev_handle, TPM_PPI_FN_GETACT,
- ACPI_TYPE_INTEGER, obj);
+ ACPI_TYPE_INTEGER, obj, TPM_PPI_REVISION_ID);
if (!obj) {
return -ENXIO;
} else {
@@ -196,7 +195,7 @@ static ssize_t tpm_show_ppi_response(struct device *dev,
struct tpm_chip *chip = to_tpm_chip(dev);
obj = tpm_eval_dsm(chip->acpi_dev_handle, TPM_PPI_FN_GETRSP,
- ACPI_TYPE_PACKAGE, NULL);
+ ACPI_TYPE_PACKAGE, NULL, TPM_PPI_REVISION_ID);
if (!obj)
return -ENXIO;
@@ -272,7 +271,8 @@ static ssize_t show_ppi_operations(acpi_handle dev_handle, char *buf, u32 start,
for (i = start; i <= end; i++) {
tmp.integer.value = i;
obj = tpm_eval_dsm(dev_handle, TPM_PPI_FN_GETOPR,
- ACPI_TYPE_INTEGER, &argv);
+ ACPI_TYPE_INTEGER, &argv,
+ TPM_PPI_REVISION_ID);
if (!obj) {
return -ENOMEM;
} else {
--
2.17.1
next prev parent reply other threads:[~2019-01-09 22:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 22:10 [PATCH 0/5] Extend TPM PPI interface to support revision 1.3 Stefan Berger
2019-01-09 22:10 ` Stefan Berger [this message]
2019-01-16 21:45 ` [PATCH 1/5] tpm: ppi: pass function revision ID to tpm_eval_dsm() Jarkko Sakkinen
2019-01-09 22:11 ` [PATCH 2/5] tpm: ppi: rename TPM_PPI_REVISION_ID to TPM_PPI_REVISION_1 Stefan Berger
2019-01-16 21:46 ` Jarkko Sakkinen
2019-01-09 22:11 ` [PATCH 3/5] tpm: ppi: Display up to 101 operations as define for version 1.3 Stefan Berger
2019-01-16 21:46 ` Jarkko Sakkinen
2019-01-09 22:11 ` [PATCH 4/5] tpm: ppi: Possibly show command parameter if TPM PPI 1.3 is used Stefan Berger
2019-01-16 21:48 ` Jarkko Sakkinen
2019-01-16 21:49 ` Jarkko Sakkinen
2019-01-09 22:11 ` [PATCH 5/5] tpm: ppi: Enable submission of optional command parameter for PPI 1.3 Stefan Berger
2019-01-16 21:54 ` Jarkko Sakkinen
2019-01-11 20:28 ` [PATCH 0/5] Extend TPM PPI interface to support revision 1.3 Safford, David (GE Global Research)
2019-01-14 19:51 ` Stefan Berger
2019-01-18 15:00 ` Jarkko Sakkinen
2019-02-08 21:21 ` Stefan Berger
2019-02-08 22:00 ` Jarkko Sakkinen
2019-02-08 22:06 ` Stefan Berger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190109221103.1897677-2-stefanb@linux.vnet.ibm.com \
--to=stefanb@linux.vnet.ibm.com \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).