Re: Help. SBL versioning
by Gudla, Raghava
Hi Gustavo,
Command looks correct, please make sure you have sbl.bios.bin generated using stitchloader.py before using the command.
SBL is now using chipset sticky register instead of CMOS to trigger firmware update. We have updated documentation on this today, please look at https://slimbootloader.github.io/supported-hardware/apollo-lake-crb.html#...
Triggering firmware update from Windows is now supported. Please see https://slimbootloader.github.io/security/firmware-update.html#trigger-up... to understand about this feature.
Thank you,
Raghava
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com>
Sent: Tuesday, March 31, 2020 1:18 AM
To: Gudla, Raghava <raghava.gudla(a)intel.com>; sbl-devel(a)lists.01.org
Subject: RE: Help. SBL versioning
Hi,
Using the commands you mentioned I could generate the capsule update but I had to modify the comand:
python ./BootloaderCorePkg/Tools/GenCapsuleFirmware.py -v -p BIOS sbl_lfh_ifwi.bin -k ./BootloaderCorePkg/Tools/Keys/TestSigningPrivateKey.pem -o FwuImage.bin
by
python ./BootloaderCorePkg/Tools/GenCapsuleFirmware.py -v -p BIOS sbl.bios.bin -k ./BootloaderCorePkg/Tools/Keys/TestSigningPrivateKey.pem -o FwuImage.bin
Is it correct?
I have another issue, reading section "Triggering Firmware Update" in https://slimbootloader.github.io/supported-hardware/apollo-lake-crb.html#..., I am trying to use CMOS register to trigger firmware update but it doesn't work like it is described. I have seen IsFirmwareUpdate function was modified in this commit https://github.com/slimbootloader/slimbootloader/commit/f6fd3a3f06db8b102...:
Before modification, the function only read the register:
IoWrite8 (0x70, FWU_BOOT_MODE_OFFSET);
FirmwareUpdateStatus = IoRead8 (0x71);
But the present repository code has more logic. How can I trigger firmware update from OS using the master branch code?
Thanks,
Gustavo.
________________________________
De: Gudla, Raghava <raghava.gudla(a)intel.com<mailto:raghava.gudla@intel.com>>
Enviado: viernes, 27 de marzo de 2020 17:21
Para: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>; sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org> <sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>>
Asunto: RE: Help. SBL versioning
Hello,
Whole IFWI should not be used to create capsule. Only BIOS region is required to create capsule.
Please look at "Slimbootloader binary for capsule image" section in https://slimbootloader.github.io/supported-hardware/apollo-lake-crb.html to understand how to create bios region for the capsule.
In your case, after you stitch IFWI, use the following command
python Platform/ApollolakeBoardPkg/Script/StitchLoader.py -b sbl.bios.bin -i APL_SBL_IFWI.bin -s Outputs/apl/Stitch_Components.zip -o sbl_lfh_ifwi.bin
python ./BootloaderCorePkg/Tools/GenCapsuleFirmware.py -v -p BIOS sbl_lfh_ifwi.bin -k ./BootloaderCorePkg/Tools/Keys/TestSigningPrivateKey.pem -o FwuImage.bin
You can use FwuImage.bin to perform capsule update.
Please let us know if you see any other issues.
Thank you,
Raghava
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>
Sent: Friday, March 27, 2020 1:15 AM
To: sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>
Subject: [Sbl-devel] Help. SBL versioning
Hello,
I am trying to update SBL using the method shown in the documentation https://slimbootloader.github.io/security/firmware-update.html but I get the following error:
=================Read Capsule Image==============
BootMediumPciBase(0xE00A8000)
Init USB XHCI - Success
XHCI: Don't support multi-TT feature for Hub now. (force to disable MTT)
XhcPeiCheckUrbResult: STALL_ERROR! Completecode = 6
XhcPeiControlTransfer: error - Device Error, transfer - 2
XhcPeiCheckUrbResult: STALL_ERROR! Completecode = 6
XhcPeiControlTransfer: error - Device Error, transfer - 2
Enumerate Bus - Success
Found 7 USB devices on bus
Found mass storage on device 0
find boot partition
Partition type: MBR (1 logical partitions)
Find partion success
Find partition
Detected FAT on HwDev 0 Part 0
Capsule Image found, ImageSize=0x22128C
First 256Bytes of capsule image
00000000: 58 AE 3E 1A 80 B5 EF 4F-AC A3 A1 6D 9E 00 DF 5F *X.>....O...m..._*
00000010: 40 00 00 00 01 00 00 00-00 00 00 00 80 11 22 00 *@.............".*<mailto:*@.............%22.*>
00000020: 0C 01 00 00 40 00 00 00-38 10 22 00 78 10 22 00 *....@...8.".x.".*<mailto:*....@...8.%22.x.%22.*>
00000030: 08 01 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
00000040: 01 00 00 00 00 00 01 00-10 00 00 00 00 00 00 00 *................*
00000050: 02 00 00 00 13 68 5C 60-C7 C2 42 42 9C 27 50 A4 *.....h\`..BB.'P.*
00000060: C3 63 DB A4 01 00 00 00-00 10 22 00 00 00 00 00 *.c........".....*
00000070: 42 49 4F 53 00 00 00 00-42 49 4F 53 02 00 00 00 *BIOS....BIOS....*
00000080: 00 00 00 00 00 00 00 00-49 42 42 50 00 10 00 00 *........IBBP....*
00000090: 00 D0 0C 00 00 00 00 00-4F 42 42 50 00 E0 0C 00 *........OBBP....*
000000A0: 00 30 15 00 00 00 00 00-FF FF FF FF FF FF FF FF *.0..............*
000000B0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
000000C0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
000000D0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
000000E0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
000000F0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
CapsuleImage: 0x79470010, CapsuleSize: 0x22128C
HASH verification for usage (0x00000400) with Hash Alg (0x1): Success
SignType (0x1) SignSize (0x100) SignHashAlg (0x1)
RSA verification for usage (0x00000400): Success
Set next FWU state: 0x7F
Get current FWU state: 0x7F
GetFfsFileByName: Not Found
GetVersionfromFv: Not Found
VerifyFwVersion failed with Status = 0x8000000E
ApplyFwImage failed with Status = Not Found
Firmware Update status updated to reserved region
Set next FWU state: 0x77
Firmware update Done! clear CSE flag to normal boot mode.
HECI SecMode 0
I think my capsule image is not generated correctly. To do this, follow the steps below:
1. Build SBL for Apollo Lake:
python BuildLoader.py build apl
2. Generate IFWI image using StitchIfwi.py which generate the APL_SBL_IFWI.bin file.
3. Flash APL_SBL_IFWI.bin using Dediprog.
4. Generate capsule image:
python ./BootloaderCorePkg/Tools/GenCapsuleFirmware.py -v -p BIOS ../bios/IFWI/stitching/Output/APL_SBL_IFWI.bin -k ./BootloaderCorePkg/Tools/Keys/TestSigningPrivateKey.pem -o FwuImage.bin
5. Enter in SBL shell and run fwupdate whit a USB key connected.
6. I get the log shown at the beginning.
Could you tell me if capsule image is correctly generated, if it is not, which BIOS file must I use as argument for GenCapsuleFirmware.py?
Thanks.
Best regards.
2 years, 3 months
Re: Help. SBL versioning
by Gudla, Raghava
Hello,
Whole IFWI should not be used to create capsule. Only BIOS region is required to create capsule.
Please look at "Slimbootloader binary for capsule image" section in https://slimbootloader.github.io/supported-hardware/apollo-lake-crb.html to understand how to create bios region for the capsule.
In your case, after you stitch IFWI, use the following command
python Platform/ApollolakeBoardPkg/Script/StitchLoader.py -b sbl.bios.bin -i APL_SBL_IFWI.bin -s Outputs/apl/Stitch_Components.zip -o sbl_lfh_ifwi.bin
python ./BootloaderCorePkg/Tools/GenCapsuleFirmware.py -v -p BIOS sbl_lfh_ifwi.bin -k ./BootloaderCorePkg/Tools/Keys/TestSigningPrivateKey.pem -o FwuImage.bin
You can use FwuImage.bin to perform capsule update.
Please let us know if you see any other issues.
Thank you,
Raghava
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com>
Sent: Friday, March 27, 2020 1:15 AM
To: sbl-devel(a)lists.01.org
Subject: [Sbl-devel] Help. SBL versioning
Hello,
I am trying to update SBL using the method shown in the documentation https://slimbootloader.github.io/security/firmware-update.html but I get the following error:
=================Read Capsule Image==============
BootMediumPciBase(0xE00A8000)
Init USB XHCI - Success
XHCI: Don't support multi-TT feature for Hub now. (force to disable MTT)
XhcPeiCheckUrbResult: STALL_ERROR! Completecode = 6
XhcPeiControlTransfer: error - Device Error, transfer - 2
XhcPeiCheckUrbResult: STALL_ERROR! Completecode = 6
XhcPeiControlTransfer: error - Device Error, transfer - 2
Enumerate Bus - Success
Found 7 USB devices on bus
Found mass storage on device 0
find boot partition
Partition type: MBR (1 logical partitions)
Find partion success
Find partition
Detected FAT on HwDev 0 Part 0
Capsule Image found, ImageSize=0x22128C
First 256Bytes of capsule image
00000000: 58 AE 3E 1A 80 B5 EF 4F-AC A3 A1 6D 9E 00 DF 5F *X.>....O...m..._*
00000010: 40 00 00 00 01 00 00 00-00 00 00 00 80 11 22 00 *@.............".*<mailto:*@.............%22.*>
00000020: 0C 01 00 00 40 00 00 00-38 10 22 00 78 10 22 00 *....@...8.".x.".*<mailto:*....@...8.%22.x.%22.*>
00000030: 08 01 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
00000040: 01 00 00 00 00 00 01 00-10 00 00 00 00 00 00 00 *................*
00000050: 02 00 00 00 13 68 5C 60-C7 C2 42 42 9C 27 50 A4 *.....h\`..BB.'P.*
00000060: C3 63 DB A4 01 00 00 00-00 10 22 00 00 00 00 00 *.c........".....*
00000070: 42 49 4F 53 00 00 00 00-42 49 4F 53 02 00 00 00 *BIOS....BIOS....*
00000080: 00 00 00 00 00 00 00 00-49 42 42 50 00 10 00 00 *........IBBP....*
00000090: 00 D0 0C 00 00 00 00 00-4F 42 42 50 00 E0 0C 00 *........OBBP....*
000000A0: 00 30 15 00 00 00 00 00-FF FF FF FF FF FF FF FF *.0..............*
000000B0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
000000C0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
000000D0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
000000E0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
000000F0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
CapsuleImage: 0x79470010, CapsuleSize: 0x22128C
HASH verification for usage (0x00000400) with Hash Alg (0x1): Success
SignType (0x1) SignSize (0x100) SignHashAlg (0x1)
RSA verification for usage (0x00000400): Success
Set next FWU state: 0x7F
Get current FWU state: 0x7F
GetFfsFileByName: Not Found
GetVersionfromFv: Not Found
VerifyFwVersion failed with Status = 0x8000000E
ApplyFwImage failed with Status = Not Found
Firmware Update status updated to reserved region
Set next FWU state: 0x77
Firmware update Done! clear CSE flag to normal boot mode.
HECI SecMode 0
I think my capsule image is not generated correctly. To do this, follow the steps below:
1. Build SBL for Apollo Lake:
python BuildLoader.py build apl
2. Generate IFWI image using StitchIfwi.py which generate the APL_SBL_IFWI.bin file.
3. Flash APL_SBL_IFWI.bin using Dediprog.
4. Generate capsule image:
python ./BootloaderCorePkg/Tools/GenCapsuleFirmware.py -v -p BIOS ../bios/IFWI/stitching/Output/APL_SBL_IFWI.bin -k ./BootloaderCorePkg/Tools/Keys/TestSigningPrivateKey.pem -o FwuImage.bin
5. Enter in SBL shell and run fwupdate whit a USB key connected.
6. I get the log shown at the beginning.
Could you tell me if capsule image is correctly generated, if it is not, which BIOS file must I use as argument for GenCapsuleFirmware.py?
Thanks.
Best regards.
2 years, 3 months
Help. SBL versioning
by Gustavo Plaza Roma
Hello,
I am trying to update SBL using the method shown in the documentation https://slimbootloader.github.io/security/firmware-update.html but I get the following error:
=================Read Capsule Image==============
BootMediumPciBase(0xE00A8000)
Init USB XHCI - Success
XHCI: Don't support multi-TT feature for Hub now. (force to disable MTT)
XhcPeiCheckUrbResult: STALL_ERROR! Completecode = 6
XhcPeiControlTransfer: error - Device Error, transfer - 2
XhcPeiCheckUrbResult: STALL_ERROR! Completecode = 6
XhcPeiControlTransfer: error - Device Error, transfer - 2
Enumerate Bus - Success
Found 7 USB devices on bus
Found mass storage on device 0
find boot partition
Partition type: MBR (1 logical partitions)
Find partion success
Find partition
Detected FAT on HwDev 0 Part 0
Capsule Image found, ImageSize=0x22128C
First 256Bytes of capsule image
00000000: 58 AE 3E 1A 80 B5 EF 4F-AC A3 A1 6D 9E 00 DF 5F *X.>....O...m..._*
00000010: 40 00 00 00 01 00 00 00-00 00 00 00 80 11 22 00 *@.............".*
00000020: 0C 01 00 00 40 00 00 00-38 10 22 00 78 10 22 00 *....@...8.".x.".*
00000030: 08 01 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
00000040: 01 00 00 00 00 00 01 00-10 00 00 00 00 00 00 00 *................*
00000050: 02 00 00 00 13 68 5C 60-C7 C2 42 42 9C 27 50 A4 *.....h\`..BB.'P.*
00000060: C3 63 DB A4 01 00 00 00-00 10 22 00 00 00 00 00 *.c........".....*
00000070: 42 49 4F 53 00 00 00 00-42 49 4F 53 02 00 00 00 *BIOS....BIOS....*
00000080: 00 00 00 00 00 00 00 00-49 42 42 50 00 10 00 00 *........IBBP....*
00000090: 00 D0 0C 00 00 00 00 00-4F 42 42 50 00 E0 0C 00 *........OBBP....*
000000A0: 00 30 15 00 00 00 00 00-FF FF FF FF FF FF FF FF *.0..............*
000000B0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
000000C0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
000000D0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
000000E0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
000000F0: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF *................*
CapsuleImage: 0x79470010, CapsuleSize: 0x22128C
HASH verification for usage (0x00000400) with Hash Alg (0x1): Success
SignType (0x1) SignSize (0x100) SignHashAlg (0x1)
RSA verification for usage (0x00000400): Success
Set next FWU state: 0x7F
Get current FWU state: 0x7F
GetFfsFileByName: Not Found
GetVersionfromFv: Not Found
VerifyFwVersion failed with Status = 0x8000000E
ApplyFwImage failed with Status = Not Found
Firmware Update status updated to reserved region
Set next FWU state: 0x77
Firmware update Done! clear CSE flag to normal boot mode.
HECI SecMode 0
I think my capsule image is not generated correctly. To do this, follow the steps below:
1. Build SBL for Apollo Lake:
python BuildLoader.py build apl
2. Generate IFWI image using StitchIfwi.py which generate the APL_SBL_IFWI.bin file.
3. Flash APL_SBL_IFWI.bin using Dediprog.
4. Generate capsule image:
python ./BootloaderCorePkg/Tools/GenCapsuleFirmware.py -v -p BIOS ../bios/IFWI/stitching/Output/APL_SBL_IFWI.bin -k ./BootloaderCorePkg/Tools/Keys/TestSigningPrivateKey.pem -o FwuImage.bin
5. Enter in SBL shell and run fwupdate whit a USB key connected.
6. I get the log shown at the beginning.
Could you tell me if capsule image is correctly generated, if it is not, which BIOS file must I use as argument for GenCapsuleFirmware.py?
Thanks.
Best regards.
2 years, 3 months
Re: Help. SBL versioning
by Ma, Maurice
Great! :)
Thank you so much!
-Maurice
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com>
Sent: Wednesday, March 11, 2020 16:29
To: Ma, Maurice <maurice.ma(a)intel.com>; Dong, Guo <guo.dong(a)intel.com>; sbl-devel(a)lists.01.org
Subject: Re: Help. SBL versioning
Hi,
Of course, I would like to push this change into the repo. I will try to create the pull request this weekend or at the beginning of next week if you are agree.
Thanks.
________________________________
From: Ma, Maurice <maurice.ma(a)intel.com>
Sent: Wednesday, March 11, 2020, 03:35
To: Gustavo Plaza Roma; Dong, Guo; sbl-devel(a)lists.01.org
Subject: RE: Help. SBL versioning
Thank you for providing updates back. Glad to see it worked for you.
BTW, since you enabled /ported the SMBIOS for APL, are you willing to push this change back into the github ? :)
Thanks
Maurice
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com>
Sent: Tuesday, March 10, 2020 16:15
To: Ma, Maurice <maurice.ma(a)intel.com>; Dong, Guo <guo.dong(a)intel.com>; sbl-devel(a)lists.01.org
Subject: RE: Help. SBL versioning
Hi,
This worked well for me! Adding the line Maurice mentioned in the previous message I can get BIOS information using the command "dmidecode -t bios -q".
Thank you all for your help.
________________________________
De: Ma, Maurice <maurice.ma(a)intel.com<mailto:maurice.ma@intel.com>>
Enviado: martes, 10 de marzo de 2020 16:37
Para: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>; Dong, Guo <guo.dong(a)intel.com<mailto:guo.dong@intel.com>>; sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org> <sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>>
Asunto: RE: Help. SBL versioning
Hi,
There is one more thing missing in your patch.
Since you are using OsLoader to boot Linux instead of UEFI payload, you will need to keep a SMBIOS entry record at legacy F segment so that non-UEFI boot can find the SMBIOS table accordingly.
You can try to add the following. I can try to submit a PR in the open source SBL to add this part. 0xFFF60 is hardcoded here for SMBIOS. We do the similar for ACPI table at address 0xFFF80.
diff --git a/BootloaderCorePkg/Library/SmbiosInitLib/SmbiosInitLib.c b/BootloaderCorePkg/Library/SmbiosInitLib/SmbiosInitLib.c
index 4b667ed8bfca..7684b8cf75d0 100644
--- a/BootloaderCorePkg/Library/SmbiosInitLib/SmbiosInitLib.c
+++ b/BootloaderCorePkg/Library/SmbiosInitLib/SmbiosInitLib.c
@@ -151,6 +151,11 @@ FinalizeSmbios (
SmbiosEntry->IntermediateChecksum = CalculateCheckSum8 ((UINT8 *)SmbiosEntry + 0x10, sizeof (SMBIOS_TABLE_ENTRY_POINT) - 0x10);
SmbiosEntry->EntryPointStructureChecksum = CalculateCheckSum8 ((UINT8 *)SmbiosEntry , sizeof (SMBIOS_TABLE_ENTRY_POINT) );
+ //
+ // Keep a copy in legacy F segment so that non-UEFI can locate it
+ //
+ CopyMem ((VOID *)0xFFF60, SmbiosEntry, sizeof (SMBIOS_TABLE_ENTRY_POINT));
+
return Status;
}
Thanks
Maurice
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>
Sent: Tuesday, March 10, 2020 8:23
To: Ma, Maurice <maurice.ma(a)intel.com<mailto:maurice.ma@intel.com>>; Dong, Guo <guo.dong(a)intel.com<mailto:guo.dong@intel.com>>; sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>
Subject: RE: Help. SBL versioning
Hi,
The platform I am using is Apollolake. I have added the function InitializeSmbiosInfo from https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Cof...<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_slimbootl...> to https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Apo... and I call this function from BoardInit.
I have modified the file https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Apo... including the following lines:
gPlatformModuleTokenSpaceGuid.PcdSmbiosStringsPtr
gPlatformModuleTokenSpaceGuid.PcdSmbiosStringsCnt
gPlatformModuleTokenSpaceGuid.PcdSmbiosTablesBase
gPlatformModuleTokenSpaceGuid.PcdSmbiosEnabled
I have also added the line "self.ENABLE_SMBIOS = 1" in https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Apo...
After all of this, I boot the system but when I try run "dmidecode -t bios -q" the output is empty. If I run "dmidecode" without parameters I get:
# dmidecode 3.1
Scanning /dev/mem for entry point.
# No SMBIOS nor DMI entry point found, sorry.
I attach part of the modified files (maybe the patch is not correct, I think some include files are not necessary):
diff --git a/Platform/ApollolakeBoardPkg/BoardConfig.py b/Platform/ApollolakeBoardPkg/BoardConfig.py
index fe2fdb9..f8e8d56 100755
--- a/Platform/ApollolakeBoardPkg/BoardConfig.py
+++ b/Platform/ApollolakeBoardPkg/BoardConfig.py
@@ -42,6 +42,8 @@ class Board(BaseBoard):
self.HAVE_MEASURED_BOOT = 1
self.HAVE_SEED_LIST = 0
self.HAVE_PSD_TABLE = 1
+ self.ENABLE_SMBIOS = 1
+
self.ENABLE_FSP_LOAD_IMAGE = 0
self.ENABLE_CRYPTO_SHA_NI = 1
diff --git a/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.c b/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.c
index cb5af84..98b7eab 100644
--- a/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.c
+++ b/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.c
@@ -7,6 +7,56 @@
#include "Stage2BoardInitLib.h"
+
+
+#include <PiPei.h>
+#include <Library/BaseLib.h>
+#include <Library/PciLib.h>
+#include <Library/PcdLib.h>
+#include <Library/IoLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/BlMemoryAllocationLib.h>
+#include <Library/DebugLib.h>
+#include <Library/SpiFlashLib.h>
+#include <Library/SocInitLib.h>
+#include <Library/BoardInitLib.h>
+#include <Library/SerialPortLib.h>
+#include <Guid/GraphicsInfoHob.h>
+#include <Guid/SystemTableInfoGuid.h>
+#include <Guid/SerialPortInfoGuid.h>
+#include <FspsUpd.h>
+#include <Library/BootloaderCoreLib.h>
+#include <IndustryStandard/Acpi.h>
+#include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>
+#include <BlCommon.h>
+#include <Guid/BootLoaderServiceGuid.h>
+#include <Library/SpiBlockIoLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Service/SpiFlashService.h>
+#include <Library/PrintLib.h>
+#include <ConfigDataDefs.h>
+#include <Library/ConfigDataLib.h>
+#include <Library/IgdOpRegionLib.h>
+#include <Library/VariableLib.h>
+#include <Guid/SmmInformationGuid.h>
+#include <Library/TpmLib.h>
+#include <PlatformBase.h>
+#include <Library/SiGpioLib.h>
+#include <RegAccess.h>
+#include <Library/HobLib.h>
+#include <Library/FirmwareUpdateLib.h>
+#include <Library/MpInitLib.h>
+#include <Guid/GraphicsInfoHob.h>
+#include <Library/PciCf8Lib.h>
+#include <Library/BoardSupportLib.h>
+#include <PlatformData.h>
+#include <PsdLib.h>
+#include <Library/SmbiosInitLib.h>
+#include <IndustryStandard/SmBios.h>
+#include <VerInfo.h>
+#include <Library/PchSpiLib.h>
+#include <Register/RegsSpi.h>
+
#define VBT_OFFSET 36
UINT32 mOtgDualRoleCfg0 = 0;
@@ -97,6 +147,150 @@ CreateNhltAcpiTable (
return PlatformService->AcpiTableUpdate ((UINT8 *)Table, Table->Header.Length);
}
+
+
+/**
+ Add a Smbios type string into a buffer
+
+**/
+STATIC
+EFI_STATUS
+AddSmbiosTypeString (
+ SMBIOS_TYPE_STRINGS *Dest,
+ UINT8 Type,
+ UINT8 Index,
+ CHAR8 *String
+ )
+{
+ UINTN Length;
+
+ Dest->Type = Type;
+ Dest->Idx = Index;
+ if (String != NULL) {
+ Length = AsciiStrLen (String);
+
+ Dest->String = (CHAR8 *)AllocateZeroPool (Length + 1);
+ if (Dest->String == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+ CopyMem (Dest->String, String, Length);
+ }
+
+ return EFI_SUCCESS;
+}
+
+/**
+ Initialize necessary information for Smbios
+
+ @retval EFI_SUCCESS Initialized necessary information successfully
+ @retval EFI_OUT_OF_RESOURCES Failed to allocate memory for Smbios info
+
+**/
+EFI_STATUS
+InitializeSmbiosInfo (
+ VOID
+ )
+{
+ CHAR8 TempStrBuf[SMBIOS_STRING_MAX_LENGTH];
+ UINT16 Index;
+ UINT16 PlatformId;
+ UINTN Length;
+ SMBIOS_TYPE_STRINGS *TempSmbiosStrTbl;
+ BOOT_LOADER_VERSION *VerInfoTbl;
+ VOID *SmbiosStringsPtr;
+
+ Index = 0;
+ PlatformId = GetPlatformId ();
+ TempSmbiosStrTbl = (SMBIOS_TYPE_STRINGS *) AllocateTemporaryMemory (0);
+ VerInfoTbl = GetLoaderGlobalDataPointer()->VerInfoPtr;
+
+ //
+ // SMBIOS_TYPE_BIOS_INFORMATION
+ //
+
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BIOS_INFORMATION,
+ 1, "Intel Corporation");
+ if (VerInfoTbl != NULL) {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf),
+ "SB_CFL.%03d.%03d.%03d.%03d.%03d.%05d.%c-%016lX%a\0",
+ VerInfoTbl->ImageVersion.SecureVerNum,
+ VerInfoTbl->ImageVersion.CoreMajorVersion,
+ VerInfoTbl->ImageVersion.CoreMinorVersion,
+ VerInfoTbl->ImageVersion.ProjMajorVersion,
+ VerInfoTbl->ImageVersion.ProjMinorVersion,
+ VerInfoTbl->ImageVersion.BuildNumber,
+ VerInfoTbl->ImageVersion.BldDebug ? 'D' : 'R',
+ VerInfoTbl->SourceVersion,
+ VerInfoTbl->ImageVersion.Dirty ? "-dirty" : "");
+ } else {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "Unknown");
+ }
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BIOS_INFORMATION,
+ 2, TempStrBuf);
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BIOS_INFORMATION,
+ 3, "Unknown date");
+
+ //
+ // SMBIOS_TYPE_SYSTEM_INFORMATION
+ //
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 1, "Intel Corporation");
+ if ((PlatformId == PLATFORM_ID_UC100)) {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "UC100 Client Platform");
+ } else {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "Unknown");
+ }
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 2, TempStrBuf);
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 3, "0.1");
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 4, "System Serial Number");
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 5, "System SKU Number");
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 6, "CannonLake Client System");
+
+ //
+ // SMBIOS_TYPE_BASEBOARD_INFORMATION
+ //
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BASEBOARD_INFORMATION,
+ 1, "Intel Corporation");
+ if (PlatformId == PLATFORM_ID_UC100) {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "UC100 Platform");
+ } else {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "Unknown");
+ }
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BASEBOARD_INFORMATION,
+ 2, TempStrBuf);
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BASEBOARD_INFORMATION,
+ 3, "1");
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BASEBOARD_INFORMATION,
+ 4, "Board Serial Number");
+
+ //
+ // SMBIOS_TYPE_PROCESSOR_INFORMATION : TBD
+ //
+
+ //
+ // SMBIOS_TYPE_END_OF_TABLE
+ //
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_END_OF_TABLE,
+ 0, NULL);
+
+ Length = sizeof (SMBIOS_TYPE_STRINGS) * Index;
+ SmbiosStringsPtr = AllocatePool (Length);
+ if (SmbiosStringsPtr == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+
+ CopyMem (SmbiosStringsPtr, TempSmbiosStrTbl, Length);
+ (VOID) PcdSet32S (PcdSmbiosStringsPtr, (UINT32)(UINTN)SmbiosStringsPtr);
+ (VOID) PcdSet16S (PcdSmbiosStringsCnt, Index);
+
+ return EFI_SUCCESS;
+}
+
/**
Print the output of the GPIO Config table that was read from CfgData.
@@ -724,6 +918,14 @@ BoardInit (
PciWrite8 (PCI_LIB_ADDRESS(SA_IGD_BUS, SA_IGD_DEV, SA_IGD_FUN_0, PCI_COMMAND_OFFSET), \
EFI_PCI_COMMAND_MEMORY_SPACE | EFI_PCI_COMMAND_BUS_MASTER);
}
+
+ //
+ // Initialize Smbios Info for SmbiosInit
+ //
+ if (FeaturePcdGet (PcdSmbiosEnabled)) {
+ InitializeSmbiosInfo ();
+ }
+
BuildOsConfigDataHob ();
break;
case PostPciEnumeration:
@@ -1363,8 +1565,6 @@ UpdateLoaderPlatformInfo (
}
}
diff --git a/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.inf b/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.inf
index a883d23..78acc0c 100644
--- a/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.inf
+++ b/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.inf
@@ -90,6 +90,10 @@
gPlatformCommonLibTokenSpaceGuid.PcdSeedListEnabled
gPlatformModuleTokenSpaceGuid.PcdPayloadReservedMemSize
gPlatformModuleTokenSpaceGuid.PcdPsdBiosEnabled
+ gPlatformModuleTokenSpaceGuid.PcdSmbiosStringsPtr
+ gPlatformModuleTokenSpaceGuid.PcdSmbiosStringsCnt
+ gPlatformModuleTokenSpaceGuid.PcdSmbiosTablesBase
+ gPlatformModuleTokenSpaceGuid.PcdSmbiosEnabled
gPlatformCommonLibTokenSpaceGuid.PcdVerifiedBootEnabled
gPlatformCommonLibTokenSpaceGuid.PcdMeasuredBootEnabled
gPlatformModuleTokenSpaceGuid.PcdSplashEnabled
--
Thanks.
________________________________
De: Ma, Maurice <maurice.ma(a)intel.com<mailto:maurice.ma@intel.com>>
Enviado: lunes, 9 de marzo de 2020 17:55
Para: Dong, Guo <guo.dong(a)intel.com<mailto:guo.dong@intel.com>>; Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>; sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org> <sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>>
Asunto: RE: Help. SBL versioning
Yes, the standard way to retrieve BIOS version in user space is through SMBIOS table.
There are standard tools to do this. You might need admin/root access though.
In Windows, you can use
"wmic bios get smbiosbiosversion"
In Linux, you can use
"dmidecode -t bios -q"
In SBL, you will need to enable the SMBIOS for the project. Currently in the SBL repo, only CFL enabled SMBIOS by default.
For other projects, it needs some porting to enable it as Guo mentioned.
Thanks
Maurice
From: Dong, Guo <guo.dong(a)intel.com<mailto:guo.dong@intel.com>>
Sent: Monday, March 9, 2020 7:43
To: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>; sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>
Subject: [Sbl-devel] Re: Help. SBL versioning
Hi,
Please try if you could get the version information from SMBIOS table?
SBL should put these information into SMBIOS table.
Please refer InitializeSmbiosInfo () in
https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Cof...
Thanks,
Guo
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>
Sent: Sunday, March 8, 2020 6:41 PM
To: sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>
Subject: [Sbl-devel] Help. SBL versioning
Hello,
First of all sorry if the question makes no sense but I am new using SBL.
At this moment I have a SBL in my board that boot the Os using the payload "Os Loader".
The OS is Linux distro generated using Yocto. I don't know how to get the SBL version from user space in Linux.
I have read the versioning documentation page (https://slimbootloader.github.io/developer-guides/versioning.html) but I don't know how to access to the HOB data list with GUID gBootLoaderVersionGuid.
Could someone tell me how to access the version of SBL from Linux?
Best regards.
2 years, 3 months
Re: Help. SBL versioning
by Ma, Maurice
Thank you for providing updates back. Glad to see it worked for you.
BTW, since you enabled /ported the SMBIOS for APL, are you willing to push this change back into the github ? :)
Thanks
Maurice
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com>
Sent: Tuesday, March 10, 2020 16:15
To: Ma, Maurice <maurice.ma(a)intel.com>; Dong, Guo <guo.dong(a)intel.com>; sbl-devel(a)lists.01.org
Subject: RE: Help. SBL versioning
Hi,
This worked well for me! Adding the line Maurice mentioned in the previous message I can get BIOS information using the command "dmidecode -t bios -q".
Thank you all for your help.
________________________________
De: Ma, Maurice <maurice.ma(a)intel.com<mailto:maurice.ma@intel.com>>
Enviado: martes, 10 de marzo de 2020 16:37
Para: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>; Dong, Guo <guo.dong(a)intel.com<mailto:guo.dong@intel.com>>; sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org> <sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>>
Asunto: RE: Help. SBL versioning
Hi,
There is one more thing missing in your patch.
Since you are using OsLoader to boot Linux instead of UEFI payload, you will need to keep a SMBIOS entry record at legacy F segment so that non-UEFI boot can find the SMBIOS table accordingly.
You can try to add the following. I can try to submit a PR in the open source SBL to add this part. 0xFFF60 is hardcoded here for SMBIOS. We do the similar for ACPI table at address 0xFFF80.
diff --git a/BootloaderCorePkg/Library/SmbiosInitLib/SmbiosInitLib.c b/BootloaderCorePkg/Library/SmbiosInitLib/SmbiosInitLib.c
index 4b667ed8bfca..7684b8cf75d0 100644
--- a/BootloaderCorePkg/Library/SmbiosInitLib/SmbiosInitLib.c
+++ b/BootloaderCorePkg/Library/SmbiosInitLib/SmbiosInitLib.c
@@ -151,6 +151,11 @@ FinalizeSmbios (
SmbiosEntry->IntermediateChecksum = CalculateCheckSum8 ((UINT8 *)SmbiosEntry + 0x10, sizeof (SMBIOS_TABLE_ENTRY_POINT) - 0x10);
SmbiosEntry->EntryPointStructureChecksum = CalculateCheckSum8 ((UINT8 *)SmbiosEntry , sizeof (SMBIOS_TABLE_ENTRY_POINT) );
+ //
+ // Keep a copy in legacy F segment so that non-UEFI can locate it
+ //
+ CopyMem ((VOID *)0xFFF60, SmbiosEntry, sizeof (SMBIOS_TABLE_ENTRY_POINT));
+
return Status;
}
Thanks
Maurice
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>
Sent: Tuesday, March 10, 2020 8:23
To: Ma, Maurice <maurice.ma(a)intel.com<mailto:maurice.ma@intel.com>>; Dong, Guo <guo.dong(a)intel.com<mailto:guo.dong@intel.com>>; sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>
Subject: RE: Help. SBL versioning
Hi,
The platform I am using is Apollolake. I have added the function InitializeSmbiosInfo from https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Cof...<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_slimbootl...> to https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Apo... and I call this function from BoardInit.
I have modified the file https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Apo... including the following lines:
gPlatformModuleTokenSpaceGuid.PcdSmbiosStringsPtr
gPlatformModuleTokenSpaceGuid.PcdSmbiosStringsCnt
gPlatformModuleTokenSpaceGuid.PcdSmbiosTablesBase
gPlatformModuleTokenSpaceGuid.PcdSmbiosEnabled
I have also added the line "self.ENABLE_SMBIOS = 1" in https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Apo...
After all of this, I boot the system but when I try run "dmidecode -t bios -q" the output is empty. If I run "dmidecode" without parameters I get:
# dmidecode 3.1
Scanning /dev/mem for entry point.
# No SMBIOS nor DMI entry point found, sorry.
I attach part of the modified files (maybe the patch is not correct, I think some include files are not necessary):
diff --git a/Platform/ApollolakeBoardPkg/BoardConfig.py b/Platform/ApollolakeBoardPkg/BoardConfig.py
index fe2fdb9..f8e8d56 100755
--- a/Platform/ApollolakeBoardPkg/BoardConfig.py
+++ b/Platform/ApollolakeBoardPkg/BoardConfig.py
@@ -42,6 +42,8 @@ class Board(BaseBoard):
self.HAVE_MEASURED_BOOT = 1
self.HAVE_SEED_LIST = 0
self.HAVE_PSD_TABLE = 1
+ self.ENABLE_SMBIOS = 1
+
self.ENABLE_FSP_LOAD_IMAGE = 0
self.ENABLE_CRYPTO_SHA_NI = 1
diff --git a/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.c b/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.c
index cb5af84..98b7eab 100644
--- a/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.c
+++ b/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.c
@@ -7,6 +7,56 @@
#include "Stage2BoardInitLib.h"
+
+
+#include <PiPei.h>
+#include <Library/BaseLib.h>
+#include <Library/PciLib.h>
+#include <Library/PcdLib.h>
+#include <Library/IoLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/BlMemoryAllocationLib.h>
+#include <Library/DebugLib.h>
+#include <Library/SpiFlashLib.h>
+#include <Library/SocInitLib.h>
+#include <Library/BoardInitLib.h>
+#include <Library/SerialPortLib.h>
+#include <Guid/GraphicsInfoHob.h>
+#include <Guid/SystemTableInfoGuid.h>
+#include <Guid/SerialPortInfoGuid.h>
+#include <FspsUpd.h>
+#include <Library/BootloaderCoreLib.h>
+#include <IndustryStandard/Acpi.h>
+#include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>
+#include <BlCommon.h>
+#include <Guid/BootLoaderServiceGuid.h>
+#include <Library/SpiBlockIoLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Service/SpiFlashService.h>
+#include <Library/PrintLib.h>
+#include <ConfigDataDefs.h>
+#include <Library/ConfigDataLib.h>
+#include <Library/IgdOpRegionLib.h>
+#include <Library/VariableLib.h>
+#include <Guid/SmmInformationGuid.h>
+#include <Library/TpmLib.h>
+#include <PlatformBase.h>
+#include <Library/SiGpioLib.h>
+#include <RegAccess.h>
+#include <Library/HobLib.h>
+#include <Library/FirmwareUpdateLib.h>
+#include <Library/MpInitLib.h>
+#include <Guid/GraphicsInfoHob.h>
+#include <Library/PciCf8Lib.h>
+#include <Library/BoardSupportLib.h>
+#include <PlatformData.h>
+#include <PsdLib.h>
+#include <Library/SmbiosInitLib.h>
+#include <IndustryStandard/SmBios.h>
+#include <VerInfo.h>
+#include <Library/PchSpiLib.h>
+#include <Register/RegsSpi.h>
+
#define VBT_OFFSET 36
UINT32 mOtgDualRoleCfg0 = 0;
@@ -97,6 +147,150 @@ CreateNhltAcpiTable (
return PlatformService->AcpiTableUpdate ((UINT8 *)Table, Table->Header.Length);
}
+
+
+/**
+ Add a Smbios type string into a buffer
+
+**/
+STATIC
+EFI_STATUS
+AddSmbiosTypeString (
+ SMBIOS_TYPE_STRINGS *Dest,
+ UINT8 Type,
+ UINT8 Index,
+ CHAR8 *String
+ )
+{
+ UINTN Length;
+
+ Dest->Type = Type;
+ Dest->Idx = Index;
+ if (String != NULL) {
+ Length = AsciiStrLen (String);
+
+ Dest->String = (CHAR8 *)AllocateZeroPool (Length + 1);
+ if (Dest->String == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+ CopyMem (Dest->String, String, Length);
+ }
+
+ return EFI_SUCCESS;
+}
+
+/**
+ Initialize necessary information for Smbios
+
+ @retval EFI_SUCCESS Initialized necessary information successfully
+ @retval EFI_OUT_OF_RESOURCES Failed to allocate memory for Smbios info
+
+**/
+EFI_STATUS
+InitializeSmbiosInfo (
+ VOID
+ )
+{
+ CHAR8 TempStrBuf[SMBIOS_STRING_MAX_LENGTH];
+ UINT16 Index;
+ UINT16 PlatformId;
+ UINTN Length;
+ SMBIOS_TYPE_STRINGS *TempSmbiosStrTbl;
+ BOOT_LOADER_VERSION *VerInfoTbl;
+ VOID *SmbiosStringsPtr;
+
+ Index = 0;
+ PlatformId = GetPlatformId ();
+ TempSmbiosStrTbl = (SMBIOS_TYPE_STRINGS *) AllocateTemporaryMemory (0);
+ VerInfoTbl = GetLoaderGlobalDataPointer()->VerInfoPtr;
+
+ //
+ // SMBIOS_TYPE_BIOS_INFORMATION
+ //
+
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BIOS_INFORMATION,
+ 1, "Intel Corporation");
+ if (VerInfoTbl != NULL) {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf),
+ "SB_CFL.%03d.%03d.%03d.%03d.%03d.%05d.%c-%016lX%a\0",
+ VerInfoTbl->ImageVersion.SecureVerNum,
+ VerInfoTbl->ImageVersion.CoreMajorVersion,
+ VerInfoTbl->ImageVersion.CoreMinorVersion,
+ VerInfoTbl->ImageVersion.ProjMajorVersion,
+ VerInfoTbl->ImageVersion.ProjMinorVersion,
+ VerInfoTbl->ImageVersion.BuildNumber,
+ VerInfoTbl->ImageVersion.BldDebug ? 'D' : 'R',
+ VerInfoTbl->SourceVersion,
+ VerInfoTbl->ImageVersion.Dirty ? "-dirty" : "");
+ } else {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "Unknown");
+ }
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BIOS_INFORMATION,
+ 2, TempStrBuf);
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BIOS_INFORMATION,
+ 3, "Unknown date");
+
+ //
+ // SMBIOS_TYPE_SYSTEM_INFORMATION
+ //
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 1, "Intel Corporation");
+ if ((PlatformId == PLATFORM_ID_UC100)) {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "UC100 Client Platform");
+ } else {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "Unknown");
+ }
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 2, TempStrBuf);
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 3, "0.1");
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 4, "System Serial Number");
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 5, "System SKU Number");
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 6, "CannonLake Client System");
+
+ //
+ // SMBIOS_TYPE_BASEBOARD_INFORMATION
+ //
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BASEBOARD_INFORMATION,
+ 1, "Intel Corporation");
+ if (PlatformId == PLATFORM_ID_UC100) {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "UC100 Platform");
+ } else {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "Unknown");
+ }
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BASEBOARD_INFORMATION,
+ 2, TempStrBuf);
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BASEBOARD_INFORMATION,
+ 3, "1");
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BASEBOARD_INFORMATION,
+ 4, "Board Serial Number");
+
+ //
+ // SMBIOS_TYPE_PROCESSOR_INFORMATION : TBD
+ //
+
+ //
+ // SMBIOS_TYPE_END_OF_TABLE
+ //
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_END_OF_TABLE,
+ 0, NULL);
+
+ Length = sizeof (SMBIOS_TYPE_STRINGS) * Index;
+ SmbiosStringsPtr = AllocatePool (Length);
+ if (SmbiosStringsPtr == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+
+ CopyMem (SmbiosStringsPtr, TempSmbiosStrTbl, Length);
+ (VOID) PcdSet32S (PcdSmbiosStringsPtr, (UINT32)(UINTN)SmbiosStringsPtr);
+ (VOID) PcdSet16S (PcdSmbiosStringsCnt, Index);
+
+ return EFI_SUCCESS;
+}
+
/**
Print the output of the GPIO Config table that was read from CfgData.
@@ -724,6 +918,14 @@ BoardInit (
PciWrite8 (PCI_LIB_ADDRESS(SA_IGD_BUS, SA_IGD_DEV, SA_IGD_FUN_0, PCI_COMMAND_OFFSET), \
EFI_PCI_COMMAND_MEMORY_SPACE | EFI_PCI_COMMAND_BUS_MASTER);
}
+
+ //
+ // Initialize Smbios Info for SmbiosInit
+ //
+ if (FeaturePcdGet (PcdSmbiosEnabled)) {
+ InitializeSmbiosInfo ();
+ }
+
BuildOsConfigDataHob ();
break;
case PostPciEnumeration:
@@ -1363,8 +1565,6 @@ UpdateLoaderPlatformInfo (
}
}
diff --git a/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.inf b/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.inf
index a883d23..78acc0c 100644
--- a/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.inf
+++ b/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.inf
@@ -90,6 +90,10 @@
gPlatformCommonLibTokenSpaceGuid.PcdSeedListEnabled
gPlatformModuleTokenSpaceGuid.PcdPayloadReservedMemSize
gPlatformModuleTokenSpaceGuid.PcdPsdBiosEnabled
+ gPlatformModuleTokenSpaceGuid.PcdSmbiosStringsPtr
+ gPlatformModuleTokenSpaceGuid.PcdSmbiosStringsCnt
+ gPlatformModuleTokenSpaceGuid.PcdSmbiosTablesBase
+ gPlatformModuleTokenSpaceGuid.PcdSmbiosEnabled
gPlatformCommonLibTokenSpaceGuid.PcdVerifiedBootEnabled
gPlatformCommonLibTokenSpaceGuid.PcdMeasuredBootEnabled
gPlatformModuleTokenSpaceGuid.PcdSplashEnabled
--
Thanks.
________________________________
De: Ma, Maurice <maurice.ma(a)intel.com<mailto:maurice.ma@intel.com>>
Enviado: lunes, 9 de marzo de 2020 17:55
Para: Dong, Guo <guo.dong(a)intel.com<mailto:guo.dong@intel.com>>; Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>; sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org> <sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>>
Asunto: RE: Help. SBL versioning
Yes, the standard way to retrieve BIOS version in user space is through SMBIOS table.
There are standard tools to do this. You might need admin/root access though.
In Windows, you can use
"wmic bios get smbiosbiosversion"
In Linux, you can use
"dmidecode -t bios -q"
In SBL, you will need to enable the SMBIOS for the project. Currently in the SBL repo, only CFL enabled SMBIOS by default.
For other projects, it needs some porting to enable it as Guo mentioned.
Thanks
Maurice
From: Dong, Guo <guo.dong(a)intel.com<mailto:guo.dong@intel.com>>
Sent: Monday, March 9, 2020 7:43
To: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>; sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>
Subject: [Sbl-devel] Re: Help. SBL versioning
Hi,
Please try if you could get the version information from SMBIOS table?
SBL should put these information into SMBIOS table.
Please refer InitializeSmbiosInfo () in
https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Cof...
Thanks,
Guo
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>
Sent: Sunday, March 8, 2020 6:41 PM
To: sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>
Subject: [Sbl-devel] Help. SBL versioning
Hello,
First of all sorry if the question makes no sense but I am new using SBL.
At this moment I have a SBL in my board that boot the Os using the payload "Os Loader".
The OS is Linux distro generated using Yocto. I don't know how to get the SBL version from user space in Linux.
I have read the versioning documentation page (https://slimbootloader.github.io/developer-guides/versioning.html) but I don't know how to access to the HOB data list with GUID gBootLoaderVersionGuid.
Could someone tell me how to access the version of SBL from Linux?
Best regards.
2 years, 3 months
Re: Help. SBL versioning
by Ma, Maurice
Hi,
There is one more thing missing in your patch.
Since you are using OsLoader to boot Linux instead of UEFI payload, you will need to keep a SMBIOS entry record at legacy F segment so that non-UEFI boot can find the SMBIOS table accordingly.
You can try to add the following. I can try to submit a PR in the open source SBL to add this part. 0xFFF60 is hardcoded here for SMBIOS. We do the similar for ACPI table at address 0xFFF80.
diff --git a/BootloaderCorePkg/Library/SmbiosInitLib/SmbiosInitLib.c b/BootloaderCorePkg/Library/SmbiosInitLib/SmbiosInitLib.c
index 4b667ed8bfca..7684b8cf75d0 100644
--- a/BootloaderCorePkg/Library/SmbiosInitLib/SmbiosInitLib.c
+++ b/BootloaderCorePkg/Library/SmbiosInitLib/SmbiosInitLib.c
@@ -151,6 +151,11 @@ FinalizeSmbios (
SmbiosEntry->IntermediateChecksum = CalculateCheckSum8 ((UINT8 *)SmbiosEntry + 0x10, sizeof (SMBIOS_TABLE_ENTRY_POINT) - 0x10);
SmbiosEntry->EntryPointStructureChecksum = CalculateCheckSum8 ((UINT8 *)SmbiosEntry , sizeof (SMBIOS_TABLE_ENTRY_POINT) );
+ //
+ // Keep a copy in legacy F segment so that non-UEFI can locate it
+ //
+ CopyMem ((VOID *)0xFFF60, SmbiosEntry, sizeof (SMBIOS_TABLE_ENTRY_POINT));
+
return Status;
}
Thanks
Maurice
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com>
Sent: Tuesday, March 10, 2020 8:23
To: Ma, Maurice <maurice.ma(a)intel.com>; Dong, Guo <guo.dong(a)intel.com>; sbl-devel(a)lists.01.org
Subject: RE: Help. SBL versioning
Hi,
The platform I am using is Apollolake. I have added the function InitializeSmbiosInfo from https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Cof...<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_slimbootl...> to https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Apo... and I call this function from BoardInit.
I have modified the file https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Apo... including the following lines:
gPlatformModuleTokenSpaceGuid.PcdSmbiosStringsPtr
gPlatformModuleTokenSpaceGuid.PcdSmbiosStringsCnt
gPlatformModuleTokenSpaceGuid.PcdSmbiosTablesBase
gPlatformModuleTokenSpaceGuid.PcdSmbiosEnabled
I have also added the line "self.ENABLE_SMBIOS = 1" in https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Apo...
After all of this, I boot the system but when I try run "dmidecode -t bios -q" the output is empty. If I run "dmidecode" without parameters I get:
# dmidecode 3.1
Scanning /dev/mem for entry point.
# No SMBIOS nor DMI entry point found, sorry.
I attach part of the modified files (maybe the patch is not correct, I think some include files are not necessary):
diff --git a/Platform/ApollolakeBoardPkg/BoardConfig.py b/Platform/ApollolakeBoardPkg/BoardConfig.py
index fe2fdb9..f8e8d56 100755
--- a/Platform/ApollolakeBoardPkg/BoardConfig.py
+++ b/Platform/ApollolakeBoardPkg/BoardConfig.py
@@ -42,6 +42,8 @@ class Board(BaseBoard):
self.HAVE_MEASURED_BOOT = 1
self.HAVE_SEED_LIST = 0
self.HAVE_PSD_TABLE = 1
+ self.ENABLE_SMBIOS = 1
+
self.ENABLE_FSP_LOAD_IMAGE = 0
self.ENABLE_CRYPTO_SHA_NI = 1
diff --git a/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.c b/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.c
index cb5af84..98b7eab 100644
--- a/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.c
+++ b/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.c
@@ -7,6 +7,56 @@
#include "Stage2BoardInitLib.h"
+
+
+#include <PiPei.h>
+#include <Library/BaseLib.h>
+#include <Library/PciLib.h>
+#include <Library/PcdLib.h>
+#include <Library/IoLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/BlMemoryAllocationLib.h>
+#include <Library/DebugLib.h>
+#include <Library/SpiFlashLib.h>
+#include <Library/SocInitLib.h>
+#include <Library/BoardInitLib.h>
+#include <Library/SerialPortLib.h>
+#include <Guid/GraphicsInfoHob.h>
+#include <Guid/SystemTableInfoGuid.h>
+#include <Guid/SerialPortInfoGuid.h>
+#include <FspsUpd.h>
+#include <Library/BootloaderCoreLib.h>
+#include <IndustryStandard/Acpi.h>
+#include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>
+#include <BlCommon.h>
+#include <Guid/BootLoaderServiceGuid.h>
+#include <Library/SpiBlockIoLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Service/SpiFlashService.h>
+#include <Library/PrintLib.h>
+#include <ConfigDataDefs.h>
+#include <Library/ConfigDataLib.h>
+#include <Library/IgdOpRegionLib.h>
+#include <Library/VariableLib.h>
+#include <Guid/SmmInformationGuid.h>
+#include <Library/TpmLib.h>
+#include <PlatformBase.h>
+#include <Library/SiGpioLib.h>
+#include <RegAccess.h>
+#include <Library/HobLib.h>
+#include <Library/FirmwareUpdateLib.h>
+#include <Library/MpInitLib.h>
+#include <Guid/GraphicsInfoHob.h>
+#include <Library/PciCf8Lib.h>
+#include <Library/BoardSupportLib.h>
+#include <PlatformData.h>
+#include <PsdLib.h>
+#include <Library/SmbiosInitLib.h>
+#include <IndustryStandard/SmBios.h>
+#include <VerInfo.h>
+#include <Library/PchSpiLib.h>
+#include <Register/RegsSpi.h>
+
#define VBT_OFFSET 36
UINT32 mOtgDualRoleCfg0 = 0;
@@ -97,6 +147,150 @@ CreateNhltAcpiTable (
return PlatformService->AcpiTableUpdate ((UINT8 *)Table, Table->Header.Length);
}
+
+
+/**
+ Add a Smbios type string into a buffer
+
+**/
+STATIC
+EFI_STATUS
+AddSmbiosTypeString (
+ SMBIOS_TYPE_STRINGS *Dest,
+ UINT8 Type,
+ UINT8 Index,
+ CHAR8 *String
+ )
+{
+ UINTN Length;
+
+ Dest->Type = Type;
+ Dest->Idx = Index;
+ if (String != NULL) {
+ Length = AsciiStrLen (String);
+
+ Dest->String = (CHAR8 *)AllocateZeroPool (Length + 1);
+ if (Dest->String == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+ CopyMem (Dest->String, String, Length);
+ }
+
+ return EFI_SUCCESS;
+}
+
+/**
+ Initialize necessary information for Smbios
+
+ @retval EFI_SUCCESS Initialized necessary information successfully
+ @retval EFI_OUT_OF_RESOURCES Failed to allocate memory for Smbios info
+
+**/
+EFI_STATUS
+InitializeSmbiosInfo (
+ VOID
+ )
+{
+ CHAR8 TempStrBuf[SMBIOS_STRING_MAX_LENGTH];
+ UINT16 Index;
+ UINT16 PlatformId;
+ UINTN Length;
+ SMBIOS_TYPE_STRINGS *TempSmbiosStrTbl;
+ BOOT_LOADER_VERSION *VerInfoTbl;
+ VOID *SmbiosStringsPtr;
+
+ Index = 0;
+ PlatformId = GetPlatformId ();
+ TempSmbiosStrTbl = (SMBIOS_TYPE_STRINGS *) AllocateTemporaryMemory (0);
+ VerInfoTbl = GetLoaderGlobalDataPointer()->VerInfoPtr;
+
+ //
+ // SMBIOS_TYPE_BIOS_INFORMATION
+ //
+
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BIOS_INFORMATION,
+ 1, "Intel Corporation");
+ if (VerInfoTbl != NULL) {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf),
+ "SB_CFL.%03d.%03d.%03d.%03d.%03d.%05d.%c-%016lX%a\0",
+ VerInfoTbl->ImageVersion.SecureVerNum,
+ VerInfoTbl->ImageVersion.CoreMajorVersion,
+ VerInfoTbl->ImageVersion.CoreMinorVersion,
+ VerInfoTbl->ImageVersion.ProjMajorVersion,
+ VerInfoTbl->ImageVersion.ProjMinorVersion,
+ VerInfoTbl->ImageVersion.BuildNumber,
+ VerInfoTbl->ImageVersion.BldDebug ? 'D' : 'R',
+ VerInfoTbl->SourceVersion,
+ VerInfoTbl->ImageVersion.Dirty ? "-dirty" : "");
+ } else {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "Unknown");
+ }
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BIOS_INFORMATION,
+ 2, TempStrBuf);
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BIOS_INFORMATION,
+ 3, "Unknown date");
+
+ //
+ // SMBIOS_TYPE_SYSTEM_INFORMATION
+ //
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 1, "Intel Corporation");
+ if ((PlatformId == PLATFORM_ID_UC100)) {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "UC100 Client Platform");
+ } else {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "Unknown");
+ }
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 2, TempStrBuf);
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 3, "0.1");
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 4, "System Serial Number");
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 5, "System SKU Number");
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_SYSTEM_INFORMATION,
+ 6, "CannonLake Client System");
+
+ //
+ // SMBIOS_TYPE_BASEBOARD_INFORMATION
+ //
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BASEBOARD_INFORMATION,
+ 1, "Intel Corporation");
+ if (PlatformId == PLATFORM_ID_UC100) {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "UC100 Platform");
+ } else {
+ AsciiSPrint (TempStrBuf, sizeof (TempStrBuf), "%a\0", "Unknown");
+ }
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BASEBOARD_INFORMATION,
+ 2, TempStrBuf);
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BASEBOARD_INFORMATION,
+ 3, "1");
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_BASEBOARD_INFORMATION,
+ 4, "Board Serial Number");
+
+ //
+ // SMBIOS_TYPE_PROCESSOR_INFORMATION : TBD
+ //
+
+ //
+ // SMBIOS_TYPE_END_OF_TABLE
+ //
+ AddSmbiosTypeString (&TempSmbiosStrTbl[Index++], SMBIOS_TYPE_END_OF_TABLE,
+ 0, NULL);
+
+ Length = sizeof (SMBIOS_TYPE_STRINGS) * Index;
+ SmbiosStringsPtr = AllocatePool (Length);
+ if (SmbiosStringsPtr == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+
+ CopyMem (SmbiosStringsPtr, TempSmbiosStrTbl, Length);
+ (VOID) PcdSet32S (PcdSmbiosStringsPtr, (UINT32)(UINTN)SmbiosStringsPtr);
+ (VOID) PcdSet16S (PcdSmbiosStringsCnt, Index);
+
+ return EFI_SUCCESS;
+}
+
/**
Print the output of the GPIO Config table that was read from CfgData.
@@ -724,6 +918,14 @@ BoardInit (
PciWrite8 (PCI_LIB_ADDRESS(SA_IGD_BUS, SA_IGD_DEV, SA_IGD_FUN_0, PCI_COMMAND_OFFSET), \
EFI_PCI_COMMAND_MEMORY_SPACE | EFI_PCI_COMMAND_BUS_MASTER);
}
+
+ //
+ // Initialize Smbios Info for SmbiosInit
+ //
+ if (FeaturePcdGet (PcdSmbiosEnabled)) {
+ InitializeSmbiosInfo ();
+ }
+
BuildOsConfigDataHob ();
break;
case PostPciEnumeration:
@@ -1363,8 +1565,6 @@ UpdateLoaderPlatformInfo (
}
}
diff --git a/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.inf b/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.inf
index a883d23..78acc0c 100644
--- a/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.inf
+++ b/Platform/ApollolakeBoardPkg/Library/Stage2BoardInitLib/Stage2BoardInitLib.inf
@@ -90,6 +90,10 @@
gPlatformCommonLibTokenSpaceGuid.PcdSeedListEnabled
gPlatformModuleTokenSpaceGuid.PcdPayloadReservedMemSize
gPlatformModuleTokenSpaceGuid.PcdPsdBiosEnabled
+ gPlatformModuleTokenSpaceGuid.PcdSmbiosStringsPtr
+ gPlatformModuleTokenSpaceGuid.PcdSmbiosStringsCnt
+ gPlatformModuleTokenSpaceGuid.PcdSmbiosTablesBase
+ gPlatformModuleTokenSpaceGuid.PcdSmbiosEnabled
gPlatformCommonLibTokenSpaceGuid.PcdVerifiedBootEnabled
gPlatformCommonLibTokenSpaceGuid.PcdMeasuredBootEnabled
gPlatformModuleTokenSpaceGuid.PcdSplashEnabled
--
Thanks.
________________________________
De: Ma, Maurice <maurice.ma(a)intel.com<mailto:maurice.ma@intel.com>>
Enviado: lunes, 9 de marzo de 2020 17:55
Para: Dong, Guo <guo.dong(a)intel.com<mailto:guo.dong@intel.com>>; Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>; sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org> <sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>>
Asunto: RE: Help. SBL versioning
Yes, the standard way to retrieve BIOS version in user space is through SMBIOS table.
There are standard tools to do this. You might need admin/root access though.
In Windows, you can use
"wmic bios get smbiosbiosversion"
In Linux, you can use
"dmidecode -t bios -q"
In SBL, you will need to enable the SMBIOS for the project. Currently in the SBL repo, only CFL enabled SMBIOS by default.
For other projects, it needs some porting to enable it as Guo mentioned.
Thanks
Maurice
From: Dong, Guo <guo.dong(a)intel.com<mailto:guo.dong@intel.com>>
Sent: Monday, March 9, 2020 7:43
To: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>; sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>
Subject: [Sbl-devel] Re: Help. SBL versioning
Hi,
Please try if you could get the version information from SMBIOS table?
SBL should put these information into SMBIOS table.
Please refer InitializeSmbiosInfo () in
https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Cof...
Thanks,
Guo
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com<mailto:gustavo_plaza_@hotmail.com>>
Sent: Sunday, March 8, 2020 6:41 PM
To: sbl-devel(a)lists.01.org<mailto:sbl-devel@lists.01.org>
Subject: [Sbl-devel] Help. SBL versioning
Hello,
First of all sorry if the question makes no sense but I am new using SBL.
At this moment I have a SBL in my board that boot the Os using the payload "Os Loader".
The OS is Linux distro generated using Yocto. I don't know how to get the SBL version from user space in Linux.
I have read the versioning documentation page (https://slimbootloader.github.io/developer-guides/versioning.html) but I don't know how to access to the HOB data list with GUID gBootLoaderVersionGuid.
Could someone tell me how to access the version of SBL from Linux?
Best regards.
2 years, 3 months
Re: Help. SBL versioning
by Dong, Guo
Hi,
Please try if you could get the version information from SMBIOS table?
SBL should put these information into SMBIOS table.
Please refer InitializeSmbiosInfo () in
https://github.com/slimbootloader/slimbootloader/blob/master/Platform/Cof...
Thanks,
Guo
From: Gustavo Plaza Roma <gustavo_plaza_(a)hotmail.com>
Sent: Sunday, March 8, 2020 6:41 PM
To: sbl-devel(a)lists.01.org
Subject: [Sbl-devel] Help. SBL versioning
Hello,
First of all sorry if the question makes no sense but I am new using SBL.
At this moment I have a SBL in my board that boot the Os using the payload "Os Loader".
The OS is Linux distro generated using Yocto. I don't know how to get the SBL version from user space in Linux.
I have read the versioning documentation page (https://slimbootloader.github.io/developer-guides/versioning.html) but I don't know how to access to the HOB data list with GUID gBootLoaderVersionGuid.
Could someone tell me how to access the version of SBL from Linux?
Best regards.
2 years, 3 months
Help. SBL versioning
by Gustavo Plaza Roma
Hello,
First of all sorry if the question makes no sense but I am new using SBL.
At this moment I have a SBL in my board that boot the Os using the payload "Os Loader".
The OS is Linux distro generated using Yocto. I don't know how to get the SBL version from user space in Linux.
I have read the versioning documentation page (https://slimbootloader.github.io/developer-guides/versioning.html) but I don't know how to access to the HOB data list with GUID gBootLoaderVersionGuid.
Could someone tell me how to access the version of SBL from Linux?
Best regards.
2 years, 3 months