From b8685120978c0c039b02a727ac07b5a34a45fbe7 Mon Sep 17 00:00:00 2001 From: Baikal Electronics Date: Mon, 30 Oct 2023 05:47:19 +0300 Subject: [PATCH] SMBIOS: cleanup --- arch/mips/dts/baikal_bfk3.dts | 45 ++++++++++++------------ arch/mips/lib/tables.c | 66 ----------------------------------- 2 files changed, 23 insertions(+), 88 deletions(-) diff --git a/arch/mips/dts/baikal_bfk3.dts b/arch/mips/dts/baikal_bfk3.dts index 4132002570..cb4f8ae994 100644 --- a/arch/mips/dts/baikal_bfk3.dts +++ b/arch/mips/dts/baikal_bfk3.dts @@ -52,29 +52,30 @@ reg = <0 0x1f0600e0 0 0x4>; #gpio-cells = <2>; }; + sysinfo { - compatible = "be,smbios"; - smbios { - system { - manufacturer = "Google"; - product = "Coral"; - version = "rev2"; - serial = "123456789"; - sku = "sku3"; - family = "Google_Coral"; - }; - - baseboard { - manufacturer = "Google"; - product = "Coral"; - asset-tag = "ABC123"; - }; - - chassis { - manufacturer = "khadas"; - }; - }; - }; + compatible = "be,smbios"; + smbios { + system { + manufacturer = "Baikal Electronics"; + product = "Generic"; + version = "rev1"; + serial = "123456789"; + sku = "sku3"; + family = "Baikal_Generic"; + }; + + baseboard { + manufacturer = "Baikal Electronics"; + product = "BFK 3.1"; + asset-tag = "ABC123"; + }; + + chassis { + manufacturer = "Baikal Electronics"; + }; + }; + }; }; &usb { diff --git a/arch/mips/lib/tables.c b/arch/mips/lib/tables.c index d258900737..a22c3437d3 100644 --- a/arch/mips/lib/tables.c +++ b/arch/mips/lib/tables.c @@ -10,14 +10,7 @@ #include #include #include -// #include -// #include -// #include -// #include #include -// #include - -// DECLARE_GLOBAL_DATA_PTR; /** * Function prototype to write a specific configuration table @@ -83,7 +76,6 @@ int write_tables(void) u32 rom_table_start; u32 rom_table_end; u32 high_table, table_size; -// struct memory_area cfg_tables[ARRAY_SIZE(table_list) + 1]; int i; rom_table_start = ROM_TABLE_ADDR; @@ -93,41 +85,12 @@ int write_tables(void) for (i = 0; i < ARRAY_SIZE(table_list); i++) { const struct table_info *table = &table_list[i]; int size = table->size; -// int size = table->size ? : CONFIG_ROM_TABLE_SIZE; -/* - if (IS_ENABLED(CONFIG_BLOBLIST_TABLES) && table->tag) { - rom_table_start = (ulong)bloblist_add(table->tag, size, - table->align); - if (!rom_table_start) - return log_msg_ret("bloblist", -ENOBUFS); - } -*/ rom_table_end = table->write(rom_table_start); if (!rom_table_end) { log_err("Can't create configuration table %d\n", i); return -EINTR; } -/* - if (IS_ENABLED(CONFIG_SEABIOS)) { - table_size = rom_table_end - rom_table_start; - high_table = (u32)(ulong)high_table_malloc(table_size); - if (high_table) { - if (!table->write(high_table)) { - log_err("Can't create configuration table %d\n", - i); - return -EINTR; - } - - cfg_tables[i].start = high_table; - cfg_tables[i].size = table_size; - } else { - printf("%d: no memory for configuration tables\n", - i); - return -ENOSPC; - } - } -*/ debug("- wrote '%s' to %x, end %x\n", table->name, rom_table_start, rom_table_end); if (rom_table_end - rom_table_start > size) { @@ -137,35 +100,6 @@ int write_tables(void) } rom_table_start = rom_table_end; } -// -// if (IS_ENABLED(CONFIG_SEABIOS)) { -// /* make sure the last item is zero */ -// cfg_tables[i].size = 0; -// write_coreboot_table(CB_TABLE_ADDR, cfg_tables); -// } -// -// -// if (IS_ENABLED(CONFIG_BLOBLIST_TABLES)) { -// void *ptr = (void *)CONFIG_ROM_TABLE_ADDR; -// -// /* Write an RSDP pointing to the tables */ -// if (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)) { -// struct acpi_ctx *ctx = gd_acpi_ctx(); -// -// acpi_write_rsdp(ptr, ctx->rsdt, ctx->xsdt); -// ptr += ALIGN(sizeof(struct acpi_rsdp), 16); -// } -// -// if (IS_ENABLED(CONFIG_GENERATE_SMBIOS_TABLE)) { -// void *smbios; -// -// smbios = bloblist_find(BLOBLISTT_SMBIOS_TABLES, 0); -// if (!smbios) -// return log_msg_ret("smbios", -ENOENT); -// memcpy(ptr, smbios, sizeof(struct smbios_entry)); -// } -// } -// debug("- done writing tables\n"); return 0; -- 2.39.5