QTI针对UEFI规范使用TianocoreEDK2实现。 它是一种开放源代码实施,可从www.tianocore.org/edk2/获得。 TianoCore EDK II提供了现代,适用于UEFI和PI规范的功能丰富的跨平台固件开发环境。 它具有BSD许可证。
0、高通UEFI由两部分组成 XBL 和 ABL
XBL core contains chipset-specific core protocols (drivers) and core applications (such as
charging)
ABL contains chipset-independent applications such as fastboot
XBL core is part of the non-HLOS boot_images code. ABL is part of the open source Linux
Android source tree on Code Aurora Forum. ABL source is BSD-licensed.
1、高通uefi各个阶段入口函数
SEC: _ModuleEntryPoint in Xblcore\moduleEntryPoint.asm
SEC's C entry point: CEntryPoint
SEC loading DXE: LoadDxeCoreFromFv()
DXE: DxeMain()
BDS: BdsEntry() in Qcommpkg\drivers\bdsdxe\bdsentry.c
2、默认的LA启动应用
DefaultChargerApp = "QcomChargerApp"
DefaultBDSBootApp = "LinuxLoader"
路径:boot_images/QcomPkg/SDM845Pkg/LA/uefiplat.cfg
3、启动应用程序时可以使用哪种API?
1. in XBL source code tree, we can use LaunchAppFromGuidedFv()
2. in linux os loader application, we can use LaunchApp()
4、UEFI/PI specification defined 7 Phases, but how about Linux Android release for 8998?
A: yes, UEFI/PI specification defines 7 phases like: SEC/PEI/DXE/BDS/TSL/RT/AL,
But 8998 LA build is only using SEC, DXE, BDS.
二、uefi 显示库调用顺序
1、bsddxeimage->displaydxe->MDPlib->MDPPlatformlib
2、platform panneldetection->panel intialization->start timing engine or auto refresh->exit bootservices(disable display ->save variables)
3.DisplayDxeInitialize->MDPSetProperty->Display_Utils_Initialize->CheckTargetPanelSupport->MDPPlatformConfigure(MDPPlatformLib.c)
三、QcomChargerApp 里面会加载displaydxe驱动,显示应该从这里开始的
EFI_STATUS QcomChargerApp_PostProcessing( VOID )
{
EFI_STATUS Status = EFI_SUCCESS;
EFI_QCOM_DISPLAY_UTILS_PROTOCOL *pDisplayUtilsProtocol = NULL;
EFI_DISPLAY_UTILS_RENDERLOGO_CONFIG RenderLogoCfg = { 0 };
if(!pQcomChargerProtocol)
{
Status = gBS->LocateProtocol( &gQcomChargerProtocolGuid, NULL, (VOID **)&pQcomChargerProtocol );
}
QcomChargerAppEvent_ExitLPM();
Status = QcomChargerAppEvent_ReportStatusCode(gEfiPciIoProtocolGuid, LPM_EXIT);
/* Close timer events */
QcomChargerAppEvent_DisplayTimerEvent(FALSE, FALSE);
/* Ensure charging is enabled when booting from UEFI to HLOS */
Status |= pQcomChargerProtocol->EnableCharging(TRUE);
if(NULL == pDisplayUtilsProtocol)
{
Status |= gBS->LocateProtocol( &gQcomDisplayUtilsProtocolGuid, NULL, (VOID **)&pDisplayUtilsProtocol);
}
if((EFI_SUCCESS == Status) && (pDisplayUtilsProtocol != NULL))
{
RenderLogoCfg.uDisplayId = 0;
RenderLogoCfg.uFlags = DISPLAY_UTILS_RENDERLOGO_CLEARSCREEN;
RenderLogoCfg.xPosition = 0;
RenderLogoCfg.yPosition = 0;
Status |= pDisplayUtilsProtocol->DisplayUtilsRenderLogo(&RenderLogoCfg);
}
return Status;
}