> On Apr 20, 2015, at 7:18 AM, S.Vieira <jwvsan...@outlook.com> wrote: > > Hi Fish > > The only msg of error ... As i said it: > > "ASSERT UDK2014.SP1/MdPkg/Library/BaseTimerLibNull.c(35) : ((BOOLEAN)(0==1))” >
That means someone is calling the MicroSecondDelay() function from the TimerLib. That driver has linked against the Null lib that ASSERTs. The easiest way to debug this is to attach a debugger and get a backtrace…. If you don’t have a debugger, or code that can do a stack walk. You can see if this coming from your driver build looking at the build log file. You can add the `--report-file=REPORTFILE or -y REPORTFILE` argument to the build command and this will show you all the libraries you application is linked against. You can include libraries that include other libraries, and the DSC file choses which library instances get used. So the only way to know for sure how your application linked is to to look at the log file output. Thus add this argument to the build command: -y build.log Then look at the log. I don’t see anything in the application that fragment that looks like it would call a delay routine. It is likely the gAtaPassThru that is callling the Delay and it should not be calling MicroSecondDelay() it should be calling gBS->Stall(). You can binary search by placing prints before and after calls outside you application and see what call causes the ASSERT(). Note this is EFI there is no dynamic linking when you call a protocol you transfer control to another driver that you are not linked against and you only return to your code when that driver returns. Thanks, Andrew Fish > I going to try do a better explanation: > > #the file: myApp.efi > > #1 When run myApp.efi in shell, is showed the msg above. > > #2 my code was using gBS->Stall() , so i thought which Stall() occasioned > this. So i remove this command of the code and was compiled again. > I run again, and the message continue. > > #3 I don't know the "Why?" this error. > > > The code: > > #include "../header/protocolContainer.h" > #include "AtaSmart.c" > > > VOID PrintBuffer(UINT8 *Buffer) > { > int i; > UINT16 *tmp = (UINT16*) Buffer; > for (i = 0; i<0xFF; i++){ > if((i%10)==0){ > if (i != 0); > Print(L"\n"); > Print(L"%.3d: ", i); > } > > Print(L"%.4X ", tmp[i]); > } > > } > > VOID HddName(UINT8 *valor,UINT16 Port,UINT16 PortMultiplier){ > > int tmp =0; > > > Print(L"\nDevice name: "); > > for(tmp=55;tmp<78;tmp+=2) > { > Print(L"%c%c",valor[tmp],valor[tmp-1]); > } > Print(L"\nDevice Port: %x\n",Port); > Print(L"Device MultiplierPort: %x\n",PortMultiplier); > > } > > > > EFI_STATUS > EFIAPI > UefiMain ( > IN EFI_HANDLE ImageHandle, > IN EFI_SYSTEM_TABLE *SystemTable > ) > { > > UINTN amountNode; > UINTN indice; > EFI_STATUS Status,StatusPort; > EFI_HANDLE *myDevice; > EFI_ATA_PASS_THRU_PROTOCOL *deviceCurrent; > EFI_GUID gAtaPassThru = > EFI_ATA_PASS_THRU_PROTOCOL_GUID; > > > //Initialize variable > > UINT16 Port = 0xFFFF; > UINT16 PortMultiplierport = 0xFFFF; > Status = EFI_SUCCESS; > StatusPort = EFI_SUCCESS; > indice = 0; > amountNode = 0; > > Status = gBS->LocateHandleBuffer( ByProtocol, > > &gAtaPassThru, > > NULL, > > &amountNode, > > &myDevice > ); > if(!EFI_ERROR(Status)) > { > > Print(L"\namount found: %d \n",amountNode); > for(indice = 0; indice < amountNode ; indice++) > { > > Status = gBS->OpenProtocol( > > > myDevice[indice], > > &gAtaPassThru, > > (void **) &deviceCurrent, > > ImageHandle, > NULL, > > EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL > > ); > Print(L"\nHandle: %d \n",indice+1); > StatusPort = > deviceCurrent->GetNextPort(deviceCurrent,&Port); > > while(StatusPort != EFI_NOT_FOUND && StatusPort != > EFI_INVALID_PARAMETER) > { > Status = > AtaIdentifyHdd(deviceCurrent,Port,PortMultiplierport); > StatusPort = > deviceCurrent->GetNextPort(deviceCurrent,&Port); > > } > > > } > > > > } > > return EFI_SUCCESS; > > } > > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel