-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
smbios: let the user configure the smbios asset tag from a uefi variable #54
Comments
Oh I'm now reading the code at https://github.com/ipxe/ipxe/blob/e7f67d5a4c6e9f06aa7a9db1b4245f5e16f00bb2/src/interface/smbios/smbios_settings.c#L238-L247 and its actually using the smbios_enclosure_information table instead! will try that! Indeed! It now shows:
|
I've now simplified to code to just use the But I'm now trying to set the variable value from the EFI shell, but it prevents me from doing that:
Do you known why @andreiw, @pbatard? Does the variable needs to be created first by the code? |
the EFI_GLOBAL_VARIABLE vendor guid is reserved for UEFI Spec defined variables. You cannot create variables using this GUID that are non-standard (not defined in the spec) |
@samerhaj that was it! thank you! I can now set the asset tag with (the guid has to be uppercase or it does not actually get set for some reason):
Can you please review https://github.com/rgl/edk2-platforms/tree/rgl-add-smbios-asset-tag-variable? :-) |
It may be better to do this in HII/UI setup menu. Those settings which are saved in UEFI variables, and Smbios code can extract it from there. Look at SetupVariables in ConfigDxe for existing HII settings. These settings are saved as UEFI variables, which can be scripted in the Shell. See for example: "RamLimitTo3GB". The variable "RamLimitTo3GB" comes form the HII setting in ConfigDxeHii.vfr (the strings are defined in ConfigDxeHii.uni)
During startup, PCDs are initialized from Variable in ConfigDxe
Then the PCD is used in actual code that consumes it, such as |
The initial rough cut is at https://github.com/rgl/edk2-platforms/tree/rgl-add-smbios-asset-tag. I'm surely doing something wrong because after I set the asset tag to
Do you have idea why? I'm not really sure how to declare the PCD in Platform/RaspberryPi/RaspberryPi.dec, maybe thats what is fubar. |
Implement AssetTag per pftf/RPi4#54 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>
I pushed a working change to: https://github.com/pftf/edk2-platforms/tree/assettag_dev1 Default value is shown in the UI, NV Variable, and SMBIOS:
Changing the value is the UI is also reflected in the UEFI NV variable and SMBIOS:
|
Implement AssetTag per pftf/RPi4#54 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>
Pushed change without using the PCD. This looks better. Default value is an empty string. Max size is 32 characters. Default:
Setting to max string size:
|
Why are some variables |
I confirm that its working fine here too! :-) For reference, I've tested setting from command line with a maximum length string with:
And successfully read it back:
With EDK Setup too:
And with iPXE too:
|
Add suppot for configuring the Chassis AssetTag in the UI as well as UEFI Shell, and carry the confiugured value as the Asset Tag string in SMBIOS Types 2 and 3. To configure using the UEFI Shell, use 'setvar' comnmand to read/write the UEFI variable with GUID = gConfigDxeFormSetGuid and Name="AssetTag". For example: Shell> setvar AssetTag -guid CD7CC258-31DB-22E6-9F22-63B0B8EED6B5 -bs -rt -nv =L"ABC123" =0x0000 This resolves this Github issue: pftf/RPi4#54 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>
Add support for configuring the Chassis Asset Tag in the UI as well as UEFI Shell, and carry the configured value as the Asset Tag string in SMBIOS Types 2 and 3. To configure using the UEFI Shell, use 'setvar' command to read/write the UEFI variable with GUID = gConfigDxeFormSetGuid and Name="AssetTag". For example: Shell> setvar AssetTag -guid CD7CC258-31DB-22E6-9F22-63B0B8EED6B5 -bs -rt -nv =L"ABC123" =0x0000 This resolves this Github issue: pftf/RPi4#54 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com> Reviewed-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Add support for configuring the Chassis Asset Tag in the UI as well as UEFI Shell, and carry the configured value as the Asset Tag string in SMBIOS Types 2 and 3. To configure using the UEFI Shell, use 'setvar' command to read/write the UEFI variable with GUID = gConfigDxeFormSetGuid and Name="AssetTag". For example: Shell> setvar AssetTag -guid CD7CC258-31DB-22E6-9F22-63B0B8EED6B5 -bs -rt -nv =L"ABC123" =0x0000 This resolves this Github issue: pftf/RPi4#54 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com> Reviewed-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Fix is pushed upstream |
I want to be able to configure the SMBIOS
TYPE 2TYPE 3 Enclosure table Asset Tag from an uefi variable.I have a WIP branch at https://github.com/rgl/edk2-platforms/tree/rgl-add-smbios-asset-tag-variable.
Can you please help getting it in good shape? :-)
I'm testing this with ipxe as described at https://github.com/rgl/raspberrypi-uefi-edk2-vagrant#ipxe.
But for some reason when iPXE boots with the following script, itsI've managed to get it work after all.asset
variable is neverXXX
. Do you have any idea why?The complete ipxe script is at https://github.com/rgl/raspberrypi-uefi-edk2-vagrant/blob/master/rpi.ipxe#L11
The text was updated successfully, but these errors were encountered: