From: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
To: Ira Weiny <ira.weiny@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Shiju Jose <shiju.jose@huawei.com>
Cc: Yazen Ghannam <yazen.ghannam@amd.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Dave Jiang <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ard Biesheuvel <ardb@kernel.org>,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-cxl@vger.kernel.org
Subject: Re: [PATCH v4 6/7] firmware/efi: Process CXL Component Events
Date: Mon, 18 Dec 2023 10:13:16 -0800 [thread overview]
Message-ID: <a32464b2-9810-ca9d-73e5-4ed4cf69fea0@amd.com> (raw)
In-Reply-To: <20231215-cxl-cper-v4-6-01b6dab44fcd@intel.com>
On 12/15/2023 3:26 PM, Ira Weiny wrote:
> BIOS can configure memory devices as firmware first. This will send CXL
> events to the firmware instead of the OS. The firmware can then send
> these events to the OS via UEFI.
>
> UEFI v2.10 section N.2.14 defines a Common Platform Error Record (CPER)
> format for CXL Component Events. The format is mostly the same as the
> CXL Common Event Record Format. The difference is the use of a GUID in
> the Section Type rather than a UUID as part of the event itself.
>
> Add EFI support to detect CXL CPER records and call a registered
> notifier with the event. Enforce that only one notifier call can be
> registered at any time.
>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Signed-off-by: Ira Weiny <ira.weiny@intel.com>
>
[snip]
> + struct {
> + u32 length;
> + u64 validation_bits;
> + struct cper_cxl_event_devid {
> + u16 vendor_id;
> + u16 device_id;
> + u8 func_num;
> + u8 device_num;
> + u8 bus_num;
> + u16 segment_num;
> + u16 slot_num; /* bits 2:0 reserved */
> + u8 reserved;
> + } device_id __packed;
> + struct cper_cxl_event_sn {
> + u32 lower_dw;
> + u32 upper_dw;
> + } dev_serial_num __packed;
> + } hdr __packed;
> +
> + union cxl_event event;
> +} __packed;
> +
For some reason, prefixing the struct name with __packed attribute seems
to do the job. ("__packed device_id" and "__packed dev_serial_num").
Thanks,
Smita
next prev parent reply other threads:[~2023-12-18 18:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 23:26 [PATCH v4 0/7] efi/cxl-cper: Report CPER CXL component events through trace events Ira Weiny
2023-12-15 23:26 ` [PATCH v4 1/7] cxl/trace: Pass uuid explicitly to event traces Ira Weiny
2023-12-15 23:26 ` [PATCH v4 2/7] cxl/events: Promote CXL event structures to a core header Ira Weiny
2023-12-15 23:26 ` [PATCH v4 3/7] cxl/events: Create common event UUID defines Ira Weiny
2023-12-15 23:26 ` [PATCH v4 4/7] cxl/events: Separate UUID from event structures Ira Weiny
2023-12-15 23:26 ` [PATCH v4 5/7] cxl/events: Create a CXL event union Ira Weiny
2023-12-15 23:26 ` [PATCH v4 6/7] firmware/efi: Process CXL Component Events Ira Weiny
2023-12-18 18:13 ` Smita Koralahalli [this message]
2023-12-18 20:24 ` Dan Williams
2023-12-19 15:43 ` Ira Weiny
2023-12-19 14:24 ` Jonathan Cameron
2023-12-19 18:01 ` Ira Weiny
2023-12-15 23:26 ` [PATCH v4 7/7] cxl/memdev: Register for and process CPER events Ira Weiny
2023-12-18 18:17 ` Smita Koralahalli
2023-12-18 20:56 ` Dan Williams
2023-12-19 16:58 ` Ira Weiny
2023-12-19 17:17 ` Ira Weiny
2023-12-19 14:37 ` Jonathan Cameron
2023-12-19 23:27 ` Ira Weiny
2023-12-19 23:36 ` Dan Williams
2023-12-20 0:29 ` Ira Weiny
2024-01-03 10:41 ` Jonathan Cameron
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=a32464b2-9810-ca9d-73e5-4ed4cf69fea0@amd.com \
--to=smita.koralahallichannabasappa@amd.com \
--cc=alison.schofield@intel.com \
--cc=ardb@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shiju.jose@huawei.com \
--cc=vishal.l.verma@intel.com \
--cc=yazen.ghannam@amd.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