Brendan Shanks : ntdll: Generate "system boot information" SMBIOS table.

Alexandre Julliard julliard at winehq.org
Wed Aug 5 16:05:01 CDT 2020


Module: wine
Branch: master
Commit: f7895ef25a4cb2115ffbe04d28b87bcb6ee3c0b7
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f7895ef25a4cb2115ffbe04d28b87bcb6ee3c0b7

Author: Brendan Shanks <bshanks at codeweavers.com>
Date:   Wed Aug  5 10:44:38 2020 -0700

ntdll: Generate "system boot information" SMBIOS table.

Signed-off-by: Brendan Shanks <bshanks at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/unix/system.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index 56f77a0766..3148f23df3 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -150,6 +150,13 @@ struct smbios_chassis
     BYTE contained_element_rec_length;
 };
 
+struct smbios_boot_info
+{
+    struct smbios_header hdr;
+    BYTE reserved[6];
+    BYTE boot_status[10];
+};
+
 #include "poppack.h"
 
 /* Firmware table providers */
@@ -1274,6 +1281,7 @@ static NTSTATUS get_firmware_info( SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULON
         struct smbios_system *system;
         struct smbios_board *board;
         struct smbios_chassis *chassis;
+        struct smbios_boot_info *boot_info;
         struct smbios_header *end_of_table;
 
 #define S(s) s, sizeof(s)
@@ -1316,6 +1324,9 @@ static NTSTATUS get_firmware_info( SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULON
         *required_len += max(L(chassis_vendor_len) + L(chassis_version_len) + L(chassis_serial_len) +
                              L(chassis_asset_tag_len) + 1, 2);
 
+        *required_len += sizeof(struct smbios_boot_info);
+        *required_len += 2;
+
         *required_len += sizeof(struct smbios_header);
         *required_len += 2;
 #undef L
@@ -1437,6 +1448,16 @@ static NTSTATUS get_firmware_info( SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULON
         if (!string_count) *buffer++ = 0;
         *buffer++ = 0;
 
+        boot_info = (struct smbios_boot_info*)buffer;
+        boot_info->hdr.type = 32;
+        boot_info->hdr.length = sizeof(struct smbios_boot_info);
+        boot_info->hdr.handle = handle_count++;
+        memset(boot_info->reserved, 0, sizeof(boot_info->reserved));
+        memset(boot_info->boot_status, 0, sizeof(boot_info->boot_status)); /* no errors detected */
+        buffer += sizeof(struct smbios_boot_info);
+        *buffer++ = 0;
+        *buffer++ = 0;
+
         end_of_table = (struct smbios_header*)buffer;
         end_of_table->type = 127;
         end_of_table->length = sizeof(struct smbios_header);




More information about the wine-cvs mailing list