Hi everyone.

I'm doing some tests here with the SMBios protocol, and everything works
correctly at SecMain.exe
But not on a real system.
Follow the function I'm developing

EFI_STATUS GetSmBiosTable(IN INT8 TableType, OUT VOID** SmBiosTable)
{
EFI_STATUS Status = EFI_SUCCESS;
EFI_GUID SMBIOSProtocolGuid = EFI_SMBIOS_PROTOCOL_GUID;
EFI_SMBIOS_PROTOCOL* SmbiosProtocol = NULL;

EFI_SMBIOS_HANDLE SmbiosHandle =  (EFI_SMBIOS_HANDLE) 0xFFFE;
EFI_SMBIOS_TABLE_HEADER* SmbiosTableHeader = NULL;
EFI_SMBIOS_TYPE SearchTableType;
BOOLEAN TableDetected = FALSE;
SMBIOS_TABLE_TYPE13* table13 = NULL;

gST->ConOut->OutputString(gST->ConOut, L"GetSmBiosTable begin\r\n");

SearchTableType =  TableType;

Status = gBS->LocateProtocol(&SMBIOSProtocolGuid,
NULL,
(VOID**) &SmbiosProtocol);
if(!EFI_ERROR(Status)){
do{
if(SmbiosProtocol != NULL){

Status = SmbiosProtocol->GetNext(SmbiosProtocol,
&SmbiosHandle,
NULL,
&SmbiosTableHeader,
NULL);
if(EFI_ERROR(Status)){
break;
}

if(SmbiosTableHeader->Type == (EFI_SMBIOS_TYPE)TableType){
 TableDetected = TRUE;
table13 = (SMBIOS_TABLE_TYPE13 *) &SmbiosTableHeader->Type;
}

}
} while(!TableDetected);
}
return EFI_SUCCESS;
}

On the real system, I always get to the break;
Does any of you see any problem on the call to  SmbiosProtocol->GetNext ?

PS.: I removed all the prints from this code and some validations.

Thanks and Regards
Rafael R. Machado
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to