TianoCore EDK2 master
Loading...
Searching...
No Matches
GccInline.c File Reference
#include "BaseLibInternals.h"

Go to the source code of this file.

Functions

VOID EFIAPI MemoryFence (VOID)
 
VOID EFIAPI CpuPause (VOID)
 
VOID EFIAPI CpuBreakpoint (VOID)
 
UINTN EFIAPI AsmReadEflags (VOID)
 
VOID EFIAPI InternalX86FxSave (OUT IA32_FX_BUFFER *Buffer)
 
VOID EFIAPI InternalX86FxRestore (IN CONST IA32_FX_BUFFER *Buffer)
 
UINT64 EFIAPI AsmReadMm0 (VOID)
 
UINT64 EFIAPI AsmReadMm1 (VOID)
 
UINT64 EFIAPI AsmReadMm2 (VOID)
 
UINT64 EFIAPI AsmReadMm3 (VOID)
 
UINT64 EFIAPI AsmReadMm4 (VOID)
 
UINT64 EFIAPI AsmReadMm5 (VOID)
 
UINT64 EFIAPI AsmReadMm6 (VOID)
 
UINT64 EFIAPI AsmReadMm7 (VOID)
 
VOID EFIAPI AsmWriteMm0 (IN UINT64 Value)
 
VOID EFIAPI AsmWriteMm1 (IN UINT64 Value)
 
VOID EFIAPI AsmWriteMm2 (IN UINT64 Value)
 
VOID EFIAPI AsmWriteMm3 (IN UINT64 Value)
 
VOID EFIAPI AsmWriteMm4 (IN UINT64 Value)
 
VOID EFIAPI AsmWriteMm5 (IN UINT64 Value)
 
VOID EFIAPI AsmWriteMm6 (IN UINT64 Value)
 
VOID EFIAPI AsmWriteMm7 (IN UINT64 Value)
 
UINT64 EFIAPI AsmReadTsc (VOID)
 

Detailed Description

GCC inline implementation of BaseLib processor specific functions.

Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file GccInline.c.

Function Documentation

◆ AsmReadEflags()

UINTN EFIAPI AsmReadEflags ( VOID  )

Reads the current value of the EFLAGS register.

Reads and returns the current value of the EFLAGS register. This function is only available on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on X64.

Returns
EFLAGS on IA-32 or RFLAGS on X64.

Definition at line 75 of file GccInline.c.

◆ AsmReadMm0()

UINT64 EFIAPI AsmReadMm0 ( VOID  )

Reads the current value of 64-bit MMX Register #0 (MM0).

Reads and returns the current value of MM0. This function is only available on IA-32 and X64.

Returns
The current value of MM0.

Definition at line 147 of file GccInline.c.

◆ AsmReadMm1()

UINT64 EFIAPI AsmReadMm1 ( VOID  )

Reads the current value of 64-bit MMX Register #1 (MM1).

Reads and returns the current value of MM1. This function is only available on IA-32 and X64.

Returns
The current value of MM1.

Definition at line 172 of file GccInline.c.

◆ AsmReadMm2()

UINT64 EFIAPI AsmReadMm2 ( VOID  )

Reads the current value of 64-bit MMX Register #2 (MM2).

Reads and returns the current value of MM2. This function is only available on IA-32 and X64.

Returns
The current value of MM2.

Definition at line 197 of file GccInline.c.

◆ AsmReadMm3()

UINT64 EFIAPI AsmReadMm3 ( VOID  )

Reads the current value of 64-bit MMX Register #3 (MM3).

Reads and returns the current value of MM3. This function is only available on IA-32 and X64.

Returns
The current value of MM3.

Definition at line 222 of file GccInline.c.

◆ AsmReadMm4()

UINT64 EFIAPI AsmReadMm4 ( VOID  )

Reads the current value of 64-bit MMX Register #4 (MM4).

Reads and returns the current value of MM4. This function is only available on IA-32 and X64.

Returns
The current value of MM4.

Definition at line 247 of file GccInline.c.

◆ AsmReadMm5()

UINT64 EFIAPI AsmReadMm5 ( VOID  )

Reads the current value of 64-bit MMX Register #5 (MM5).

Reads and returns the current value of MM5. This function is only available on IA-32 and X64.

Returns
The current value of MM5.

Definition at line 272 of file GccInline.c.

◆ AsmReadMm6()

UINT64 EFIAPI AsmReadMm6 ( VOID  )

Reads the current value of 64-bit MMX Register #6 (MM6).

Reads and returns the current value of MM6. This function is only available on IA-32 and X64.

Returns
The current value of MM6.

Definition at line 297 of file GccInline.c.

◆ AsmReadMm7()

UINT64 EFIAPI AsmReadMm7 ( VOID  )

Reads the current value of 64-bit MMX Register #7 (MM7).

Reads and returns the current value of MM7. This function is only available on IA-32 and X64.

Returns
The current value of MM7.

Definition at line 322 of file GccInline.c.

◆ AsmReadTsc()

