From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=SVEWCiIQ; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.221.48, mailfrom: pete@akeo.ie) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by groups.io with SMTP; Wed, 04 Sep 2019 05:14:32 -0700 Received: by mail-wr1-f48.google.com with SMTP id u16so21022195wrr.0 for ; Wed, 04 Sep 2019 05:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=E1B2UlQ/YxB2yCfoIG1AQ7TbXs2/xN+WD9hP8exTrzo=; b=SVEWCiIQVqj7G4ASq5Hf6qEhhHeEyq8gCxMz2MonzeoJHR/RSD0DNhsgIPdjlPCKOV DobLj6KzWSV/RRWm4HqsDRelpZm6244OOWygQuKdqbT6SKOURYI/g+8qxbWzcGq82EZm gUwHaqoRdbNEoJsPVEw+6/cz32MCTSfwPD4ylu90z3DySFnilkEkaf7qzmDAtTN1+aw6 jXBHZ4ElbF1ugf7drDdM9nHPZ3O0UPYNfFcKciY3gic6cwx5deeiR3C52gAB9YbJY6vM IQrXyToC5z5wsFNHhJtI2dn62xrS/C8vo0cU1cYtAYRXRO2IDgaBM3h0bw+47g8nJwDK Z3Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=E1B2UlQ/YxB2yCfoIG1AQ7TbXs2/xN+WD9hP8exTrzo=; b=ENNcCk8a03RdNjAS015fPd15oIADnTIuFm5N2fxCI6ILb9wUVBBzXD/AmOYqNuCJCb PWFE4cdCvvZ8dor7uYkb1l6vcTYjz30VZzjVdD6p7b420qpCaix1FLpzdhUbOq7JrFW2 QIu/q4cymszR6J/8G2ekuD7TIImVwmMwkWvZo5E+VcGDLHjU//tMYzTYEwcZEhRfTVs5 QuhzzzgzKlkZkSUZSBMts3zNWP+c5ZqBjKJwGhqD4zNDiWv5/n5PvyyRC56TcVH2cx7/ 5Wsme7OfpTnCY8k35tP5pFSnACjHcsDT/GESqAVe++5fGRybOkQ0I+2uHm7cSTRQRuKb Tu6g== X-Gm-Message-State: APjAAAVERmFQMsANNNx/iB/wOrADYjBG7QhCpCIos+NfsXRJJPq9alvg 2cg6ZzV6fQk8a0Vy4nS2y4d2JCHoudw= X-Google-Smtp-Source: APXvYqyiOma4/j50jc2DrKmoYNIJY85aBzgGBuBitJyHzIO0q227FN51FLqcjkMNCbiHMWqWEwA5Gw== X-Received: by 2002:adf:f607:: with SMTP id t7mr42913761wrp.60.1567599270002; Wed, 04 Sep 2019 05:14:30 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([84.203.56.193]) by smtp.gmail.com with ESMTPSA id n12sm2791631wmc.24.2019.09.04.05.14.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Sep 2019 05:14:28 -0700 (PDT) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org Subject: [edk2-platforms PATCH 0/2] Platform/RPi3: PlatformSmbios improvements Date: Wed, 4 Sep 2019 13:14:16 +0100 Message-Id: <20190904121418.3700-1-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series of patches improves the data reported by the firmware for SMB queries. This is achieved by first introducing new calls in RpiFirmwareDxe and then cleaning up the existing PlatformSmbiosDxe code. These modifications should ensure that the drivers can be reused on other Raspberry Pi platforms (such as the Pi 4). It should be noted that, with these changes, if one passes a build option like --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString=L"UEFI Firmware v1.7" the BIOS major and minor will be populated from that version data. Attached below is the report from dmidecode on Linux/Debian for a Raspberry Pi 3 B+ using a firmware with the above. Similar data can also be obtained through smbiosview in the UEFI Shell. Regards, /Pete ---------------------------------------------------------------------------------- root@pi3:~# dmidecode # dmidecode 3.2 Getting SMBIOS data from sysfs. SMBIOS 3.2.0 present. Table at 0x37260000. Handle 0x0000, DMI type 0, 26 bytes BIOS Information Vendor: TianoCore Version: UEFI Firmware v1.7 Release Date: Sep 3 2019 19:44:54 ROM Size: 2048 kB Characteristics: Selectable boot is supported ACPI is supported Function key-initiated network boot is supported Targeted content distribution is supported UEFI is supported BIOS Revision: 1.7 Firmware Revision: 85.210 Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: Sony UK Product Name: Raspberry Pi 3 Model B+ Version: A020D3 Serial Number: 0000B827EB123456 UUID: 00a020d3-0000-0000-0000-b827eb123456 Wake-up Type: Power Switch SKU Number: 0000000000A020D3 Family: Raspberry Pi Handle 0x0002, DMI type 2, 17 bytes Base Board Information Manufacturer: Sony UK Product Name: Raspberry Pi 3 Model B+ Version: A020D3 Serial Number: 0000B827EB123456 Asset Tag: Not Specified Features: Board is a hosting board Location In Chassis: Not Specified Chassis Handle: 0x0000 Type: Motherboard Contained Object Handles: 0 Handle 0x0003, DMI type 3, 24 bytes Chassis Information Manufacturer: Sony UK Type: Embedded PC Lock: Not Present Version: Raspberry Pi 3 Model B+ Serial Number: 0000B827EB123456 Asset Tag: Not Specified Boot-up State: Safe Power Supply State: Safe Thermal State: Safe Security Status: None OEM Information: 0x00000000 Height: Unspecified Number Of Power Cords: Unspecified Contained Elements: 0 SKU Number: Not Specified Handle 0x0004, DMI type 4, 48 bytes Processor Information Socket Designation: Socket Type: Central Processor Family: ARM Manufacturer: Broadcom ID: 00 00 00 00 00 00 00 00 Version: BCM2837 (ARM Cortex-A53) Voltage: 5.0 V 3.3 V 2.9 V External Clock: Unknown Max Speed: 1400 MHz Current Speed: 600 MHz Status: Populated, Enabled Upgrade: Other L1 Cache Handle: 0x0000 L2 Cache Handle: 0x0000 L3 Cache Handle: 0x0000 Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Core Count: 4 Core Enabled: 4 Thread Count: 4 Characteristics: 64-bit capable Multi-Core Execute Protection Enhanced Virtualization Handle 0x0005, DMI type 7, 27 bytes Cache Information Socket Designation: Cache1 Configuration: Enabled, Socketed, Level 3 Operational Mode: Write Back Location: Internal Installed Size: 0 kB Maximum Size: 0 kB Supported SRAM Types: Burst Synchronous Installed SRAM Type: Burst Synchronous Speed: Unknown Error Correction Type: Multi-bit ECC System Type: Unknown Associativity: 2-way Set-associative Handle 0x0006, DMI type 9, 24 bytes System Slot Information Designation: SD Card Type: Other Current Usage: Available Length: Other Characteristics: Unknown Bus Address: 0000:00:00.0 Handle 0x0007, DMI type 16, 23 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: Unknown Maximum Capacity: 1 TB Error Information Handle: Not Provided Number Of Devices: 1 Handle 0x0008, DMI type 17, 84 bytes Memory Device Array Handle: 0x0007 Error Information Handle: Not Provided Total Width: Unknown Data Width: Unknown Size: 1024 MB Form Factor: Unknown Set: Unknown Locator: OS Virtual Memory Bank Locator: malloc Type: DRAM Type Detail: Unknown Speed: Unknown Manufacturer: OSV Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Rank: Unknown Configured Memory Speed: Unknown Minimum Voltage: Unknown Maximum Voltage: Unknown Configured Voltage: Unknown Memory Technology: Memory Operating Mode Capability: None Firmware Version: Not Specified Module Manufacturer ID: Unknown Module Product ID: Unknown Memory Subsystem Controller Manufacturer ID: Unknown Memory Subsystem Controller Product ID: Unknown Non-Volatile Size: None Volatile Size: None Cache Size: None Logical Size: None Handle 0x0009, DMI type 19, 31 bytes Memory Array Mapped Address Starting Address: 0x00000000000 Ending Address: 0x0003B3FFFFF Range Size: 948 MB Physical Array Handle: 0x0000 Partition Width: 1 Handle 0x000A, DMI type 32, 11 bytes System Boot Information Status: No errors detected Handle 0xFEFF, DMI type 127, 4 bytes End Of Table ---------------------------------------------------------------------------------- Pete Batard (2): Platform/RPi3: Add more query functions in RpiFirmwareDxe Platform/RPi3: Improve the population of PlatformSmbiosDxe elements Platform/RaspberryPi/RPi3/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c | 193 ++++++++++++-------- Platform/RaspberryPi/RPi3/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf | 1 + Platform/RaspberryPi/RPi3/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c | 166 ++++++++++++++++- Platform/RaspberryPi/RPi3/Include/Protocol/RpiFirmware.h | 58 ++++-- Platform/RaspberryPi/RPi3/RPi3.dsc | 2 +- 5 files changed, 322 insertions(+), 98 deletions(-) -- 2.21.0.windows.1