aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-10-06 12:26:33 -0400
committerTom Rini <trini@konsulko.com>2021-10-06 13:46:31 -0400
commitea67f467a43e4c8852bd1ce1bb75f5dc6c3788d1 (patch)
tree1bbf310f2b22ad465d5698bfdf71347129834561 /lib
parent7240e1b8f94a56db88a2af688cad27e2e6545302 (diff)
parent6115f1c4fe81015369e110ea9830a6e36710677c (diff)
Merge branch '2021-10-06-assorted-improvements'
- Use better values for ACPI OEM_VERSION - Assorted NAND related Kconifg migrations and another dependency fix
Diffstat (limited to 'lib')
-rw-r--r--lib/acpi/acpi_table.c18
-rw-r--r--lib/rsa/Kconfig1
2 files changed, 18 insertions, 1 deletions
diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c
index 7ea4b2e87e..d1685404c2 100644
--- a/lib/acpi/acpi_table.c
+++ b/lib/acpi/acpi_table.c
@@ -17,6 +17,22 @@
#include <asm/global_data.h>
#include <dm/acpi.h>
+/*
+ * OEM_REVISION is 32-bit unsigned number. It should be increased only when
+ * changing software version. Therefore it should not depend on build time.
+ * U-Boot calculates it from U-Boot version and represent it in hexadecimal
+ * notation. As U-Boot version is in form year.month set low 8 bits to 0x01
+ * to have valid date. So for U-Boot version 2021.04 OEM_REVISION is set to
+ * value 0x20210401.
+ */
+#define OEM_REVISION ((((U_BOOT_VERSION_NUM / 1000) % 10) << 28) | \
+ (((U_BOOT_VERSION_NUM / 100) % 10) << 24) | \
+ (((U_BOOT_VERSION_NUM / 10) % 10) << 20) | \
+ ((U_BOOT_VERSION_NUM % 10) << 16) | \
+ (((U_BOOT_VERSION_NUM_PATCH / 10) % 10) << 12) | \
+ ((U_BOOT_VERSION_NUM_PATCH % 10) << 8) | \
+ 0x01)
+
int acpi_create_dmar(struct acpi_dmar *dmar, enum dmar_flags flags)
{
struct acpi_table_header *header = &dmar->header;
@@ -101,7 +117,7 @@ void acpi_fill_header(struct acpi_table_header *header, char *signature)
memcpy(header->signature, signature, 4);
memcpy(header->oem_id, OEM_ID, 6);
memcpy(header->oem_table_id, OEM_TABLE_ID, 8);
- header->oem_revision = U_BOOT_BUILD_DATE;
+ header->oem_revision = OEM_REVISION;
memcpy(header->aslc_id, ASLC_ID, 4);
}
diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig
index a90d67e5a8..cf802a6d40 100644
--- a/lib/rsa/Kconfig
+++ b/lib/rsa/Kconfig
@@ -20,6 +20,7 @@ config SPL_RSA
config SPL_RSA_VERIFY
bool
+ depends on SPL_RSA
help
Add RSA signature verification support in SPL.