UINT64 EFIAPI AsmReadTsc ( VOID  )

Reads the current value of Time Stamp Counter (TSC).

Reads and returns the current value of TSC. This function is only available on IA-32 and X64.

Returns
The current value of TSC

Definition at line 523 of file GccInline.c.

◆ AsmWriteMm0()

VOID EFIAPI AsmWriteMm0 ( IN UINT64  Value)

Writes the current value of 64-bit MMX Register #0 (MM0).

Writes the current value of MM0. This function is only available on IA32 and X64.

Parameters
ValueThe 64-bit value to write to MM0.

Definition at line 347 of file GccInline.c.

◆ AsmWriteMm1()

VOID EFIAPI AsmWriteMm1 ( IN UINT64  Value)

Writes the current value of 64-bit MMX Register #1 (MM1).

Writes the current value of MM1. This function is only available on IA32 and X64.

Parameters
ValueThe 64-bit value to write to MM1.

Definition at line 369 of file GccInline.c.

◆ AsmWriteMm2()

VOID EFIAPI AsmWriteMm2 ( IN UINT64  Value)

Writes the current value of 64-bit MMX Register #2 (MM2).

Writes the current value of MM2. This function is only available on IA32 and X64.

Parameters
ValueThe 64-bit value to write to MM2.

Definition at line 391 of file GccInline.c.

◆ AsmWriteMm3()

VOID EFIAPI AsmWriteMm3 ( IN UINT64  Value)

Writes the current value of 64-bit MMX Register #3 (MM3).

Writes the current value of MM3. This function is only available on IA32 and X64.

Parameters
ValueThe 64-bit value to write to MM3.

Definition at line 413 of file GccInline.c.

◆ AsmWriteMm4()

VOID EFIAPI AsmWriteMm4 ( IN UINT64  Value)

Writes the current value of 64-bit MMX Register #4 (MM4).

Writes the current value of MM4. This function is only available on IA32 and X64.

Parameters
ValueThe 64-bit value to write to MM4.

Definition at line 435 of file GccInline.c.

◆ AsmWriteMm5()

VOID EFIAPI AsmWriteMm5 ( IN UINT64  Value)

Writes the current value of 64-bit MMX Register #5 (MM5).

Writes the current value of MM5. This function is only available on IA32 and X64.

Parameters
ValueThe 64-bit value to write to MM5.

Definition at line 457 of file GccInline.c.

◆ AsmWriteMm6()

VOID EFIAPI AsmWriteMm6 ( IN UINT64  Value)

Writes the current value of 64-bit MMX Register #6 (MM6).

Writes the current value of MM6. This function is only available on IA32 and X64.

Parameters
ValueThe 64-bit value to write to MM6.

Definition at line 479 of file GccInline.c.

◆ AsmWriteMm7()

VOID EFIAPI AsmWriteMm7 ( IN UINT64  Value)

Writes the current value of 64-bit MMX Register #7 (MM7).

Writes the current value of MM7. This function is only available on IA32 and X64.

Parameters
ValueThe 64-bit value to write to MM7.

Definition at line 501 of file GccInline.c.

◆ CpuBreakpoint()

VOID EFIAPI CpuBreakpoint ( VOID  )

Generates a breakpoint on the CPU.

Generates a breakpoint on the CPU. The breakpoint must be implemented such that code can resume normal execution after the breakpoint.

Definition at line 56 of file GccInline.c.

◆ CpuPause()

VOID EFIAPI CpuPause ( VOID  )

Requests CPU to pause for a short period of time.

Requests CPU to pause for a short period of time. Typically used in MP systems to prevent memory starvation while waiting for a spin lock.

Definition at line 40 of file GccInline.c.

◆ InternalX86FxRestore()

VOID EFIAPI InternalX86FxRestore ( IN CONST IA32_FX_BUFFER *  Buffer)

Restores the current floating point/SSE/SSE2 context from a buffer.

Restores the current floating point/SSE/SSE2 state from the buffer specified by Buffer. Buffer must be aligned on a 16-byte boundary. This function is only available on IA-32 and X64.

Parameters
BufferThe pointer to a buffer to save the floating point/SSE/SSE2 context.

Definition at line 125 of file GccInline.c.

◆ InternalX86FxSave()

VOID EFIAPI InternalX86FxSave ( OUT IA32_FX_BUFFER *  Buffer)

Save the current floating point/SSE/SSE2 context to a buffer.

Saves the current floating point/SSE/SSE2 state to the buffer specified by Buffer. Buffer must be aligned on a 16-byte boundary. This function is only available on IA-32 and X64.

Parameters
BufferThe pointer to a buffer to save the floating point/SSE/SSE2 context.

Definition at line 102 of file GccInline.c.

◆ MemoryFence()

VOID EFIAPI MemoryFence ( VOID  )

Used to serialize load and store operations.

All loads and stores that proceed calls to this function are guaranteed to be globally visible when this function returns.

Definition at line 21 of file GccInline.c.