On Aug 23, 2012, at 7:58 AM, Georg Schönberger wrote:

> ----- Original Message -----
>> On Aug 22, 2012, at 11:01 PM, Georg Schönberger
>> <gschoenber...@thomas-krenn.com> wrote:
>> 
>>> Hello everybody,
>>> 
>>> we, as a hardware vendor, would like to change parameter values
>>> retrieved via dmidecode such as:
>>> -Manufacturer
>>> -Product Name
>>> -Serial Number
>>> - and so on...
>>> 
>>> AFAIK with traditional BIOS we are stuck to the firmware
>>> developer's/vendor's tools to achieve this.
>>> My question is now, will there be an easier way to do this with
>>> UEFI?
>>> Can we e.g. develop an UEFI Shell application to write those
>>> parameters?
>>> Or are we completely dependent on our firmware providers?
>>> 
>>> Thanks for your answers, Georg
>>> 
>> From: "Andrew Fish" <af...@apple.com>
>> To: edk2-devel@lists.sourceforge.net
>> Cc: edk2-devel@lists.sourceforge.net
>> Sent: Thursday, 23 August, 2012 4:23:23 PM
>> Subject: Re: [edk2] Changing values retrieved by dmidecode
>> 
>> The PI spec has a way to do this:
>> https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdePkg/Include/Protocol/Smbios.h
>> 
>> Sent from my iPhone
>> 
> 
> Thanks for that hint.
> 
> Am I right if I say that I have to write an UEFI driver to update the SMBIOS 
> information or can this be done from the OS also?

No. Unless noted otherwise EFI protocols are boot services only, which means 
they go away when the OS Loader (or kernel early init) turns off EFI as part of 
the boot process. 

> Or can you provide a more detailed description about the steps that are 
> necessary to modify these values?
> 

In general if you want to how a protocol gets used the best thing to do is 
search the code base for the GUID that names the protocol as this lets you 
easily find the producers and consumers of the protocol interface. In your case 
that is gEfiSmbiosProtocolGuid. 

Basically you want to look up the protocol (This will also tell you if the 
platform supports the API):
  Status = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID**)&Smbios);

If you are trying to add a new record use: 
SmbiosHandle = 0;
Status = Smbios->Add(Smbios, gImageHandle, &SmbiosHandle, YourNewRecord)

If you need to update an existing record it is Smbios->GetNext() and 
Smbios->UpdateString()

Thanks,

Andrew

> -Regards, Georg
> 
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to