diff mbox series

[v2,1/2] smbios: SMBIOS 3.0 (64-bit) Entry Point structure

Message ID 20231223010334.248291-2-xypron.glpk@gmx.de
State Accepted, archived
Delegated to: Tom Rini
Headers show
Series smbios: copy QEMU tables | expand

Commit Message

Heinrich Schuchardt Dec. 23, 2023, 1:03 a.m. UTC
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

Add definition of the SMBIOS 3.0 (64-bit) Entry Point structure.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
v2:
	no change
---
 include/smbios.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

--
2.43.0

Comments

Simon Glass Dec. 26, 2023, 9:50 a.m. UTC | #1
Hi Heinrich,

On Sat, Dec 23, 2023 at 1:03 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>
> Add definition of the SMBIOS 3.0 (64-bit) Entry Point structure.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> v2:
>         no change
> ---
>  include/smbios.h | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)

We have this struct elsewhere, as mentioned, but this one adds
comments so is nicer.

Reviewed-by: Simon Glass <sjg@chromium.org>

>
> diff --git a/include/smbios.h b/include/smbios.h
> index c9df2706f5..e601283d29 100644
> --- a/include/smbios.h
> +++ b/include/smbios.h
> @@ -54,6 +54,32 @@ struct __packed smbios_entry {
>         u8 bcd_rev;
>  };
>
> +/**
> + * struct smbios3_entry - SMBIOS 3.0 (64-bit) Entry Point structure
> + */
> +struct __packed smbios3_entry {
> +       /** @anchor: anchor string */
> +       u8 anchor[5];
> +       /** @checksum: checksum of the entry point structure */
> +       u8 checksum;
> +       /** @length: length of the entry point structure */
> +       u8 length;
> +       /** @major_ver: major version of the SMBIOS specification */
> +       u8 major_ver;
> +       /** @minor_ver: minor version of the SMBIOS specification */
> +       u8 minor_ver;
> +       /** @docrev: revision of the SMBIOS specification */
> +       u8 doc_rev;
> +       /** @entry_point_rev: revision of the entry point structure */
> +       u8 entry_point_rev;
> +       /** @reserved: reserved */
> +       u8 reserved;
> +       /** maximum size of SMBIOS table */
> +       u32 max_struct_size;
> +       /** @struct_table_address: 64-bit physical starting address */
> +       u64 struct_table_address;
> +};
> +
>  /* BIOS characteristics */
>  #define BIOS_CHARACTERISTICS_PCI_SUPPORTED     (1 << 7)
>  #define BIOS_CHARACTERISTICS_UPGRADEABLE       (1 << 11)
> --
> 2.43.0
>

Regards,
Simon
Ilias Apalodimas Dec. 27, 2023, 10:55 a.m. UTC | #2
On Sat, 23 Dec 2023 at 03:09, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>
> Add definition of the SMBIOS 3.0 (64-bit) Entry Point structure.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> v2:
>         no change
> ---
>  include/smbios.h | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>
> diff --git a/include/smbios.h b/include/smbios.h
> index c9df2706f5..e601283d29 100644
> --- a/include/smbios.h
> +++ b/include/smbios.h
> @@ -54,6 +54,32 @@ struct __packed smbios_entry {
>         u8 bcd_rev;
>  };
>
> +/**
> + * struct smbios3_entry - SMBIOS 3.0 (64-bit) Entry Point structure
> + */
> +struct __packed smbios3_entry {
> +       /** @anchor: anchor string */
> +       u8 anchor[5];
> +       /** @checksum: checksum of the entry point structure */
> +       u8 checksum;
> +       /** @length: length of the entry point structure */
> +       u8 length;
> +       /** @major_ver: major version of the SMBIOS specification */
> +       u8 major_ver;
> +       /** @minor_ver: minor version of the SMBIOS specification */
> +       u8 minor_ver;
> +       /** @docrev: revision of the SMBIOS specification */
> +       u8 doc_rev;
> +       /** @entry_point_rev: revision of the entry point structure */
> +       u8 entry_point_rev;
> +       /** @reserved: reserved */
> +       u8 reserved;
> +       /** maximum size of SMBIOS table */
> +       u32 max_struct_size;
> +       /** @struct_table_address: 64-bit physical starting address */
> +       u64 struct_table_address;
> +};
> +
>  /* BIOS characteristics */
>  #define BIOS_CHARACTERISTICS_PCI_SUPPORTED     (1 << 7)
>  #define BIOS_CHARACTERISTICS_UPGRADEABLE       (1 << 11)
> --
> 2.43.0
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff mbox series

Patch

diff --git a/include/smbios.h b/include/smbios.h
index c9df2706f5..e601283d29 100644
--- a/include/smbios.h
+++ b/include/smbios.h
@@ -54,6 +54,32 @@  struct __packed smbios_entry {
 	u8 bcd_rev;
 };

+/**
+ * struct smbios3_entry - SMBIOS 3.0 (64-bit) Entry Point structure
+ */
+struct __packed smbios3_entry {
+	/** @anchor: anchor string */
+	u8 anchor[5];
+	/** @checksum: checksum of the entry point structure */
+	u8 checksum;
+	/** @length: length of the entry point structure */
+	u8 length;
+	/** @major_ver: major version of the SMBIOS specification */
+	u8 major_ver;
+	/** @minor_ver: minor version of the SMBIOS specification */
+	u8 minor_ver;
+	/** @docrev: revision of the SMBIOS specification */
+	u8 doc_rev;
+	/** @entry_point_rev: revision of the entry point structure */
+	u8 entry_point_rev;
+	/** @reserved: reserved */
+	u8 reserved;
+	/** maximum size of SMBIOS table */
+	u32 max_struct_size;
+	/** @struct_table_address: 64-bit physical starting address */
+	u64 struct_table_address;
+};
+
 /* BIOS characteristics */
 #define BIOS_CHARACTERISTICS_PCI_SUPPORTED	(1 << 7)
 #define BIOS_CHARACTERISTICS_UPGRADEABLE	(1 << 11)