09.07.2015 Views

Hardware Prototyping Using a Windows-Hosted UEFI Environment

Hardware Prototyping Using a Windows-Hosted UEFI Environment

Hardware Prototyping Using a Windows-Hosted UEFI Environment

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SMBusWhat Is SMBus?CPU• SMBus is a low-power 2-wire multi-master busbuilt on top of I 2 C.– Well-defined transport.– Addressable.– UDID gives vendor/deviceid similar to PCI.• Used as the backbone ofnumerous platformmanagement standards:– ASF, DASH, IPMISMBus Host ControllerTemperatureSensorFan MotorVoltageSensorPCIe SlotManagement Controller<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 5


How Does <strong>UEFI</strong> Support SMBus?• The <strong>UEFI</strong> PI Specification’s SMBus HostController protocol abstracts differencesin hardware interface.typedef struct _EFI_SMBUS_HC_PROTOCOL {EFI_SMBUS_HC_EXECUTE_OPERATION Execute;EFI_SMBUS_HC_PROTOCOL_ARP_DEVICE ArpDevice;EFI_SMBUS_HC_PROTOCOL_GET_ARP_MAP GetArpMap;EFI_SMBUS_HC_PROTOCOL_NOTIFY Notify;} EFI_SMBUS_HC_PROTOCOL;<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 6


What Was Missing?• The <strong>UEFI</strong> Driver Model!<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 7


What Was Missing?• The <strong>UEFI</strong> Driver Model!<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 8


What Was Missing?• The <strong>UEFI</strong> Driver Model!<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 9


What Was Missing?• The <strong>UEFI</strong> Driver Model!<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 10


What Was Missing?• The <strong>UEFI</strong> Driver Model!<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 11


How To Integrate SMBus HostController Into <strong>UEFI</strong> Driver Model?• Added Driver Binding Protocol.• Added Device Path Protocol.• Added Means To Connect Non-BootDevices.– By default, Boot Manager only connectedconsole input, output and boot devices.<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 12


Adding ASF, DASHand IPMIOS/APPSSetup• With SMBus inASF ASDSensorDevice PathDriver BindingHII Forms<strong>UEFI</strong> driver model,standards like ASF,DASH and IPMI fitSYSTEMHIIDatabaseASF I/OSMBus I/OASF ASDDriverASF BusASF & SMBusSensorDriversin naturally.SMBus BusSILICONSMBus Host ControllerSMBus Host ControllerHARDWAREASDSMBusBMC ASF Sensors<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 13


Emulate HostController• By emulating onedriver, we could testand debug our ASF,DASH and IPMI stackw/o hardware.• Easy to test setuppages, sensors, bootoptions, SMBIOSpush and errorconditions.<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 14


SMBus Host Controller DriverArchitecture<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 15


Common Unit Test DebugScenarios• Device Enumeration for Devices That:– Are not enumerable (ARP)– Don’t identify themselves well.• Error Check For Devices That:– Return ill-formed packets.– Don’t support specific commands.• Return Different SMBIOS Tables, BootOptions and Other Items.<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 16


Debug <strong>Using</strong> Messages orBreakpoints!• View howcommands aretranslatedfrom DASH toSMBus.<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 18


Debug <strong>Using</strong> Messages orBreakpoints!• View howcommands aretranslatedfrom DASH toSMBus.<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 19


Conclusion• Device Emulation Speeds Development.• Better debug & log capabilities.• Better unit test case.– Once a unique device found, model it insoftware for regression tests.<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 20


Q & A<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 21


Thanks for attending the<strong>UEFI</strong> Summer Plugfest 2011For more information onthe Unified EFI Forum and<strong>UEFI</strong> Specifications, visithttp://www.uefi.orgpresented by<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 22


But wait, there’s more …Wed(July 6)• <strong>UEFI</strong> State of the Union (10:30am, Intel)• Implementing a Secure Boot Path with <strong>UEFI</strong> 2.3.1 (1:00pm, Insyde)• <strong>UEFI</strong> SCT Overview (2:30pm, HP/Intel)Thu(July 7)• Replacing VGA: GOP Implementation in <strong>UEFI</strong> (10:30am, AMD)• <strong>UEFI</strong> prototyping using a <strong>Windows</strong>-hosted <strong>UEFI</strong> environment (1:00pm,Phoenix)• EFI Shell Lab (2:00-4:00pm, “Thunder”, Intel)• GOP Enabling & Testing Lab (4:30—5:30pm, “Thunder”, Intel)Fri(July 8)• Best Practices for <strong>UEFI</strong> Option ROM Developers (10:30am, AMI)Download presentations after the plugfest at www.uefi.org<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 23


Backup<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 24


SMBus I/O Protocolextern EFI_GUID gSctSmbusIoProtocolGuid;typedef struct _SCT_SMBUS_IO_PROTOCOL {UINT32Size;EFI_SMBUS_ADDRESSAddr;SCT_SMBUS_IO_IDENTIFY Identify;SCT_SMBUS_IO_EXECUTE Execute;} SCT_SMBUS_IO_PROTOCOL, *PSCT_SMBUS_IO_PROTOCOL;<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 25


ASF I/O Protocolextern EFI_GUID gSctAsfIoProtocolGuid;typedef struct _SCT_ASF_IO_PROTOCOL {UINT32Size;SCT_ASF_IO_SEND_MSG SendMessage;} SCT_ASF_IO_PROTOCOL, *PSCT_ASF_IO_PROTOCOL;<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 26


DASH MCTP I/O Protocolextern EFI_GUID gSctMctpIoProtocolGuid;typedef struct _SCT_MCTP_IO_PROTOCOL {UINT32Size;MCTP_EIDMCTP_MEDIUMEid;Medium;SCT_MCTP_SEND_MSG SendMessage;} SCT_MCTP_IO_PROTOCOL, *PSCT_MCTP_IO_PROTOCOL;<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 27


IPMI I/O Protocolextern EFI_GUID gSctIpmiProtocolGuid;typedef struct _SCT_IPMI_IO_PROTOCOL {UINT32Size;SCT_IPMI_SEND_REQUEST SendRequest;} SCT_IPMI_IO_PROTOCOL, *PSCT_IPMI_IO_PROTOCOL;<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 28


References• System Management Bus (SMBus)Specification, Version 2.0, August 3, 2000• <strong>UEFI</strong> Specification, Version 2.3.1, April 6,2011• Platform Initialization (PI) Specification,Volume 5, Version 1.2, May 13, 2009<strong>UEFI</strong> Plugfest – July 2011 www.uefi.org 29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!