您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CpuDeadLoop函数代码示例

51自学网 2021-06-01 20:14:01
  C++
这篇教程C++ CpuDeadLoop函数代码示例写得很实用,希望能帮到您。

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

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

示例1: AcpiPmControl

VOIDAcpiPmControl (  UINTN SuspendType  ){  UINT16 AcpiPmBaseAddress;  UINT16 HostBridgeDevId;  ASSERT (SuspendType < 6);  AcpiPmBaseAddress = 0;  HostBridgeDevId = PciRead16 (OVMF_HOSTBRIDGE_DID);  switch (HostBridgeDevId) {  case INTEL_82441_DEVICE_ID:    AcpiPmBaseAddress = PIIX4_PMBA_VALUE;    break;  case INTEL_Q35_MCH_DEVICE_ID:    AcpiPmBaseAddress = ICH9_PMBASE_VALUE;    break;  default:    ASSERT (FALSE);    CpuDeadLoop ();  }  IoBitFieldWrite16 (AcpiPmBaseAddress + 4, 10, 13, (UINT16) SuspendType);  IoOr16 (AcpiPmBaseAddress + 4, BIT13);  CpuDeadLoop ();}
开发者ID:EvanLloyd,项目名称:tianocore,代码行数:28,


示例2: AllocFwCfgDmaAccessBuffer

/**  Function is to used for freeing the Access buffer allocated using  AllocFwCfgDmaAccessBuffer()**/STATICVOIDFreeFwCfgDmaAccessBuffer (  IN  VOID    *Access,  IN  VOID    *Mapping  ){  UINTN       NumPages;  EFI_STATUS  Status;  NumPages = EFI_SIZE_TO_PAGES (sizeof (FW_CFG_DMA_ACCESS));  Status = mIoMmuProtocol->Unmap (mIoMmuProtocol, Mapping);  if (EFI_ERROR (Status)) {    DEBUG ((DEBUG_ERROR,      "%a:%a failed to UnMap() Mapping 0x%Lx/n", gEfiCallerBaseName,      __FUNCTION__, (UINT64)(UINTN)Mapping));    ASSERT (FALSE);    CpuDeadLoop ();  }  Status = mIoMmuProtocol->FreeBuffer (mIoMmuProtocol, NumPages, Access);  if (EFI_ERROR (Status)) {    DEBUG ((DEBUG_ERROR,      "%a:%a failed to Free() 0x%Lx/n", gEfiCallerBaseName, __FUNCTION__,      (UINT64)(UINTN)Access));    ASSERT (FALSE);    CpuDeadLoop ();  }}
开发者ID:shijunjing,项目名称:edk2,代码行数:35,


示例3: InitBasicContext

