From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sun, 24 Jan 2021 10:43:24 -0700 Subject: [PATCH v3 05/12] smbios: Set BIOS release version In-Reply-To: <20210124174331.3462226-1-sjg@chromium.org> References: <20210124174331.3462226-1-sjg@chromium.org> Message-ID: <20210124104327.v3.5.I1af655eac7c24ccf4537bcc1f61bee9e629bf008@changeid> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de We may as well include the U-Boot release information in the type-0 table since it is designed for that purpose. U-Boot uses release versions based on the year and month. The year cannot fit in a byte, so drop the century. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v2) Changes in v2: - Add a comment about dropping the century lib/smbios.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/smbios.c b/lib/smbios.c index b1171f544a8..a072d9ec10b 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -143,8 +143,9 @@ static int smbios_write_type0(ulong *current, int handle, ofnode node) #endif t->bios_characteristics_ext2 = BIOS_CHARACTERISTICS_EXT2_TARGET; - t->bios_major_release = 0xff; - t->bios_minor_release = 0xff; + /* bios_major_release has only one byte, so drop century */ + t->bios_major_release = U_BOOT_VERSION_NUM % 100; + t->bios_minor_release = U_BOOT_VERSION_NUM_PATCH; t->ec_major_release = 0xff; t->ec_minor_release = 0xff; -- 2.30.0.280.ga3ce27912f-goog