\r
Private = SMBIOS_INSTANCE_FROM_THIS (This);\r
Head = &Private->AllocatedHandleListHead;\r
- for (AvailableHandle = 1; AvailableHandle < MaxSmbiosHandle; AvailableHandle++) {\r
+ for (AvailableHandle = 0; AvailableHandle < MaxSmbiosHandle; AvailableHandle++) {\r
if (!CheckSmbiosHandleExistance(Head, AvailableHandle)) {\r
*Handle = AvailableHandle;\r
return EFI_SUCCESS;\r
@param This The EFI_SMBIOS_PROTOCOL instance.\r
@param ProducerHandle The handle of the controller or driver associated with the SMBIOS information. NULL\r
means no handle.\r
- @param SmbiosHandle On entry, if non-zero, the handle of the SMBIOS record. If zero, then a unique handle\r
- will be assigned to the SMBIOS record. If the SMBIOS handle is already in use\r
+ @param SmbiosHandle On entry, the handle of the SMBIOS record to add. If FFFEh, then a unique handle\r
+ will be assigned to the SMBIOS record. If the SMBIOS handle is already in use,\r
EFI_ALREADY_STARTED is returned and the SMBIOS record is not updated.\r
@param Record The data for the fixed portion of the SMBIOS record. The format of the record is\r
determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined \r
// Check whether SmbiosHandle is already in use\r
//\r
Head = &Private->AllocatedHandleListHead;\r
- if (*SmbiosHandle != 0 && CheckSmbiosHandleExistance(Head, *SmbiosHandle)) {\r
+ if (*SmbiosHandle != SMBIOS_HANDLE_PI_RESERVED && CheckSmbiosHandleExistance(Head, *SmbiosHandle)) {\r
return EFI_ALREADY_STARTED;\r
}\r
\r
//\r
- // when SmbiosHandle is zero, an available handle will be assigned\r
+ // when SmbiosHandle is 0xFFFE, an available handle will be assigned\r
//\r
- if (*SmbiosHandle == 0) {\r
+ if (*SmbiosHandle == SMBIOS_HANDLE_PI_RESERVED) {\r
Status = GetAvailableSmbiosHandle(This, SmbiosHandle);\r
if (EFI_ERROR(Status)) {\r
return Status;\r
\r
@retval EFI_SUCCESS SmbiosHandle had its StringNumber String updated.\r
@retval EFI_INVALID_PARAMETER SmbiosHandle does not exist.\r
- @retval EFI_UNSUPPORTED String was not added since it's longer than 64 significant characters.\r
+ @retval EFI_UNSUPPORTED String was not added because it is longer than the SMBIOS Table supports.\r
@retval EFI_NOT_FOUND The StringNumber.is not valid for this SMBIOS record.\r
\r
**/\r
\r
@param This The EFI_SMBIOS_PROTOCOL instance.\r
@param SmbiosHandle On entry, points to the previous handle of the SMBIOS record. On exit, points to the\r
- next SMBIOS record handle. If it is zero on entry, then the first SMBIOS record\r
- handle will be returned. If it returns zero on exit, then there are no more SMBIOS records.\r
+ next SMBIOS record handle. If it is FFFEh on entry, then the first SMBIOS record\r
+ handle will be returned. If it returns FFFEh on exit, then there are no more SMBIOS records.\r
@param Type On entry it means return the next SMBIOS record of type Type. If a NULL is passed in \r
this functionally it ignored. Type is not modified by the GetNext() function.\r
@param Record On exit, points to the SMBIOS Record consisting of the formatted area followed by\r
SmbiosTableHeader = (EFI_SMBIOS_TABLE_HEADER*)(SmbiosEntry->RecordHeader + 1); \r
\r
//\r
- // If SmbiosHandle is zero, the first matched SMBIOS record handle will be returned\r
+ // If SmbiosHandle is 0xFFFE, the first matched SMBIOS record handle will be returned\r
//\r
- if (*SmbiosHandle == 0) {\r
+ if (*SmbiosHandle == SMBIOS_HANDLE_PI_RESERVED) {\r
if ((Type != NULL) && (*Type != SmbiosTableHeader->Type)) {\r
continue; \r
}\r
}\r
}\r
\r
- *SmbiosHandle = 0;\r
+ *SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;\r
return EFI_NOT_FOUND;\r
\r
}\r