]> git.baikalelectronics.ru Git - uboot.git/commitdiff
SMBIOS: cleanup
authorBaikal Electronics <support@baikalelectronics.ru>
Mon, 30 Oct 2023 02:47:19 +0000 (05:47 +0300)
committerBaikal Electronics <support@baikalelectronics.ru>
Mon, 30 Oct 2023 02:47:19 +0000 (05:47 +0300)
arch/mips/dts/baikal_bfk3.dts
arch/mips/lib/tables.c

index 41320025700c8397a96f7c67126fc1c857bed556..cb4f8ae99492d9c4c3414ad344ed05daddc8eaa0 100644 (file)
                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 {
index d258900737e393b7b08631975292d24fdc706792..a22c3437d3712bd3c86865cd9a45c6f93efe134c 100644 (file)
 #include <log.h>
 #include <malloc.h>
 #include <smbios.h>
-// #include <acpi/acpi_table.h>
-// #include <asm/global_data.h>
-// #include <asm/sfi.h>
-// #include <asm/mpspec.h>
 #include <asm/tables.h>
-// #include <asm/coreboot_tables.h>
-
-// 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;