qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.ibm.com>
To: Joelle van Dyne <j@getutm.app>
Cc: qemu-devel@nongnu.org, Stefan Berger <stefanb@linux.vnet.ibm.com>
Subject: Re: [PATCH v3 06/14] tpm-sysbus: add plug handler for TPM on SysBus
Date: Mon, 30 Oct 2023 13:01:59 -0400	[thread overview]
Message-ID: <848ea63a-69f2-4f47-a849-5c81019e5115@linux.ibm.com> (raw)
In-Reply-To: <CA+E+eSDTNt2SQGoGkQVOfcVWswhOqio95vSROGj1JH6Y0M0EaQ@mail.gmail.com>


On 10/30/23 12:55, Joelle van Dyne wrote:
> I was debating what to add. I couldn't find a project-wide template
> for what the header should be and I couldn't copy/paste from where I
> copied the code from (virt.c) because it names a specific author that
> I'm not sure wrote this code... Any advice?

I would follow the files in hw/tpm/*.c and use those as templates with

- name of file and short description

- Copyright

- Author(s)

- 2 sentences about the license

- Maybe a longer description.


>
> On Mon, Oct 30, 2023 at 9:52 AM Stefan Berger <stefanb@linux.ibm.com> wrote:
>>
>> On 10/29/23 02:03, Joelle van Dyne wrote:
>>> TPM needs to know its own base address in order to generate its DSDT
>>> device entry.
>>>
>>> Signed-off-by: Joelle van Dyne <j@getutm.app>
>>> ---
>>>    include/sysemu/tpm.h |  4 ++++
>>>    hw/tpm/tpm-sysbus.c  | 33 +++++++++++++++++++++++++++++++++
>>>    hw/tpm/meson.build   |  1 +
>>>    3 files changed, 38 insertions(+)
>>>    create mode 100644 hw/tpm/tpm-sysbus.c
>>>
>>> diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
>>> index 1ee568b3b6..ffd300e607 100644
>>> --- a/include/sysemu/tpm.h
>>> +++ b/include/sysemu/tpm.h
>>> @@ -12,6 +12,8 @@
>>>    #ifndef QEMU_TPM_H
>>>    #define QEMU_TPM_H
>>>
>>> +#include "qemu/osdep.h"
>>> +#include "exec/hwaddr.h"
>>>    #include "qapi/qapi-types-tpm.h"
>>>    #include "qom/object.h"
>>>
>>> @@ -78,6 +80,8 @@ static inline TPMVersion tpm_get_version(TPMIf *ti)
>>>        return TPM_IF_GET_CLASS(ti)->get_version(ti);
>>>    }
>>>
>>> +void tpm_sysbus_plug(TPMIf *tpmif, Object *pbus, hwaddr pbus_base);
>>> +
>>>    #else /* CONFIG_TPM */
>>>
>>>    #define tpm_init()  (0)
>>> diff --git a/hw/tpm/tpm-sysbus.c b/hw/tpm/tpm-sysbus.c
>>> new file mode 100644
>>> index 0000000000..ef0592b837
>>> --- /dev/null
>>> +++ b/hw/tpm/tpm-sysbus.c
>>> @@ -0,0 +1,33 @@
>> A header in this new file would be good. Otherwise LGTM.
>>
>>     Stefan
>>
>>> +#include "sysemu/tpm.h"
>>> +#include "hw/platform-bus.h"
>>> +#include "hw/sysbus.h"
>>> +#include "qapi/error.h"
>>
>>


  reply	other threads:[~2023-10-30 17:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-29  6:03 [PATCH v3 00/14] tpm: introduce TPM CRB SysBus device Joelle van Dyne
2023-10-29  6:03 ` [PATCH v3 01/14] tpm_crb: refactor common code Joelle van Dyne
2023-10-29  6:03 ` [PATCH v3 02/14] tpm_crb: CTRL_RSP_ADDR is 64-bits wide Joelle van Dyne
2023-10-29  6:03 ` [PATCH v3 03/14] tpm_ppi: refactor memory space initialization Joelle van Dyne
2023-10-29  6:03 ` [PATCH v3 04/14] tpm_crb: use a single read-as-mem/write-as-mmio mapping Joelle van Dyne
2023-10-29  6:03 ` [PATCH v3 05/14] tpm_crb: move ACPI table building to device interface Joelle van Dyne
2023-10-29  6:03 ` [PATCH v3 06/14] tpm-sysbus: add plug handler for TPM on SysBus Joelle van Dyne
2023-10-30 16:52   ` Stefan Berger
2023-10-30 16:55     ` Joelle van Dyne
2023-10-30 17:01       ` Stefan Berger [this message]
2023-10-29  6:03 ` [PATCH v3 07/14] hw/arm/virt: connect TPM to platform bus Joelle van Dyne
2023-10-30 23:25   ` Stefan Berger
2023-10-29  6:03 ` [PATCH v3 08/14] hw/loongarch/virt: " Joelle van Dyne
2023-10-30 23:25   ` Stefan Berger
2023-10-29  6:03 ` [PATCH v3 09/14] tpm_tis_sysbus: move DSDT AML generation to device Joelle van Dyne
2023-10-30 20:55   ` Stefan Berger
2023-10-29  6:03 ` [PATCH v3 10/14] tests: acpi: prepare for TPM CRB tests Joelle van Dyne
2023-10-30 22:18   ` Stefan Berger
2023-10-29  6:03 ` [PATCH v3 11/14] tpm_crb_sysbus: introduce TPM CRB SysBus device Joelle van Dyne
2023-10-30 21:08   ` Stefan Berger
2023-10-30 21:21     ` Stefan Berger
2023-10-31  3:39     ` Joelle van Dyne
2023-10-29  6:03 ` [PATCH v3 12/14] tests: acpi: implement TPM CRB tests for ARM virt Joelle van Dyne
2023-10-30 22:19   ` Stefan Berger
2023-10-29  6:03 ` [PATCH v3 13/14] tests: acpi: updated expected blobs for TPM CRB Joelle van Dyne
2023-10-30 22:42   ` Stefan Berger
2023-10-31  0:35     ` Stefan Berger
2023-10-31  3:40       ` Joelle van Dyne
2023-10-29  6:03 ` [PATCH v3 14/14] tests: add TPM-CRB sysbus tests for aarch64 Joelle van Dyne

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=848ea63a-69f2-4f47-a849-5c81019e5115@linux.ibm.com \
    --to=stefanb@linux.ibm.com \
    --cc=j@getutm.app \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    /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).