From: Liran Alon <liran.alon@oracle.com>
There are 2 places where SeaBIOS reports its release date:
1. SMBIOS Type 0 entry
2. Hard-coded address 0xFFFF5
Previous to this commit, each of these places defined it's own unique
date which doesn't make sense.
Therefore, define the BIOS date in a single place and make sure all
relevant places in code use it.
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Arbel Moshe <arbel.moshe@oracle.com>
Signed-off-by: Sam Eiderman <shmuel.eiderman@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
---
src/config.h | 11 +++++++++++
src/fw/biostables.c | 1 -
src/fw/smbios.c | 3 +--
src/misc.c | 2 +-
4 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/config.h b/src/config.h
index 93c8dbc2..6795440c 100644
--- a/src/config.h
+++ b/src/config.h
@@ -29,6 +29,17 @@
#define BUILD_SUBMODEL_ID 0x00
#define BUILD_BIOS_REVISION 0x01
+#define BIOS_DATE_MONTH "04"
+#define BIOS_DATE_DAY "01"
+#define BIOS_DATE_YEAR "14"
+#define BIOS_DATE_YEAR_PREFIX "20"
+#define BIOS_DATE (BIOS_DATE_MONTH "/" \
+ BIOS_DATE_DAY "/" \
+ BIOS_DATE_YEAR_PREFIX BIOS_DATE_YEAR)
+#define BIOS_DATE_SHORT (BIOS_DATE_MONTH "/" \
+ BIOS_DATE_DAY "/" \
+ BIOS_DATE_YEAR)
+
// Various memory addresses used by the code.
#define BUILD_STACK_ADDR 0x7000
#define BUILD_S3RESUME_STACK_ADDR 0x1000
diff --git a/src/fw/biostables.c b/src/fw/biostables.c
index fe8626ef..b055c9b2 100644
--- a/src/fw/biostables.c
+++ b/src/fw/biostables.c
@@ -401,7 +401,6 @@ smbios_new_type_0(void *start,
}
#define BIOS_NAME "SeaBIOS"
-#define BIOS_DATE "04/01/2014"
static int
smbios_romfile_setup(void)
diff --git a/src/fw/smbios.c b/src/fw/smbios.c
index 62a563b2..96104714 100644
--- a/src/fw/smbios.c
+++ b/src/fw/smbios.c
@@ -161,7 +161,6 @@ get_external(int type, char **p, unsigned *nr_structs,
} while (0)
/* Type 0 -- BIOS Information */
-#define RELEASE_DATE_STR "01/01/2011"
static void *
smbios_init_type_0(void *start)
{
@@ -179,7 +178,7 @@ smbios_init_type_0(void *start)
p->bios_starting_address_segment = 0xe800;
- load_str_field_with_default(0, bios_release_date_str, RELEASE_DATE_STR);
+ load_str_field_with_default(0, bios_release_date_str, BIOS_DATE);
p->bios_rom_size = 0; /* FIXME */
diff --git a/src/misc.c b/src/misc.c
index b5117304..189d487b 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -174,7 +174,7 @@ struct descloc_s rombios32_gdt_48 VARFSEG = {
****************************************************************/
// BIOS build date
-char BiosDate[] VARFSEGFIXED(0xfff5) = "06/23/99";
+char BiosDate[] VARFSEGFIXED(0xfff5) = BIOS_DATE_SHORT;
u8 BiosModelId VARFSEGFIXED(0xfffe) = BUILD_MODEL_ID;
--
2.13.3
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org