/* As 'xxx' in hexadecimal represents a number on 12 bits, we have Value < (1 << 12). */
STATIC EFI_STATUS EFIAPI WriteAslName(IN CHAR8 LeadChar, IN UINT32 Value, IN OUT CHAR8 *AslName)
/* As 'xxx' in hexadecimal represents a number on 12 bits, we have Value < (1 << 12). */
STATIC EFI_STATUS EFIAPI WriteAslName(IN CHAR8 LeadChar, IN UINT32 Value, IN OUT CHAR8 *AslName)
{
  UINT8  Index;
  if ((Value >= MAX_NODE_COUNT)  ||
      (AslName == NULL))
  {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  AslName[0]                 = LeadChar;
  AslName[AML_NAME_SEG_SIZE] = '\0';
  for (Index = 0; Index < AML_NAME_SEG_SIZE - 1; Index++) {
    AslName[AML_NAME_SEG_SIZE - Index - 1] =
      AsciiFromHex (((Value >> (4 * Index)) & 0xF));
  }
  return EFI_SUCCESS;
}