efirtlib.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. #ifndef _EFI_RT_LIB_INCLUDE_
  2. #define _EFI_RT_LIB_INCLUDE_
  3. /*++
  4. Copyright (c) 1998 Intel Corporation
  5. Module Name:
  6. efilib.h
  7. Abstract:
  8. EFI Runtime library functions
  9. Revision History
  10. --*/
  11. #include "efidebug.h"
  12. #include "efipart.h"
  13. #if defined(_M_X64) || defined(__x86_64__) || defined(__amd64__)
  14. #include "x86_64/efilibplat.h"
  15. #elif defined(_M_IX86) || defined(__i386__)
  16. #include "ia32/efilibplat.h"
  17. #elif defined(_M_IA64) || defined(__ia64__)
  18. #include "ia64/efilibplat.h"
  19. #elif defined (_M_ARM64) || defined(__aarch64__)
  20. #include "aarch64/efilibplat.h"
  21. #elif defined (_M_ARM) || defined(__arm__)
  22. #include "arm/efilibplat.h"
  23. #elif defined (_M_MIPS64) || defined(__mips64__) || defined(__mips64)
  24. #include "mips64el/efilibplat.h"
  25. #elif defined (__riscv) && __riscv_xlen == 64
  26. #include "riscv64/efilibplat.h"
  27. #endif
  28. VOID
  29. RUNTIMEFUNCTION
  30. RtZeroMem (
  31. IN VOID *Buffer,
  32. IN UINTN Size
  33. );
  34. VOID
  35. RUNTIMEFUNCTION
  36. RtSetMem (
  37. IN VOID *Buffer,
  38. IN UINTN Size,
  39. IN UINT8 Value
  40. );
  41. VOID
  42. RUNTIMEFUNCTION
  43. RtCopyMem (
  44. IN VOID *Dest,
  45. IN CONST VOID *Src,
  46. IN UINTN len
  47. );
  48. INTN
  49. RUNTIMEFUNCTION
  50. RtCompareMem (
  51. IN CONST VOID *Dest,
  52. IN CONST VOID *Src,
  53. IN UINTN len
  54. );
  55. INTN
  56. RUNTIMEFUNCTION
  57. RtStrCmp (
  58. IN CONST CHAR16 *s1,
  59. IN CONST CHAR16 *s2
  60. );
  61. VOID
  62. RUNTIMEFUNCTION
  63. RtStrCpy (
  64. IN CHAR16 *Dest,
  65. IN CONST CHAR16 *Src
  66. );
  67. VOID
  68. RUNTIMEFUNCTION
  69. RtStrnCpy (
  70. IN CHAR16 *Dest,
  71. IN CONST CHAR16 *Src,
  72. IN UINTN Len
  73. );
  74. CHAR16 *
  75. RUNTIMEFUNCTION
  76. RtStpCpy (
  77. IN CHAR16 *Dest,
  78. IN CONST CHAR16 *Src
  79. );
  80. CHAR16 *
  81. RUNTIMEFUNCTION
  82. RtStpnCpy (
  83. IN CHAR16 *Dest,
  84. IN CONST CHAR16 *Src,
  85. IN UINTN Len
  86. );
  87. VOID
  88. RUNTIMEFUNCTION
  89. RtStrCat (
  90. IN CHAR16 *Dest,
  91. IN CONST CHAR16 *Src
  92. );
  93. VOID
  94. RUNTIMEFUNCTION
  95. RtStrnCat (
  96. IN CHAR16 *Dest,
  97. IN CONST CHAR16 *Src,
  98. IN UINTN Len
  99. );
  100. UINTN
  101. RUNTIMEFUNCTION
  102. RtStrLen (
  103. IN CONST CHAR16 *s1
  104. );
  105. UINTN
  106. RUNTIMEFUNCTION
  107. RtStrnLen (
  108. IN CONST CHAR16 *s1,
  109. IN UINTN Len
  110. );
  111. UINTN
  112. RUNTIMEFUNCTION
  113. RtStrSize (
  114. IN CONST CHAR16 *s1
  115. );
  116. INTN
  117. RUNTIMEFUNCTION
  118. RtCompareGuid (
  119. IN EFI_GUID *Guid1,
  120. IN EFI_GUID *Guid2
  121. );
  122. UINT8
  123. RUNTIMEFUNCTION
  124. RtDecimaltoBCD(
  125. IN UINT8 BcdValue
  126. );
  127. UINT8
  128. RUNTIMEFUNCTION
  129. RtBCDtoDecimal(
  130. IN UINT8 BcdValue
  131. );
  132. //
  133. // Virtual mapping transition support. (Only used during
  134. // the virtual address change transisition)
  135. //
  136. VOID
  137. RUNTIMEFUNCTION
  138. RtLibEnableVirtualMappings (
  139. VOID
  140. );
  141. VOID
  142. RUNTIMEFUNCTION
  143. RtConvertList (
  144. IN UINTN DebugDisposition,
  145. IN OUT LIST_ENTRY *ListHead
  146. );
  147. VOID
  148. RUNTIMEFUNCTION
  149. RtAcquireLock (
  150. IN FLOCK *Lock
  151. );
  152. VOID
  153. RUNTIMEFUNCTION
  154. RtReleaseLock (
  155. IN FLOCK *Lock
  156. );
  157. #endif