/**  This function initialize basic context for FRM.**/VOIDInitBasicContext (  VOID  ){  UINT32  RegEax;  mHostContextCommon.CpuNum = GetCpuNumFromAcpi ();  GetPciExpressInfoFromAcpi (&mHostContextCommon.PciExpressBaseAddress, &mHostContextCommon.PciExpressLength);  PcdSet64 (PcdPciExpressBaseAddress, mHostContextCommon.PciExpressBaseAddress);  if (mHostContextCommon.PciExpressBaseAddress == 0) {    CpuDeadLoop ();  }  mHostContextCommon.AcpiTimerIoPortBaseAddress = GetAcpiTimerPort (&mHostContextCommon.AcpiTimerWidth);  PcdSet16 (PcdAcpiTimerIoPortBaseAddress, mHostContextCommon.AcpiTimerIoPortBaseAddress);  PcdSet8 (PcdAcpiTimerWidth, mHostContextCommon.AcpiTimerWidth);  if (mHostContextCommon.AcpiTimerIoPortBaseAddress == 0) {    CpuDeadLoop ();  }  mHostContextCommon.ResetIoPortBaseAddress = GetAcpiResetPort ();  mHostContextCommon.AcpiPmControlIoPortBaseAddress = GetAcpiPmControlPort ();  if (mHostContextCommon.AcpiPmControlIoPortBaseAddress == 0) {    CpuDeadLoop ();  }  mHostContextCommon.HostContextPerCpu = AllocatePages (FRM_SIZE_TO_PAGES(sizeof(FRM_HOST_CONTEXT_PER_CPU)) * mHostContextCommon.CpuNum);  mGuestContextCommon.GuestContextPerCpu = AllocatePages (FRM_SIZE_TO_PAGES(sizeof(FRM_GUEST_CONTEXT_PER_CPU)) * mHostContextCommon.CpuNum);  mHostContextCommon.LowMemoryBase = mCommunicationData.LowMemoryBase;  mHostContextCommon.LowMemorySize = mCommunicationData.LowMemorySize;  mHostContextCommon.LowMemoryBackupBase = (UINT64)(UINTN)AllocatePages (FRM_SIZE_TO_PAGES ((UINTN)mCommunicationData.LowMemorySize));  //  // Save current context  //  mBspIndex = ApicToIndex (ReadLocalApicId ());  mGuestContextCommon.GuestContextPerCpu[mBspIndex].Cr0 = AsmReadCr0 ();  mGuestContextCommon.GuestContextPerCpu[mBspIndex].Cr3 = AsmReadCr3 ();  mGuestContextCommon.GuestContextPerCpu[mBspIndex].Cr4 = AsmReadCr4 ();  AsmReadGdtr (&mGuestContextCommon.GuestContextPerCpu[mBspIndex].Gdtr);  AsmReadIdtr (&mGuestContextCommon.GuestContextPerCpu[mBspIndex].Idtr);  AsmCpuid (CPUID_EXTENDED_INFORMATION, &RegEax, NULL, NULL, NULL);  if (RegEax >= CPUID_EXTENDED_ADDRESS_SIZE) {    AsmCpuid (CPUID_EXTENDED_ADDRESS_SIZE, &RegEax, NULL, NULL, NULL);    mHostContextCommon.PhysicalAddressBits = (UINT8)RegEax;  } else {    mHostContextCommon.PhysicalAddressBits = 36;  }}
开发者ID:0xDEC0DE8,项目名称:STM,代码行数:59,


示例4: CpuBreakpoint

/**  Prints an assert message containing a filename, line number, and description.    This may be followed by a breakpoint or a dead loop.  Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>/n"  to the debug output device.  If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of   PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if   DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then   CpuDeadLoop() is called.  If neither of these bits are set, then this function   returns immediately after the message is printed to the debug output device.  DebugAssert() must actively prevent recursion.  If DebugAssert() is called while  processing another DebugAssert(), then DebugAssert() must return immediately.  If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.  If Description is NULL, then a <Description> string of "(NULL) Description" is printed.  @param  FileName     The pointer to the name of the source file that generated the assert condition.  @param  LineNumber   The line number in the source file that generated the assert condition  @param  Description  The pointer to the description of the assert condition.**/VOIDEFIAPIDebugAssert (  IN CONST CHAR8  *FileName,  IN UINTN        LineNumber,  IN CONST CHAR8  *Description  ){  CHAR8  Buffer[MAX_DEBUG_MESSAGE_LENGTH];  //  // Generate the ASSERT() message in Ascii format  //  AsciiSPrint (Buffer, sizeof (Buffer), "ASSERT %a(%d): %a/n", FileName, LineNumber, Description);  //  // Send the print string to the Console Output device  //  AcquireSpinLock (&mInternalDebugLock);  SerialPortWrite ((UINT8 *) Buffer, AsciiStrLen(Buffer));  ReleaseSpinLock (&mInternalDebugLock);  //  // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings  //  if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {    CpuBreakpoint ();  } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {    CpuDeadLoop ();  }}
开发者ID:0xDEC0DE8,项目名称:STM,代码行数:52,


示例5: DL_Entry

/**  This function entry DL environment.  @param DlmeEntryPoint    A pointer to the entrypoint of DLME.  @param DlmeArgs          A pointer to the Args of DLME.  @param StackBufferTop    A pointer to the starting virtual address of a buffer to be used for the DLME's stack.  @retval  non-0 fail to entry DL environment**/UINT32DL_Entry (  IN UINTN                  DlmeEntryPoint,  IN VOID                   *DlmeArgs,  IN UINTN                  *StackBufferTop  ){  EFI_STATUS                 Status;  if (IsMleLaunched ()) {    return (UINT32)-1;  }  mDlmeEntryPoint = DlmeEntryPoint;  mDlmeArgs = DlmeArgs;  mStackBufferTop = StackBufferTop;  PreDL_Entry ();  Status = LaunchTxtEnvironment ();  if (EFI_ERROR (Status)) {    return (UINT32)-1;  }  //  // Never come here  //  CpuDeadLoop ();  return (UINT32)-1;}
开发者ID:jyao1,项目名称:STM,代码行数:42,


示例6: DebugAgentTimerIntialize

/**  Setup all the hardware needed for the debug agents timer.  This function is used to set up debug enviroment. It may enable interrupts.**/VOIDEFIAPIDebugAgentTimerIntialize (  VOID  ){  UINT32      TimerBaseAddress;  UINT32      TimerNumber;  TimerNumber = PcdGet32(PcdOmap35xxDebugAgentTimer);  gVector = InterruptVectorForTimer (TimerNumber);  // Set up the timer registers  TimerBaseAddress = TimerBase (TimerNumber);  gTISR = TimerBaseAddress + GPTIMER_TISR;  gTCLR = TimerBaseAddress + GPTIMER_TCLR;  gTLDR = TimerBaseAddress + GPTIMER_TLDR;  gTCRR = TimerBaseAddress + GPTIMER_TCRR;  gTIER = TimerBaseAddress + GPTIMER_TIER;  if ((TimerNumber < 2) || (TimerNumber > 9)) {    // This code assumes one the General Purpose timers is used    // GPT2 - GPT9    CpuDeadLoop ();  }  // Set source clock for GPT2 - GPT9 to SYS_CLK  MmioOr32 (CM_CLKSEL_PER, 1 << (TimerNumber - 2));}
开发者ID:FishYu1222,项目名称:edk2,代码行数:35,


示例7: VmAllocatePages

/** Central method for allocating pages for VM page maps. */VOID *VmAllocatePages(UINTN NumPages){	VOID					*AllocatedPages = NULL;	/*	EFI_STATUS				Status;	EFI_PHYSICAL_ADDRESS	Addr;		// for now, just allocate EfiBootServicesData as usuall.	// if needed, we'll allocate somwhere from the top of mem.	Status = gBS->AllocatePages(AllocateAnyPages, EfiBootServicesData, NumPages, &Addr);	if (EFI_ERROR(Status)) {		Addr = 0;	}	return (VOID*)Addr;	*/	if (VmMemoryPoolFreePages >= (INTN)NumPages) {		AllocatedPages = VmMemoryPool;		VmMemoryPool += EFI_PAGES_TO_SIZE(NumPages);		VmMemoryPoolFreePages -= NumPages;	} else {		DBGnvr("VmAllocatePages - no more pages!/n");		CpuDeadLoop();	}	return AllocatedPages;}
开发者ID:Clover-EFI-Bootloader,项目名称:clover,代码行数:27,


示例8: CpuBreakpoint

/**  Prints an assert message containing a filename, line number, and description.  This may be followed by a breakpoint or a dead loop.  Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>/n"  to the debug output device.  If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of  PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if  DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then  CpuDeadLoop() is called.  If neither of these bits are set, then this function  returns immediately after the message is printed to the debug output device.  DebugAssert() must actively prevent recursion.  If DebugAssert() is called while  processing another DebugAssert(), then DebugAssert() must return immediately.  If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.  If Description is NULL, then a <Description> string of "(NULL) Description" is printed.  @param  FileName     The pointer to the name of the source file that generated the assert condition.  @param  LineNumber   The line number in the source file that generated the assert condition  @param  Description  The pointer to the description of the assert condition.**/VOIDEFIAPIDebugAssert (  IN CONST CHAR8  *FileName,  IN UINTN        LineNumber,  IN CONST CHAR8  *Description  ){  CHAR8  Buffer[MAX_DEBUG_MESSAGE_LENGTH];  UINT8 *Ptr;  //  // Generate the ASSERT() message in Ascii format  //  AsciiSPrint (Buffer, sizeof (Buffer), "ASSERT %a(%d): %a/n", FileName, LineNumber, Description);  //  // Send the print string to the Console Output device  //  for (Ptr = (UINT8 *) Buffer; *Ptr; Ptr++) {    IoWrite8 (PcdGet16(PcdDebugIoPort), *Ptr);  }  //  // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings  //  if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {    CpuBreakpoint ();  } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {    CpuDeadLoop ();  }}
开发者ID:hsienchieh,项目名称:uefilab,代码行数:53,


示例9: PowerButtonCallback

VOIDEFIAPIPowerButtonCallback (  IN  EFI_HANDLE                              DispatchHandle,  IN  EFI_SMM_POWER_BUTTON_DISPATCH_CONTEXT   *DispatchContext  ){  //  // Check what the state to return to after AC Loss. If Last State, then  // set it to Off.  //  UINT16  data16;  if (mWakeOnRtcVariable) {    EnableS5WakeOnRtc();  }  if (mAcLossVariable == 1) {    SetAfterG3On (TRUE);  }  ClearP2PBusMaster();  //  // Program clock chip  //  S4S5ProgClock();  data16 = (UINT16)(IoRead16(mAcpiBaseAddr + R_PCH_ACPI_GPE0a_EN));  data16 &= B_PCH_ACPI_GPE0a_EN_PCI_EXP;  //  // Clear Sleep SMI Status  //  IoWrite16 (mAcpiBaseAddr + R_PCH_SMI_STS,                (UINT16)(IoRead16 (mAcpiBaseAddr + R_PCH_SMI_STS) | B_PCH_SMI_STS_ON_SLP_EN));  //  // Clear Sleep Type Enable  //  IoWrite16 (mAcpiBaseAddr + R_PCH_SMI_EN,                (UINT16)(IoRead16 (mAcpiBaseAddr + R_PCH_SMI_EN) & (~B_PCH_SMI_EN_ON_SLP_EN)));  //  // Clear Power Button Status  //  IoWrite16(mAcpiBaseAddr + R_PCH_ACPI_PM1_STS, B_PCH_ACPI_PM1_STS_PWRBTN);  //  // Shut it off now!  //  IoWrite16(mAcpiBaseAddr + R_PCH_ACPI_PM1_CNT, V_PCH_ACPI_PM1_CNT_S5);  IoWrite16(mAcpiBaseAddr + R_PCH_ACPI_PM1_CNT, B_PCH_ACPI_PM1_CNT_SLP_EN | V_PCH_ACPI_PM1_CNT_S5);  //  // Should not return  //  CpuDeadLoop();}
开发者ID:shijunjing,项目名称:edk2,代码行数:60,


示例10: IoResetWriteHandler

/**  This function is IO write handler for reset.  @param Context Context for IO write handler  @param Port    IO port  @param Value   IO port value  @param Action  IO write action**/VOIDIoResetWriteHandler (  IN VOID      *Context,  IN UINT16    Port,  IN UINT32    Value,  OUT UINT32   *Action  ){  UINT32  Index;  Index = ApicToIndex (ReadLocalApicId ());  DEBUG ((EFI_D_INFO, "(FRM) !!!IoResetHandler!!!/n"));  FrmTeardownBsp (Index);  AsmWbinvd ();    //  // Work-around for CTRL+ALT+DEL, it will pass 0x2.  //  Value = Value | 0x6;  IoWrite8 (Port, (UINT8)Value);  CpuDeadLoop ();  *Action = IO_ACTION_PASSTHROUGH;  return ;}
开发者ID:0xDEC0DE8,项目名称:STM,代码行数:39,


示例11: ContinuationFunc

/**  FSP Init continuation function.  Control will be returned to this callback function after FspInit API call.  @param[in] Status      Status of the FSP INIT API  @param[in] HobListPtr  Pointer to the HOB data structure defined in the PI specification.**/VOIDContinuationFunc (  IN EFI_STATUS Status,  IN VOID       *HobListPtr  ){  EFI_BOOT_MODE             BootMode;  UINT64                    StackSize;  EFI_PHYSICAL_ADDRESS      StackBase;  DEBUG ((DEBUG_INFO, "ContinuationFunc - %r/n", Status));  DEBUG ((DEBUG_INFO, "HobListPtr - 0x%x/n", HobListPtr));  if (Status != EFI_SUCCESS) {    CpuDeadLoop ();  }  //  // Can not call any PeiServices  //  BootMode = GetBootMode ();  GetStackInfo (BootMode, TRUE, &StackBase, &StackSize);  DEBUG ((DEBUG_INFO, "StackBase - 0x%x/n", StackBase));  DEBUG ((DEBUG_INFO, "StackSize - 0x%x/n", StackSize));  CallPeiCoreEntryPoint (    HobListPtr,    (VOID *)(UINTN)StackBase,    (VOID *)(UINTN)(StackBase + StackSize)    );}
开发者ID:FishYu1222,项目名称:edk2,代码行数:39,


示例12: PeiFspInit

/**  Call FspInit API.  @param[in] FspHeader FSP header pointer.**/VOIDPeiFspInit (  IN FSP_INFO_HEADER *FspHeader  ){  FSP_INIT_PARAMS           FspInitParams;  FSP_INIT_RT_COMMON_BUFFER FspRtBuffer;  UINT8                     FspUpdRgn[FixedPcdGet32 (PcdMaxUpdRegionSize)];  UINT32                    UpdRegionSize;  EFI_BOOT_MODE             BootMode;  UINT64                    StackSize;  EFI_PHYSICAL_ADDRESS      StackBase;  EFI_STATUS                Status;  DEBUG ((DEBUG_INFO, "PeiFspInit enter/n"));  PeiServicesGetBootMode (&BootMode);  DEBUG ((DEBUG_INFO, "BootMode - 0x%x/n", BootMode));  GetStackInfo (BootMode, FALSE, &StackBase, &StackSize);  DEBUG ((DEBUG_INFO, "StackBase - 0x%x/n", StackBase));  DEBUG ((DEBUG_INFO, "StackSize - 0x%x/n", StackSize));  ZeroMem (&FspRtBuffer, sizeof(FspRtBuffer));  FspRtBuffer.StackTop = (UINT32 *)(UINTN)(StackBase + StackSize);  FspRtBuffer.BootMode = BootMode;  /* Platform override any UPD configs */  UpdRegionSize = GetUpdRegionSize();  DEBUG ((DEBUG_INFO, "UpdRegionSize - 0x%x/n", UpdRegionSize));  DEBUG ((DEBUG_INFO, "sizeof(FspUpdRgn) - 0x%x/n", sizeof(FspUpdRgn)));  ASSERT(sizeof(FspUpdRgn) >= UpdRegionSize);  ZeroMem (FspUpdRgn, UpdRegionSize);  FspRtBuffer.UpdDataRgnPtr = UpdateFspUpdConfigs (FspUpdRgn);  FspRtBuffer.BootLoaderTolumSize = 0;  ZeroMem (&FspInitParams, sizeof(FspInitParams));  FspInitParams.NvsBufferPtr = GetNvsBuffer ();  DEBUG ((DEBUG_INFO, "NvsBufferPtr - 0x%x/n", FspInitParams.NvsBufferPtr));  FspInitParams.RtBufferPtr  = (VOID *)&FspRtBuffer;  FspInitParams.ContinuationFunc = (CONTINUATION_PROC)ContinuationFunc;  SaveSecContext (GetPeiServicesTablePointer ());  DEBUG ((DEBUG_INFO, "FspInitParams      - 0x%x/n", &FspInitParams));  DEBUG ((DEBUG_INFO, "  NvsBufferPtr     - 0x%x/n", FspInitParams.NvsBufferPtr));  DEBUG ((DEBUG_INFO, "  RtBufferPtr      - 0x%x/n", FspInitParams.RtBufferPtr));  DEBUG ((DEBUG_INFO, "    StackTop       - 0x%x/n", FspRtBuffer.StackTop));  DEBUG ((DEBUG_INFO, "    BootMode       - 0x%x/n", FspRtBuffer.BootMode));  DEBUG ((DEBUG_INFO, "    UpdDataRgnPtr  - 0x%x/n", FspRtBuffer.UpdDataRgnPtr));  DEBUG ((DEBUG_INFO, "  ContinuationFunc - 0x%x/n", FspInitParams.ContinuationFunc));  Status = CallFspInit (FspHeader, &FspInitParams);  //  // Should never return  //  DEBUG((DEBUG_ERROR, "FSP Init failed, status: 0x%x/n", Status));  CpuDeadLoop ();}
开发者ID:FishYu1222,项目名称:edk2,代码行数:65,


示例13: UnmapDmaDataBuffer

/**  Function is used for mapping host address to device address. The buffer must  be unmapped with UnmapDmaDataBuffer ().**/STATICVOIDMapFwCfgDmaDataBuffer (  IN  BOOLEAN               IsWrite,  IN  VOID                  *HostAddress,  IN  UINT32                Size,  OUT EFI_PHYSICAL_ADDRESS  *DeviceAddress,  OUT VOID                  **MapInfo  ){  EFI_STATUS              Status;  UINTN                   NumberOfBytes;  VOID                    *Mapping;  EFI_PHYSICAL_ADDRESS    PhysicalAddress;  NumberOfBytes = Size;  Status = mIoMmuProtocol->Map (                             mIoMmuProtocol,                             (IsWrite ?                              EdkiiIoMmuOperationBusMasterRead64 :                              EdkiiIoMmuOperationBusMasterWrite64),                             HostAddress,                             &NumberOfBytes,                             &PhysicalAddress,                             &Mapping                             );  if (EFI_ERROR (Status)) {    DEBUG ((DEBUG_ERROR,      "%a:%a failed to Map() Address 0x%Lx Size 0x%Lx/n", gEfiCallerBaseName,      __FUNCTION__, (UINT64)(UINTN)HostAddress, (UINT64)Size));    ASSERT (FALSE);    CpuDeadLoop ();  }  if (NumberOfBytes < Size) {    mIoMmuProtocol->Unmap (mIoMmuProtocol, Mapping);    DEBUG ((DEBUG_ERROR,      "%a:%a failed to Map() - requested 0x%x got 0x%Lx/n", gEfiCallerBaseName,      __FUNCTION__, Size, (UINT64)NumberOfBytes));    ASSERT (FALSE);    CpuDeadLoop ();  }  *DeviceAddress = PhysicalAddress;  *MapInfo = Mapping;}
开发者ID:shijunjing,项目名称:edk2,代码行数:51,


示例14: ResetWarm

/**  Calling this function causes a system-wide initialization. The processors  are set to their initial state, and pending cycles are not corrupted.  System reset should not return, if it returns, it means the system does  not support warm reset.**/VOIDEFIAPIResetWarm (  VOID  ){  IoWrite8 (0x64, 0xfe);  CpuDeadLoop ();}
开发者ID:EvanLloyd,项目名称:tianocore,代码行数:16,


示例15: IdsAssert

/** *  ASSERT backend function for PEI phase * **/BOOLEANIdsAssert (  IN       UINT32      FileCode  ){  //EFI_BREAKPOINT ();  CpuDeadLoop ();  return TRUE;}
开发者ID:fishbaoz,项目名称:MullinsPI,代码行数:13,


示例16: QemuFwCfgInitialize

RETURN_STATUSEFIAPIQemuFwCfgInitialize (  VOID  ){  UINT32 Signature;  UINT32 Revision;  //  // Enable the access routines while probing to see if it is supported.  // For probing we always use the IO Port (IoReadFifo8()) access method.  //  mQemuFwCfgSupported = TRUE;  mQemuFwCfgDmaSupported = FALSE;  QemuFwCfgSelectItem (QemuFwCfgItemSignature);  Signature = QemuFwCfgRead32 ();  DEBUG ((EFI_D_INFO, "FW CFG Signature: 0x%x/n", Signature));  QemuFwCfgSelectItem (QemuFwCfgItemInterfaceVersion);  Revision = QemuFwCfgRead32 ();  DEBUG ((EFI_D_INFO, "FW CFG Revision: 0x%x/n", Revision));  if ((Signature != SIGNATURE_32 ('Q', 'E', 'M', 'U')) ||      (Revision < 1)     ) {    DEBUG ((EFI_D_INFO, "QemuFwCfg interface not supported./n"));    mQemuFwCfgSupported = FALSE;    return RETURN_SUCCESS;  }  if ((Revision & FW_CFG_F_DMA) == 0) {    DEBUG ((DEBUG_INFO, "QemuFwCfg interface (IO Port) is supported./n"));  } else {    mQemuFwCfgDmaSupported = TRUE;    DEBUG ((DEBUG_INFO, "QemuFwCfg interface (DMA) is supported./n"));  }  if (mQemuFwCfgDmaSupported && MemEncryptSevIsEnabled ()) {    EFI_STATUS   Status;    //    // IoMmuDxe driver must have installed the IOMMU protocol. If we are not    // able to locate the protocol then something must have gone wrong.    //    Status = gBS->LocateProtocol (&gEdkiiIoMmuProtocolGuid, NULL,                    (VOID **)&mIoMmuProtocol);    if (EFI_ERROR (Status)) {      DEBUG ((DEBUG_ERROR,        "QemuFwCfgSevDma %a:%a Failed to locate IOMMU protocol./n",        gEfiCallerBaseName, __FUNCTION__));      ASSERT (FALSE);      CpuDeadLoop ();    }  }  return RETURN_SUCCESS;}
开发者ID:shijunjing,项目名称:edk2,代码行数:57,


示例17: FspPeiEntryPoint

/**  This is the entrypoint of PEIM  @param[in] FileHandle  Handle of the file being invoked.  @param[in] PeiServices Describes the list of possible PEI Services.  @retval EFI_SUCCESS if it completed successfully.**/EFI_STATUSEFIAPIFspPeiEntryPoint (  IN       EFI_PEI_FILE_HANDLE  FileHandle,  IN CONST EFI_PEI_SERVICES     **PeiServices  ){  FSP_INFO_HEADER      *FspHeader;  EFI_STATUS           Status;  FSP_INIT_DONE_PPI    *FspInitDone;  VOID                 *FspHobList;  EFI_BOOT_MODE        BootMode;  DEBUG ((DEBUG_INFO, "FspPeiEntryPoint/n"));  Status = PeiServicesLocatePpi (             &gFspInitDonePpiGuid,             0,             NULL,             (VOID **) &FspInitDone             );  if (EFI_ERROR (Status)) {    //    // 1st entry    //    DEBUG ((DEBUG_INFO, "1st entry/n"));    FspHeader = FspFindFspHeader (PcdGet32 (PcdFlashFvFspBase));    DEBUG ((DEBUG_INFO, "FspHeader - 0x%x/n", FspHeader));    if (FspHeader == NULL) {      return EFI_DEVICE_ERROR;    }    SecFspInit (FspHeader);    //    // Never return here    //    CpuDeadLoop ();  } else {    //    // 2nd entry    //    DEBUG ((DEBUG_INFO, "2nd entry/n"));    Status = FspInitDone->GetFspHobList (PeiServices, FspInitDone, &FspHobList);    DEBUG ((DEBUG_INFO, "FspHobList - 0x%x/n", FspHobList));    FspHobProcess (FspHobList);    PeiServicesGetBootMode (&BootMode);    if (BootMode == BOOT_ON_S3_RESUME) {      Status = PeiServicesNotifyPpi (&mS3EndOfPeiNotifyDesc);      ASSERT_EFI_ERROR (Status);    }  }  return EFI_SUCCESS;}
开发者ID:ChenFanFnst,项目名称:edk2,代码行数:64,


示例18: CpuBreakpoint

/**  Prints an assert message containing a filename, line number, and description.    This may be followed by a breakpoint or a dead loop.  Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>/n"   to the debug output device.  If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of   PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if   DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then   CpuDeadLoop() is called.  If neither of these bits are set, then this function   returns immediately after the message is printed to the debug output device.  DebugAssert() must actively prevent recusrsion.  If DebugAssert() is called while  processing another DebugAssert(), then DebugAssert() must return immediately.  If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.  If Description is NULL, then a <Description> string of "(NULL) Description" is printed.  @param  FileName     Pointer to the name of the source file that generated the assert condition.  @param  LineNumber   The line number in the source file that generated the assert condition  @param  Description  Pointer to the description of the assert condition.**/VOIDEFIAPIDebugAssert (  IN CONST CHAR8  *FileName,  IN UINTN        LineNumber,  IN CONST CHAR8  *Description  ){  UINT64                 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE / sizeof(UINT64)];  EFI_DEBUG_ASSERT_DATA  *AssertData;  UINTN                  TotalSize;  CHAR8                  *Temp;  UINTN                  FileNameLength;  UINTN                  DescriptionLength;  //  // Make sure it will all fit in the passed in buffer  //  FileNameLength    = AsciiStrLen (FileName);  DescriptionLength = AsciiStrLen (Description);  TotalSize = sizeof (EFI_DEBUG_ASSERT_DATA) + FileNameLength + 1 + DescriptionLength + 1;  if (TotalSize <= EFI_STATUS_CODE_DATA_MAX_SIZE) {    //    // Fill in EFI_DEBUG_ASSERT_DATA    //    AssertData = (EFI_DEBUG_ASSERT_DATA *)Buffer;    AssertData->LineNumber = (UINT32)LineNumber;    //    // Copy Ascii FileName including NULL.    //    Temp = AsciiStrCpy ((CHAR8 *)(AssertData + 1), FileName);    //    // Copy Ascii Description     //    AsciiStrCpy (Temp + AsciiStrLen (FileName) + 1, Description);    REPORT_STATUS_CODE_WITH_EXTENDED_DATA (      (EFI_ERROR_CODE | EFI_ERROR_UNRECOVERED),      (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE),      AssertData,      TotalSize      );  }  //  // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings  //  if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {    CpuBreakpoint ();  } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {    CpuDeadLoop ();  }}
开发者ID:hsienchieh,项目名称:uefilab,代码行数:78,


示例19: AcpiPmControl

VOIDAcpiPmControl (  UINTN SuspendType  ){  ASSERT (SuspendType < 6);  IoAndThenOr16 (0x404, (UINT16) ~0x3c00, (UINT16) (SuspendType << 10));  IoOr16 (0x404, BIT13);  CpuDeadLoop ();}
开发者ID:Cutty,项目名称:edk2,代码行数:11,


示例20: PlatformTransferControl16

/**  Platform specific mechanism to transfer control to 16bit OS waking vector  @param[in] AcpiWakingVector    The 16bit OS waking vector  @param[in] AcpiLowMemoryBase   A buffer under 1M which could be used during the transfer**/VOIDPlatformTransferControl16 (    IN UINT32       AcpiWakingVector,    IN UINT32       AcpiLowMemoryBase){    UINT32      NewValue;    UINT64      BaseAddress;    UINT64      SmramLength;    UINTN       Index;    DEBUG (( EFI_D_INFO, "PlatformTransferControl - Entry/r/n"));    //    // Need to make sure the GDT is loaded with values that support long mode and real mode.    //    AsmWriteGdtr (&mGdt);    //    // Disable eSram block (this will also clear/zero eSRAM)    // We only use eSRAM in the PEI phase. Disable now that we are resuming the OS    //    NewValue = QNCPortRead (QUARK_NC_MEMORY_MANAGER_SB_PORT_ID, QUARK_NC_MEMORY_MANAGER_ESRAMPGCTRL_BLOCK);    NewValue |= BLOCK_DISABLE_PG;    QNCPortWrite (QUARK_NC_MEMORY_MANAGER_SB_PORT_ID, QUARK_NC_MEMORY_MANAGER_ESRAMPGCTRL_BLOCK, NewValue);    //    // Update HMBOUND to top of DDR3 memory and LOCK    // We disabled eSRAM so now we move HMBOUND down to top of DDR3    //    QNCGetTSEGMemoryRange (&BaseAddress, &SmramLength);    NewValue = (UINT32)(BaseAddress + SmramLength);    DEBUG ((EFI_D_INFO,"Locking HMBOUND at: = 0x%8x/n",NewValue));    QNCPortWrite (QUARK_NC_HOST_BRIDGE_SB_PORT_ID, QUARK_NC_HOST_BRIDGE_HMBOUND_REG, (NewValue | HMBOUND_LOCK));    //    // Lock all IMR regions now that HMBOUND is locked    //    for (Index = (QUARK_NC_MEMORY_MANAGER_IMR0+QUARK_NC_MEMORY_MANAGER_IMRXL); Index <= (QUARK_NC_MEMORY_MANAGER_IMR7+QUARK_NC_MEMORY_MANAGER_IMRXL); Index += 4) {        NewValue = QNCPortRead (QUARK_NC_MEMORY_MANAGER_SB_PORT_ID, Index);        NewValue |= IMR_LOCK;        QNCPortWrite (QUARK_NC_MEMORY_MANAGER_SB_PORT_ID, Index, NewValue);    }    //    // Call ASM routine to switch to real mode and jump to 16bit OS waking vector    //    AsmTransferControl(AcpiWakingVector, 0);    //    // Never run to here    //    CpuDeadLoop();}
开发者ID:RafaelRMachado,项目名称:Galileo,代码行数:61,


示例21: SystemHang

VOIDSystemHang (  CHAR8        *Message  ){  PrintString (    "%s## FATAL ERROR ##: Fail to load DUET images! System hang!/n",    Message    );  CpuDeadLoop();}
开发者ID:b-man,项目名称:edk2,代码行数:11,


示例22: ResetCold

/**  Calling this function causes a system-wide reset. This sets  all circuitry within the system to its initial state. This type of reset  is asynchronous to system operation and operates without regard to  cycle boundaries.  System reset should not return, if it returns, it means the system does  not support cold reset.**/VOIDEFIAPIResetCold (  VOID  ){  IoWrite8 (0xCF9, BIT2 | BIT1); // 1st choice: PIIX3 RCR, RCPU|SRST  MicroSecondDelay (50);  IoWrite8 (0x64, 0xfe);         // 2nd choice: keyboard controller  CpuDeadLoop ();}
开发者ID:EvanLloyd,项目名称:tianocore,代码行数:21,


示例23: DoS3

/**  Put the system into S3 power state.**/VOIDDoS3 (  VOID  ){  EnterS3WithImmediateWake ();  //  // Should not return  //  CpuDeadLoop ();}
开发者ID:MattDevo,项目名称:edk2,代码行数:15,


示例24: CallFspWrapperResetSystem

/**  Perform platform related reset in FSP wrapper.  This function will reset the system with requested ResetType.  @param[in] FspStatusResetType  The type of reset the platform has to perform.**/VOIDEFIAPICallFspWrapperResetSystem (  IN UINT32    FspStatusResetType  ){  //  // Perform reset according to the type.  //  CpuDeadLoop();}
开发者ID:EvanLloyd,项目名称:tianocore,代码行数:19,


示例25: DoResetSystem

/**  Do reset system.**/VOIDDoResetSystem (  VOID  ){  DEBUG((DEBUG_INFO, "Capsule Request Cold Reboot."));  REPORT_STATUS_CODE(EFI_PROGRESS_CODE, (EFI_SOFTWARE | PcdGet32(PcdStatusCodeSubClassCapsule) | PcdGet32(PcdCapsuleStatusCodeResettingSystem)));  gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);  CpuDeadLoop();}
开发者ID:MattDevo,项目名称:edk2,代码行数:16,


示例26: S3ResumeBootOs

/**  Jump to OS waking vector.  The function will install boot script done PPI, report S3 resume status code, and then jump to OS waking vector.  @param  AcpiS3Context                 a pointer to a structure of ACPI_S3_CONTEXT  @param  PeiS3ResumeState              a pointer to a structure of PEI_S3_RESUME_STATE**/VOIDEFIAPIS3ResumeBootOs (  IN ACPI_S3_CONTEXT                *AcpiS3Context,  IN PEI_S3_RESUME_STATE            *PeiS3ResumeState  ){  EFI_STATUS                                    Status;  EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE  *Facs;  ASM_TRANSFER_CONTROL                          AsmTransferControl;  UINTN                                         TempStackTop;  UINTN                                         TempStack[0x10];  //  // Restore IDT  //  AsmWriteIdtr (&PeiS3ResumeState->Idtr);  //  // Install BootScriptDonePpi  //  Status = PeiServicesInstallPpi (&mPpiListPostScriptTable);  ASSERT_EFI_ERROR (Status);  //  // Get ACPI Table Address  //  Facs = (EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *) ((UINTN) (AcpiS3Context->AcpiFacsTable));  if ((Facs == NULL) ||      (Facs->Signature != EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) ||      ((Facs->FirmwareWakingVector == 0) && (Facs->XFirmwareWakingVector == 0)) ) {    CpuDeadLoop ();    return ;  }  //  // report status code on S3 resume  //  REPORT_STATUS_CODE (EFI_PROGRESS_CODE, EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_PC_OS_WAKE);  //  // Install EndOfPeiPpi  //  Status = PeiServicesInstallPpi (&mPpiListEndOfPeiTable);  ASSERT_EFI_ERROR (Status);  PERF_CODE (    WriteToOsS3PerformanceData ();    );
开发者ID:etiago,项目名称:vbox,代码行数:57,


示例27: PeiFspInitV1

/**  Do FSP initialization based on FspApi version 1.  @param[in] FspHeader FSP header pointer.  @return FSP initialization status.**/EFI_STATUSPeiFspInitV1 (  IN FSP_INFO_HEADER *FspHeader  ){  EFI_STATUS           Status;  FSP_INIT_DONE_PPI    *FspInitDone;  VOID                 *FspHobList;  EFI_BOOT_MODE        BootMode;    Status = PeiServicesLocatePpi (             &gFspInitDonePpiGuid,             0,             NULL,             (VOID **) &FspInitDone             );  if (EFI_ERROR (Status)) {    //    // 1st entry    //    DEBUG ((DEBUG_INFO, "1st entry/n"));    PeiFspInit (FspHeader);    //    // Never return here, for FspApi version 1.    //    CpuDeadLoop ();  } else {    //    // 2nd entry for FspApi version 1 only.    //    DEBUG ((DEBUG_INFO, "2nd entry/n"));    Status = FspInitDone->GetFspHobList (GetPeiServicesTablePointer (), FspInitDone, &FspHobList);    ASSERT_EFI_ERROR (Status);    DEBUG ((DEBUG_INFO, "FspHobList - 0x%x/n", FspHobList));    FspHobProcess (FspHobList);        //    // Register EndOfPei Notify for S3 to run FspNotifyPhase    //    PeiServicesGetBootMode (&BootMode);    if (BootMode == BOOT_ON_S3_RESUME) {      Status = PeiServicesNotifyPpi (&mS3EndOfPeiNotifyDesc);      ASSERT_EFI_ERROR (Status);    }  }  return EFI_SUCCESS;}
开发者ID:FishYu1222,项目名称:edk2,代码行数:57,


示例28: UnmapFwCfgDmaDataBuffer

STATICVOIDUnmapFwCfgDmaDataBuffer (  IN  VOID  *Mapping  ){  EFI_STATUS  Status;  Status = mIoMmuProtocol->Unmap (mIoMmuProtocol, Mapping);  if (EFI_ERROR (Status)) {    DEBUG ((DEBUG_ERROR,      "%a:%a failed to UnMap() Mapping 0x%Lx/n", gEfiCallerBaseName,      __FUNCTION__, (UINT64)(UINTN)Mapping));    ASSERT (FALSE);    CpuDeadLoop ();  }}
开发者ID:shijunjing,项目名称:edk2,代码行数:17,


示例29: CommonExceptionHandler

/**  Common exception handler.  @param ExceptionType  Exception type.  @param SystemContext  Pointer to EFI_SYSTEM_CONTEXT.**/VOIDEFIAPICommonExceptionHandler (  IN EFI_EXCEPTION_TYPE   ExceptionType,   IN EFI_SYSTEM_CONTEXT   SystemContext  ){  //  // Display ExceptionType, CPU information and Image information  //    DumpCpuContent (ExceptionType, SystemContext);    //  // Enter a dead loop.  //  CpuDeadLoop ();}
开发者ID:tenpoku1000,项目名称:UEFI_SecureBoot,代码行数:23,



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


C++ CrashError函数代码示例
C++ Cprintf函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。