• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LibAmdMemFill函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LibAmdMemFill函数的典型用法代码示例。如果您正苦于以下问题:C++ LibAmdMemFill函数的具体用法?C++ LibAmdMemFill怎么用?C++ LibAmdMemFill使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LibAmdMemFill函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: OemCustomizeInitEarly

/*---------------------------------------------------------------------------------------*/
VOID
OemCustomizeInitEarly (
	IN  OUT AMD_EARLY_PARAMS    *InitEarly
	)
{
	AGESA_STATUS         Status;
	VOID                 *TrinityPcieComplexListPtr;
	VOID                 *TrinityPciePortPtr;
	VOID                 *TrinityPcieDdiPtr;

	ALLOCATE_HEAP_PARAMS AllocHeapParams;

	// GNB PCIe topology Porting

	//
	// Allocate buffer for PCIe_COMPLEX_DESCRIPTOR , PCIe_PORT_DESCRIPTOR and PCIe_DDI_DESCRIPTOR
	//
	AllocHeapParams.RequestedBufferSize = sizeof(Trinity) + sizeof(PortList) + sizeof(DdiList);

	AllocHeapParams.BufferHandle = AMD_MEM_MISC_HANDLES_START;
	AllocHeapParams.Persist = HEAP_LOCAL_CACHE;
	Status = HeapAllocateBuffer (&AllocHeapParams, &InitEarly->StdHeader);
	if ( Status!= AGESA_SUCCESS) {
		// Could not allocate buffer for PCIe_COMPLEX_DESCRIPTOR , PCIe_PORT_DESCRIPTOR and PCIe_DDI_DESCRIPTOR
		ASSERT(FALSE);
		return;
	}

	TrinityPcieComplexListPtr  =  (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;

	AllocHeapParams.BufferPtr += sizeof(Trinity);
	TrinityPciePortPtr         =  (PCIe_PORT_DESCRIPTOR *)AllocHeapParams.BufferPtr;

	AllocHeapParams.BufferPtr += sizeof(PortList);
	TrinityPcieDdiPtr          =  (PCIe_DDI_DESCRIPTOR *) AllocHeapParams.BufferPtr;

	LibAmdMemFill (TrinityPcieComplexListPtr,
		       0,
		       sizeof(Trinity),
		       &InitEarly->StdHeader);

	LibAmdMemFill (TrinityPciePortPtr,
		       0,
		       sizeof(PortList),
		       &InitEarly->StdHeader);

	LibAmdMemFill (TrinityPcieDdiPtr,
		       0,
		       sizeof(DdiList),
		       &InitEarly->StdHeader);

	LibAmdMemCopy  (TrinityPcieComplexListPtr, &Trinity, sizeof(Trinity), &InitEarly->StdHeader);
	LibAmdMemCopy  (TrinityPciePortPtr, &PortList[0], sizeof(PortList), &InitEarly->StdHeader);
	LibAmdMemCopy  (TrinityPcieDdiPtr, &DdiList[0], sizeof(DdiList), &InitEarly->StdHeader);

	((PCIe_COMPLEX_DESCRIPTOR*)TrinityPcieComplexListPtr)->PciePortList =  (PCIe_PORT_DESCRIPTOR*)TrinityPciePortPtr;
	((PCIe_COMPLEX_DESCRIPTOR*)TrinityPcieComplexListPtr)->DdiLinkList  =  (PCIe_DDI_DESCRIPTOR*)TrinityPcieDdiPtr;

	InitEarly->GnbConfig.PcieComplexList = TrinityPcieComplexListPtr;
}
开发者ID:0ida,项目名称:coreboot,代码行数:61,代码来源:PlatformGnbPcie.c


示例2: OemInitEarly

static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
  AGESA_STATUS         Status;
  VOID                 *LlanoPcieComplexListPtr;
  VOID                 *LlanoPciePortPtr;
  VOID                 *LlanoPcieDdiPtr;

  ALLOCATE_HEAP_PARAMS AllocHeapParams;

  // GNB PCIe topology Porting

  //
  // Allocate buffer for PCIe_COMPLEX_DESCRIPTOR , PCIe_PORT_DESCRIPTOR and PCIe_DDI_DESCRIPTOR
  //
  AllocHeapParams.RequestedBufferSize = sizeof(Llano) + sizeof(PortList) + sizeof(DdiList);

  AllocHeapParams.BufferHandle = AMD_MEM_MISC_HANDLES_START;
  AllocHeapParams.Persist = HEAP_LOCAL_CACHE;
  Status = HeapAllocateBuffer (&AllocHeapParams, &InitEarly->StdHeader);
	ASSERT(Status == AGESA_SUCCESS);

  LlanoPcieComplexListPtr  =  (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;

  AllocHeapParams.BufferPtr += sizeof(Llano);
  LlanoPciePortPtr         =  (PCIe_PORT_DESCRIPTOR *)AllocHeapParams.BufferPtr;

  AllocHeapParams.BufferPtr += sizeof(PortList);
  LlanoPcieDdiPtr          =  (PCIe_DDI_DESCRIPTOR *) AllocHeapParams.BufferPtr;

  LibAmdMemFill (LlanoPcieComplexListPtr,
                   0,
                   sizeof(Llano),
                   &InitEarly->StdHeader);

  LibAmdMemFill (LlanoPciePortPtr,
                   0,
                   sizeof(PortList),
                   &InitEarly->StdHeader);

  LibAmdMemFill (LlanoPcieDdiPtr,
                   0,
                   sizeof(DdiList),
                   &InitEarly->StdHeader);

  LibAmdMemCopy  (LlanoPcieComplexListPtr, &Llano, sizeof(Llano), &InitEarly->StdHeader);
  LibAmdMemCopy  (LlanoPciePortPtr, &PortList[0], sizeof(PortList), &InitEarly->StdHeader);
  LibAmdMemCopy  (LlanoPcieDdiPtr, &DdiList[0], sizeof(DdiList), &InitEarly->StdHeader);


  ((PCIe_COMPLEX_DESCRIPTOR*)LlanoPcieComplexListPtr)->PciePortList =  (PCIe_PORT_DESCRIPTOR*)LlanoPciePortPtr;
  ((PCIe_COMPLEX_DESCRIPTOR*)LlanoPcieComplexListPtr)->DdiLinkList  =  (PCIe_DDI_DESCRIPTOR*)LlanoPcieDdiPtr;

  InitEarly->GnbConfig.PcieComplexList = LlanoPcieComplexListPtr;
  InitEarly->GnbConfig.PsppPolicy      = 0;
	return AGESA_SUCCESS;
}
开发者ID:tidatida,项目名称:coreboot,代码行数:56,代码来源:PlatformGnbPcie.c


示例3: GfxInitAtPost

AGESA_STATUS
GfxInitAtPost (
    IN       AMD_CONFIG_PARAMS               *StdHeader
)
{
    AMD_POST_PARAMS       *PostParamsPtr;
    GFX_CARD_CARD_INFO    GfxDiscreteCardInfo;
    AGESA_STATUS          Status;
    GFX_PLATFORM_CONFIG   *Gfx;
    PostParamsPtr = (AMD_POST_PARAMS *)StdHeader;
    IDS_HDT_CONSOLE (GNB_TRACE, "GfxInitAtPost Enter\n");
    Status = GfxLocateConfigData (StdHeader, &Gfx);
    ASSERT (Status == AGESA_SUCCESS);
    if (Status == AGESA_SUCCESS) {
        if (GfxLibIsControllerPresent (StdHeader)) {
            if (PostParamsPtr->MemConfig.UmaMode != UMA_NONE) {
                LibAmdMemFill (&GfxDiscreteCardInfo, 0x0, sizeof (GfxDiscreteCardInfo), StdHeader);
                GfxGetDiscreteCardInfo (&GfxDiscreteCardInfo, StdHeader);
                if (GfxDiscreteCardInfo.PciGfxCardBitmap != 0 ||
                        (GfxDiscreteCardInfo.AmdPcieGfxCardBitmap & GfxDiscreteCardInfo.PcieGfxCardBitmap) !=
                        GfxDiscreteCardInfo.AmdPcieGfxCardBitmap) {
                    PostParamsPtr->MemConfig.UmaMode = UMA_NONE;
                    IDS_HDT_CONSOLE (GFX_MISC, "  GfxDisabled due dGPU policy\n");
                }
            }
        } else {
            PostParamsPtr->MemConfig.UmaMode = UMA_NONE;
            Gfx->GfxFusedOff = TRUE;
        }
    } else {
        PostParamsPtr->MemConfig.UmaMode = UMA_NONE;
    }
    IDS_HDT_CONSOLE (GNB_TRACE, "GfxInitAtPost Exit [0x%x]\n", Status);
    return  Status;
}
开发者ID:michaelforney,项目名称:coreboot,代码行数:35,代码来源:GfxInitAtPost.c


示例4: NotifyFatalCohMpCapMismatch

/**
 * For event HT_EVENT_COH_MPCAP_MISMATCH
 *
 * @param[in] Node      The node from which a new node was discovered
 * @param[in] Link      The link from that node
 * @param[in] Cap       The aggregate system MP Capability
 * @param[in] Nodes     The total number of nodes found so far
 * @param[in] State     our State
 *
 */
VOID
NotifyFatalCohMpCapMismatch (
  IN       UINT8      Node,
  IN       UINT8      Link,
  IN       UINT8      Cap,
  IN       UINT8      Nodes,
  IN       STATE_DATA *State
  )
{
  HT_EVENT_DATA_COH_MP_CAP_MISMATCH Evt;
  // Zero out the event data
  LibAmdMemFill (
    &Evt,
    0,
    (sizeof(UINT32) * NUMBER_OF_EVENT_DATA_PARAMS),
    State->ConfigHandle
    );

  Evt.Node = Node;
  Evt.Link = Link;
  Evt.SysMpCap = Cap;
  Evt.TotalNodes = Nodes;
  setEventNotify (AGESA_CRITICAL,
                 HT_EVENT_COH_MPCAP_MISMATCH,
                 (UINT8 *)&Evt, State);
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:36,代码来源:htNotify.c


示例5: NotifyInfoCohNodeDiscovered

/**
 * For event HT_EVENT_COH_NODE_DISCOVERED
 *
 * @param[in] Node       Node from which a new node was discovered
 * @param[in] Link       The link to that new node
 * @param[in] NewNode    The new node's id
 * @param[in] TempRoute  Temporarily, during discovery, the new node is accessed at this id.
 * @param[in] State      our State
 *
 */
VOID
NotifyInfoCohNodeDiscovered (
  IN       UINT8 Node,
  IN       UINT8 Link,
  IN       UINT8 NewNode,
  IN       UINT8 TempRoute,
  IN       STATE_DATA *State
  )
{
  HT_EVENT_DATA_COH_NODE_DISCOVERED Evt;
  // Zero out the event data
  LibAmdMemFill (
    &Evt,
    0,
    (sizeof(UINT32) * NUMBER_OF_EVENT_DATA_PARAMS),
    State->ConfigHandle
    );

  Evt.Node = Node;
  Evt.Link = Link;
  Evt.NewNode = NewNode;
  Evt.TempRoute = TempRoute;
  setEventNotify (AGESA_SUCCESS,
                 HT_EVENT_COH_NODE_DISCOVERED,
                 (UINT8 *)&Evt, State);
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:36,代码来源:htNotify.c


示例6: NotifyWarningOptLinkPairExceed

/**
 * For event HT_EVENT_OPT_LINK_PAIR_EXCEED
 *
 * @param[in]  NodeA      One of the nodes connected
 * @param[in]  NodeB      The other connected node
 * @param[in]  MasterLink its unusable Masterlink
 * @param[in]  AltLink    its unusable Alternate link
 * @param[in]  State      our State
 *
 */
VOID
NotifyWarningOptLinkPairExceed (
  IN       UINT32    NodeA,
  IN       UINT32    NodeB,
  IN       UINT32    MasterLink,
  IN       UINT32    AltLink,
  IN       STATE_DATA *State
  )
{
  HT_EVENT_DATA_OPT_LINK_PAIR_EXCEED Evt;
  // Zero out the event data
  LibAmdMemFill (
    &Evt,
    0,
    (sizeof(UINT32) * NUMBER_OF_EVENT_DATA_PARAMS),
    State->ConfigHandle
    );

  Evt.NodeA = NodeA;
  Evt.MasterLink = MasterLink;
  Evt.NodeB = NodeB;
  Evt.AltLink = AltLink;
  setEventNotify (AGESA_WARNING,
                 HT_EVENT_OPT_LINK_PAIR_EXCEED,
                 (UINT8 *)&Evt, State);
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:36,代码来源:htNotify.c


示例7: NotifyWarningOptUnusedLinks

/**
 * For event HT_EVENT_OPT_UNUSED_LINKS
 *
 * @param[in]  NodeA    One of the nodes connected
 * @param[in]  NodeB    The other connected node
 * @param[in]  LinkA    its unusable link
 * @param[in]  LinkB    its unusable link
 * @param[in]  State    our State
 *
 */
VOID
NotifyWarningOptUnusedLinks (
  IN       UINT32    NodeA,
  IN       UINT32    LinkA,
  IN       UINT32    NodeB,
  IN       UINT32    LinkB,
  IN       STATE_DATA *State
  )
{
  HT_EVENT_DATA_OPT_UNUSED_LINKS Evt;
  // Zero out the event data
  LibAmdMemFill (
    &Evt,
    0,
    (sizeof(UINT32) * NUMBER_OF_EVENT_DATA_PARAMS),
    State->ConfigHandle
    );

  Evt.NodeA = NodeA;
  Evt.LinkA = LinkA;
  Evt.NodeB = NodeB;
  Evt.LinkB = LinkB;
  setEventNotify (AGESA_WARNING,
                 HT_EVENT_OPT_UNUSED_LINKS,
                 (UINT8 *)&Evt, State);
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:36,代码来源:htNotify.c


示例8: NotifyErrorNcohDeviceFailed

/**
 * For event HT_EVENT_NCOH_DEVICE_FAILED
 *
 * @param[in] Node      The node on which the chain is located
 * @param[in] Link      The link from that node
 * @param[in] Depth     Position on chain
 * @param[in] Id        The Id which was attempted to assigned
 * @param[in] State     our State
 *
 */
VOID
NotifyErrorNcohDeviceFailed (
  IN       UINT8      Node,
  IN       UINT8      Link,
  IN       UINT8      Depth,
  IN       UINT8      Id,
  IN       STATE_DATA *State
  )
{
  HT_EVENT_DATA_NCOH_DEVICE_FAILED Evt;
  // Zero out the event data
  LibAmdMemFill (
    &Evt,
    0,
    (sizeof(UINT32) * NUMBER_OF_EVENT_DATA_PARAMS),
    State->ConfigHandle
    );

  Evt.Node = Node;
  Evt.Link = Link;
  Evt.Depth = Depth;
  Evt.AttemptedBuid = Id;
  setEventNotify (AGESA_ERROR,
                 HT_EVENT_NCOH_DEVICE_FAILED,
                 (UINT8 *)&Evt, State);
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:36,代码来源:htNotify.c


示例9: NotifyErrorNcohBuidExceed

/**
 * For event HT_EVENT_NCOH_BUID_EXCEED
 *
 * @param[in] Node      The node on which the chain is located
 * @param[in] Link      The link from that node
 * @param[in] Depth     Position on chain
 * @param[in] Id        The Id which was attempted to assigned
 * @param[in] Units     The number of units in this device
 * @param[in] State     our State
 *
 */
VOID
NotifyErrorNcohBuidExceed (
  IN       UINT8      Node,
  IN       UINT8      Link,
  IN       UINT8      Depth,
  IN       UINT8      Id,
  IN       UINT8      Units,
  IN       STATE_DATA *State
  )
{
  HT_EVENT_DATA_NCOH_BUID_EXCEED Evt;
  // Zero out the event data
  LibAmdMemFill (
    &Evt,
    0,
    (sizeof(UINT32) * NUMBER_OF_EVENT_DATA_PARAMS),
    State->ConfigHandle
    );

  Evt.Node = Node;
  Evt.Link = Link;
  Evt.Depth = Depth;
  Evt.CurrentBuid = Id;
  Evt.UnitCount = Units;
  setEventNotify (AGESA_ERROR,
                 HT_EVENT_NCOH_BUID_EXCEED,
                 (UINT8 *)&Evt, State);
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:39,代码来源:htNotify.c


示例10: OemInitEarly

static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
	AGESA_STATUS            Status;
	PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;

	ALLOCATE_HEAP_PARAMS AllocHeapParams;

	/* GNB PCIe topology Porting */

	/*  */
	/* Allocate buffer for PCIe_COMPLEX_DESCRIPTOR , PCIe_PORT_DESCRIPTOR and PCIe_DDI_DESCRIPTOR */
	/*  */
	AllocHeapParams.RequestedBufferSize = sizeof(PCIe_COMPLEX_DESCRIPTOR);

	AllocHeapParams.BufferHandle = AMD_MEM_MISC_HANDLES_START;
	AllocHeapParams.Persist = HEAP_LOCAL_CACHE;
	Status = HeapAllocateBuffer (&AllocHeapParams, &InitEarly->StdHeader);
	ASSERT(Status == AGESA_SUCCESS);

	PcieComplexListPtr  =  (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;

	LibAmdMemFill (PcieComplexListPtr,
		       0,
		       sizeof(PCIe_COMPLEX_DESCRIPTOR),
		       &InitEarly->StdHeader);

	PcieComplexListPtr->Flags        = DESCRIPTOR_TERMINATE_LIST;
	PcieComplexListPtr->SocketId     = 0;
	PcieComplexListPtr->PciePortList = PortList;
	PcieComplexListPtr->DdiLinkList  = DdiList;

	InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
	return AGESA_SUCCESS;
}
开发者ID:MikeeHawk,项目名称:coreboot,代码行数:34,代码来源:PlatformGnbPcie.c


示例11: NotifyFatalCohProcessorTypeMix

/**
 * For event HT_EVENT_COH_PROCESSOR_TYPE_MIX
 *
 * @param[in] Node      The node from which a new node was discovered
 * @param[in] Link      The link from that node
 * @param[in] Nodes     The total number of nodes found so far
 * @param[in] State     our State
 *
 */
VOID
NotifyFatalCohProcessorTypeMix (
  IN       UINT8 Node,
  IN       UINT8 Link,
  IN       UINT8 Nodes,
  IN       STATE_DATA *State
  )
{
  HT_EVENT_DATA_COH_PROCESSOR_TYPE_MIX Evt;
  // Zero out the event data
  LibAmdMemFill (
    &Evt,
    0,
    (sizeof(UINT32) * NUMBER_OF_EVENT_DATA_PARAMS),
    State->ConfigHandle
    );

  IDS_HDT_CONSOLE (HT_TRACE, "Illegal Processor Type Mix.\n");
  Evt.Node = Node;
  Evt.Link = Link;
  Evt.TotalNodes = Nodes;
  setEventNotify (AGESA_CRITICAL,
                 HT_EVENT_COH_PROCESSOR_TYPE_MIX,
                 (UINT8 *)&Evt, State);
}
开发者ID:B-Rich,项目名称:coreboot,代码行数:34,代码来源:htNotify.c


示例12: FeatureLeveling

/**
 *
 *  FeatureLeveling
 *
 *    CPU feature leveling. Set least common features set of all CPUs
 *
 *    @param[in,out]   StdHeader   - Pointer to AMD_CONFIG_PARAMS struct.
 *
 */
VOID
FeatureLeveling (
  IN OUT   AMD_CONFIG_PARAMS *StdHeader
  )
{
  UINT32 BscSocket;
  UINT32 Ignored;
  UINT32 BscCoreNum;
  UINT32 Socket;
  UINT32 Core;
  UINT32 NumberOfSockets;
  UINT32 NumberOfCores;
  BOOLEAN *FirstTime;
  BOOLEAN *NeedLeveling;
  AGESA_STATUS IgnoredSts;
  CPU_FEATURES_LIST *globalCpuFeatureList;
  AP_TASK  TaskPtr;

  ASSERT (IsBsp (StdHeader, &IgnoredSts));

  GetGlobalCpuFeatureListAddress ((UINT64 **) &globalCpuFeatureList, StdHeader);
  FirstTime = (BOOLEAN *) ((UINT8 *) globalCpuFeatureList + sizeof (CPU_FEATURES_LIST));
  NeedLeveling = (BOOLEAN *) ((UINT8 *) globalCpuFeatureList + sizeof (CPU_FEATURES_LIST) + sizeof (BOOLEAN));

  *FirstTime = TRUE;
  *NeedLeveling = FALSE;

  LibAmdMemFill (globalCpuFeatureList, 0xFF, sizeof (CPU_FEATURES_LIST), StdHeader);
  IdentifyCore (StdHeader, &BscSocket, &Ignored, &BscCoreNum, &IgnoredSts);
  NumberOfSockets = GetPlatformNumberOfSockets ();

  TaskPtr.FuncAddress.PfApTaskI = SaveFeatures;
  TaskPtr.DataTransfer.DataSizeInDwords = SIZE_IN_DWORDS (CPU_FEATURES_LIST);
  TaskPtr.ExeFlags = WAIT_FOR_CORE;
  TaskPtr.DataTransfer.DataPtr = globalCpuFeatureList;
  TaskPtr.DataTransfer.DataTransferFlags = DATA_IN_MEMORY;

  for (Socket = 0; Socket < NumberOfSockets; Socket++) {
    if (IsProcessorPresent (Socket, StdHeader)) {
      if (Socket !=  BscSocket) {
        ApUtilRunCodeOnSocketCore ((UINT8)Socket, 0, &TaskPtr, StdHeader);
      }
    }
  }
  ApUtilTaskOnExecutingCore (&TaskPtr, StdHeader, NULL);

  if (*NeedLeveling) {
    TaskPtr.FuncAddress.PfApTaskI  = WriteFeatures;
    for (Socket = 0; Socket < NumberOfSockets; Socket++) {
      if (GetActiveCoresInGivenSocket (Socket, &NumberOfCores, StdHeader)) {
        for (Core = 0; Core < NumberOfCores; Core++) {
          if ((Socket != BscSocket) || (Core != BscCoreNum)) {
            ApUtilRunCodeOnSocketCore ((UINT8)Socket, (UINT8)Core, &TaskPtr, StdHeader);
          }
        }
      }
    }
    ApUtilTaskOnExecutingCore (&TaskPtr, StdHeader, NULL);
  }
}
开发者ID:andy737,项目名称:firebrickRemote,代码行数:69,代码来源:cpuFeatureLeveling.c


示例13: PcieTopologyIsGen3SupportedV5

BOOLEAN
PcieTopologyIsGen3SupportedV5 (
  IN      PCIe_WRAPPER_CONFIG   *Wrapper
  )
{
  UINT8                 LaneNibbleArray [4];
  UINT32                LaneBitmap;
  UINT8                 Nibble;
  UINT8                 NibbleBitmap;
  PCIe_ENGINE_CONFIG    *Engine;


  LibAmdMemFill (&LaneNibbleArray[0], 0x00, sizeof (LaneNibbleArray), PcieConfigGetStdHeader (Wrapper));
  Engine = PcieConfigGetChildEngine (Wrapper);
  while (Engine != NULL) {
    LaneBitmap = PcieUtilGetEngineLaneBitMap (LANE_TYPE_PCIE_PHY_NATIVE, 0, Engine);
    for (Nibble = 0; Nibble < 4; Nibble++) {
      NibbleBitmap = (0xF << (Nibble * 4));
      if ((LaneBitmap & NibbleBitmap) != 0) {
        if (++LaneNibbleArray [Nibble] > 1) {
          return FALSE;
        }
      }
    }
    Engine = PcieLibGetNextDescriptor (Engine);
  }
  return TRUE;
}
开发者ID:fishbaoz,项目名称:edk2ml,代码行数:28,代码来源:PcieWrapperServicesV5.c


示例14: agesawrapper_amdinitearly

AGESA_STATUS agesawrapper_amdinitearly(void)
{
	AGESA_STATUS status;
	AMD_INTERFACE_PARAMS AmdParamStruct;
	AMD_EARLY_PARAMS     *AmdEarlyParamsPtr;

	LibAmdMemFill (&AmdParamStruct,
		       0,
		       sizeof (AMD_INTERFACE_PARAMS),
		       &(AmdParamStruct.StdHeader));

	AmdParamStruct.AgesaFunctionName = AMD_INIT_EARLY;
	AmdParamStruct.AllocationMethod = PreMemHeap;
	AmdParamStruct.StdHeader.AltImageBasePtr = 0;
	AmdParamStruct.StdHeader.CalloutPtr = &GetBiosCallout;
	AmdParamStruct.StdHeader.Func = 0;
	AmdParamStruct.StdHeader.ImageBasePtr = 0;
	AmdCreateStruct (&AmdParamStruct);

	AmdEarlyParamsPtr = (AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr;
	OemCustomizeInitEarly (AmdEarlyParamsPtr);

	AmdEarlyParamsPtr->GnbConfig.PsppPolicy = PsppDisabled;
	status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
	if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
	AmdReleaseStruct (&AmdParamStruct);

	return status;
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:29,代码来源:agesawrapper.c


示例15: agesawrapper_amdlaterunaptask

AGESA_STATUS agesawrapper_amdlaterunaptask (
	UINT32 Func,
	UINT32 Data,
	VOID *ConfigPtr
	)
{
	AGESA_STATUS Status;
	AP_EXE_PARAMS ApExeParams;

	LibAmdMemFill (&ApExeParams,
		       0,
		       sizeof (AP_EXE_PARAMS),
		       &(ApExeParams.StdHeader));

	ApExeParams.StdHeader.AltImageBasePtr = 0;
	ApExeParams.StdHeader.CalloutPtr = &GetBiosCallout;
	ApExeParams.StdHeader.Func = 0;
	ApExeParams.StdHeader.ImageBasePtr = 0;
	ApExeParams.FunctionNumber = Func;
	ApExeParams.RelatedDataBlock = ConfigPtr;

	Status = AmdLateRunApTask (&ApExeParams);
	if (Status != AGESA_SUCCESS) {
		/* agesawrapper_amdreadeventlog(); */
		ASSERT(Status == AGESA_SUCCESS);
	}

	return Status;
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:29,代码来源:agesawrapper.c


示例16: agesawrapper_amdreadeventlog

AGESA_STATUS agesawrapper_amdreadeventlog (UINT8 HeapStatus)
{
	AGESA_STATUS Status;
	EVENT_PARAMS AmdEventParams;

	LibAmdMemFill (&AmdEventParams,
		       0,
		       sizeof (EVENT_PARAMS),
		       &(AmdEventParams.StdHeader));

	AmdEventParams.StdHeader.AltImageBasePtr = 0;
	AmdEventParams.StdHeader.CalloutPtr = &GetBiosCallout;
	AmdEventParams.StdHeader.Func = 0;
	AmdEventParams.StdHeader.ImageBasePtr = 0;
	AmdEventParams.StdHeader.HeapStatus = HeapStatus;
	Status = AmdReadEventLog (&AmdEventParams);
	while (AmdEventParams.EventClass != 0) {
		printk(BIOS_DEBUG,"\nEventLog:  EventClass = %x, EventInfo = %x.\n", (unsigned int)AmdEventParams.EventClass,(unsigned int)AmdEventParams.EventInfo);
		printk(BIOS_DEBUG,"  Param1 = %x, Param2 = %x.\n",(unsigned int)AmdEventParams.DataParam1, (unsigned int)AmdEventParams.DataParam2);
		printk(BIOS_DEBUG,"  Param3 = %x, Param4 = %x.\n",(unsigned int)AmdEventParams.DataParam3, (unsigned int)AmdEventParams.DataParam4);
		Status = AmdReadEventLog (&AmdEventParams);
	}

	return Status;
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:25,代码来源:agesawrapper.c


示例17: agesawrapper_fchs3earlyrestore

AGESA_STATUS agesawrapper_fchs3earlyrestore(void)
{
	AGESA_STATUS status = AGESA_SUCCESS;

	FCH_DATA_BLOCK      FchParams;
	AMD_CONFIG_PARAMS StdHeader;

	StdHeader.HeapStatus = HEAP_SYSTEM_MEM;
	StdHeader.HeapBasePtr = GetHeapBase(&StdHeader) + 0x10;
	StdHeader.AltImageBasePtr = 0;
	StdHeader.CalloutPtr = &GetBiosCallout;
	StdHeader.Func = 0;
	StdHeader.ImageBasePtr = 0;

	LibAmdMemFill (&FchParams,
		       0,
		       sizeof (FchParams),
		       &StdHeader);

	FchParams.StdHeader = &StdHeader;
	s3_resume_init_data(&FchParams);

	FchInitS3EarlyRestore(&FchParams);

	return status;
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:26,代码来源:agesawrapper.c


示例18: MemS3ResumeConstructNBBlockC32

BOOLEAN
MemS3ResumeConstructNBBlockC32 (
  IN OUT   VOID *S3NBPtr,
  IN OUT   MEM_DATA_STRUCT *MemPtr,
  IN       UINT8 NodeID
  )
{
  INT32 i;
  MEM_NB_BLOCK *NBPtr;

  NBPtr = ((S3_MEM_NB_BLOCK *)S3NBPtr)->NBPtr;
  //
  // Determine if this is the expected NB Type
  //
  GetLogicalIdOfSocket (MemPtr->DiesPerSystem[NodeID].SocketId, &(MemPtr->DiesPerSystem[NodeID].LogicalCpuid), &(MemPtr->StdHeader));
  if (!MemNIsIdSupportedC32 (NBPtr, &(MemPtr->DiesPerSystem[NodeID].LogicalCpuid))) {
    return FALSE;
  }

  NBPtr->MemPtr = MemPtr;
  NBPtr->MCTPtr = &(MemPtr->DiesPerSystem[NodeID]);
  NBPtr->PciAddr.AddressValue = MemPtr->DiesPerSystem[NodeID].PciAddr.AddressValue;
  InitNBRegTableC32 (NBPtr, NBPtr->NBRegTable);
  NBPtr->Node = ((UINT8) NBPtr->PciAddr.Address.Device) - 24;
  NBPtr->Dct = 0;
  NBPtr->Channel = 0;
  NBPtr->Ganged = FALSE;
  NBPtr->NodeCount = MAX_NODES_SUPPORTED_C32;
  NBPtr->DctCount = MAX_DCTS_PER_NODE_C32;

  for (i = 0; i < EnumSize; i++) {
    NBPtr->IsSupported[i] = FALSE;
  }

  for (i = 0; i < NumberOfHooks; i++) {
    NBPtr->FamilySpecificHook[i] = (BOOLEAN (*) (MEM_NB_BLOCK *, VOID *)) memDefTrue;
  }

  LibAmdMemFill (NBPtr->DctCache, 0, sizeof (NBPtr->DctCache), &MemPtr->StdHeader);

  NBPtr->IsSupported[CheckDllSpeedUp] = TRUE;
  NBPtr->SwitchDCT = MemNSwitchDCTNb;
  NBPtr->SwitchChannel = MemNSwitchChannelNb;
  NBPtr->GetBitField = MemNGetBitFieldNb;
  NBPtr->SetBitField = MemNSetBitFieldNb;
  NBPtr->MemNCmnGetSetFieldNb = MemNCmnGetSetFieldC32;
  NBPtr->MemNIsIdSupportedNb = MemNIsIdSupportedC32;
  ((S3_MEM_NB_BLOCK *)S3NBPtr)->MemS3ExitSelfRefReg = MemNS3ExitSelfRefRegC32;
  ((S3_MEM_NB_BLOCK *)S3NBPtr)->MemS3GetConPCIMask = MemNS3GetConPCIMaskNb;
  ((S3_MEM_NB_BLOCK *)S3NBPtr)->MemS3GetConMSRMask = (VOID (*) (MEM_NB_BLOCK *, DESCRIPTOR_GROUP *)) memDefRet;
  ((S3_MEM_NB_BLOCK *)S3NBPtr)->MemS3Resume = MemNS3ResumeNb;
  ((S3_MEM_NB_BLOCK *)S3NBPtr)->MemS3RestoreScrub = MemNS3RestoreScrubNb;
  ((S3_MEM_NB_BLOCK *)S3NBPtr)->MemS3GetRegLstPtr = MemNS3GetRegLstPtrC32;
  ((S3_MEM_NB_BLOCK *)S3NBPtr)->MemS3GetDeviceRegLst = MemNS3GetDeviceRegLstC32;
  ((S3_MEM_NB_BLOCK *)S3NBPtr)->MemS3SpecialCaseHeapSize = (sizeof (SpecialCasePCIRegC32) / sizeof (UINT16)) * sizeof (UINT32);

  MemNSwitchDCTNb (NBPtr, 0);

  return TRUE;
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:60,代码来源:mnS3c32.c


示例19: MemNInitPmuSramMsgBlockKV

BOOLEAN
MemNInitPmuSramMsgBlockKV (
  IN OUT   MEM_NB_BLOCK *NBPtr
  )
{
  LOCATE_HEAP_PTR LocHeap;
  ALLOCATE_HEAP_PARAMS AllocHeapParams;
  PMU_SRAM_MSG_BLOCK_KV *PmuSramMsgBlockPtr;

  LocHeap.BufferHandle = AMD_MEM_PMU_SRAM_MSG_BLOCK_HANDLE;
  if (HeapLocateBuffer (&LocHeap, &(NBPtr->MemPtr->StdHeader)) == AGESA_SUCCESS) {
    PmuSramMsgBlockPtr = (PMU_SRAM_MSG_BLOCK_KV *) LocHeap.BufferPtr;
  } else {
    // Allocate temporary buffer for PMU SRAM Message Block
    AllocHeapParams.RequestedBufferSize = sizeof (PMU_SRAM_MSG_BLOCK_KV);
    AllocHeapParams.BufferHandle = AMD_MEM_PMU_SRAM_MSG_BLOCK_HANDLE;
    AllocHeapParams.Persist = HEAP_LOCAL_CACHE;

    if (HeapAllocateBuffer (&AllocHeapParams, &(NBPtr->MemPtr->StdHeader)) != AGESA_SUCCESS) {
      return FALSE; // Could not allocate heap for PMU SRAM Message BLock.
    }

    PmuSramMsgBlockPtr = (PMU_SRAM_MSG_BLOCK_KV *) AllocHeapParams.BufferPtr;
  }

  LibAmdMemFill ((VOID *)PmuSramMsgBlockPtr, 0, (UINTN)sizeof (PMU_SRAM_MSG_BLOCK_KV), &(NBPtr->MemPtr->StdHeader));

  return TRUE;
}
开发者ID:fishbaoz,项目名称:KaveriPI,代码行数:29,代码来源:mnPmuSramMsgBlockKV.c


示例20: GfxConfigPostInterface

AGESA_STATUS
GfxConfigPostInterface (
  IN       AMD_CONFIG_PARAMS        *StdHeader
  )
{
  GFX_PLATFORM_CONFIG       *Gfx;
  AMD_POST_PARAMS           *PostParamsPtr;
  AGESA_STATUS              Status;
  PostParamsPtr = (AMD_POST_PARAMS *)StdHeader;
  Status = AGESA_SUCCESS;
  IDS_HDT_CONSOLE (GNB_TRACE, "GfxConfigPostInterface Enter\n");
  Gfx = GnbAllocateHeapBuffer (AMD_GFX_PLATFORM_CONFIG_HANDLE, sizeof (GFX_PLATFORM_CONFIG), StdHeader);
  ASSERT (Gfx != NULL);
  if (Gfx != NULL) {
    LibAmdMemFill (Gfx, 0x00, sizeof (GFX_PLATFORM_CONFIG), StdHeader);
    if (GnbBuildOptions.IgfxModeAsPcieEp) {
      Gfx->GfxControllerMode = GfxControllerPcieEndpointMode;
      Gfx->GfxPciAddress.AddressValue = MAKE_SBDFO (0, 0, 1, 0, 0);
    } else {
      Gfx->GfxControllerMode = GfxControllerLegacyBridgeMode;
      Gfx->GfxPciAddress.AddressValue = MAKE_SBDFO (0, 1, 5, 0, 0);
    }
    Gfx->StdHeader = StdHeader;
    Gfx->GnbHdAudio = PostParamsPtr->PlatformConfig.GnbHdAudio;
    Gfx->AbmSupport = PostParamsPtr->PlatformConfig.AbmSupport;
    Gfx->DynamicRefreshRate = PostParamsPtr->PlatformConfig.DynamicRefreshRate;
    Gfx->LcdBackLightControl = PostParamsPtr->PlatformConfig.LcdBackLightControl;
    Gfx->ForceGfxMode = GfxEnableAuto;
    Gfx->AmdPlatformType = UserOptions.CfgAmdPlatformType;
    Gfx->GmcClockGating = OptionEnabled;
    Gfx->GmcPowerGating = GnbBuildOptions.GmcPowerGateStutterOnly ? GmcPowerGatingStutterOnly : GmcPowerGatingWidthStutter;
    Gfx->UmaSteering = Garlic;
    GNB_DEBUG_CODE (
      GfxConfigDebugDump (Gfx);
      );
开发者ID:AdriDlu,项目名称:coreboot,代码行数:35,代码来源:GfxConfigPost.c



注:本文中的LibAmdMemFill函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LibAmdMsrRead函数代码示例发布时间:2022-05-30
下一篇:
C++ LhsVar函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap