Changeset 105670 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/BaseLib.h
- Timestamp:
- Aug 14, 2024 1:16:30 PM (4 months ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-159268 /vendor/edk2/current 103735-103757,103769-103776,129194-164365
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/BaseLib.h
r101291 r105670 193 193 194 194 VOID 195 RiscVSetSupervisorTimeCompareRegister ( 196 IN UINT64 197 ); 198 199 VOID 195 200 RiscVEnableTimerInterrupt ( 196 201 VOID … … 205 210 RiscVClearPendingTimerInterrupt ( 206 211 VOID 212 ); 213 214 /** 215 RISC-V invalidate instruction cache. 216 217 **/ 218 VOID 219 EFIAPI 220 RiscVInvalidateInstCacheFenceAsm ( 221 VOID 222 ); 223 224 /** 225 RISC-V invalidate data cache. 226 227 **/ 228 VOID 229 EFIAPI 230 RiscVInvalidateDataCacheFenceAsm ( 231 VOID 232 ); 233 234 /** 235 RISC-V flush cache block. Atomically perform a clean operation 236 followed by an invalidate operation 237 238 **/ 239 VOID 240 EFIAPI 241 RiscVCpuCacheFlushCmoAsm ( 242 IN UINTN 243 ); 244 245 /** 246 Perform a write transfer to another cache or to memory if the 247 data in the copy of the cache block have been modified by a store 248 operation 249 250 **/ 251 VOID 252 EFIAPI 253 RiscVCpuCacheCleanCmoAsm ( 254 IN UINTN 255 ); 256 257 /** 258 Deallocate the copy of the cache block 259 260 **/ 261 VOID 262 EFIAPI 263 RiscVCpuCacheInvalCmoAsm ( 264 IN UINTN 207 265 ); 208 266 … … 230 288 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 231 289 290 /* 291 * Set the exception base address for LoongArch. 292 * 293 * @param ExceptionBaseAddress The exception base address, must be aligned greater than or qeual to 4K . 294 */ 295 VOID 296 SetExceptionBaseAddress ( 297 IN UINT64 298 ); 299 300 /* 301 * Set the TlbRebase address for LoongArch. 302 * 303 * @param TlbRebaseAddress The TlbRebase address, must be aligned greater than or qeual to 4K . 304 */ 305 VOID 306 SetTlbRebaseAddress ( 307 IN UINT64 308 ); 309 310 /** 311 Enables local CPU interrupts. 312 313 @param Needs to enable local interrupt bit. 314 **/ 315 VOID 316 EnableLocalInterrupts ( 317 IN UINT16 318 ); 319 320 /** 321 Disables local CPU interrupts. 322 323 @param Needs to disable local interrupt bit. 324 **/ 325 VOID 326 DisableLocalInterrupts ( 327 IN UINT16 328 ); 329 330 /** 331 Read CPUCFG register. 332 333 @param Index Specifies the register number of the CPUCFG to read the data. 334 @param Data A pointer to the variable used to store the CPUCFG register value. 335 **/ 336 VOID 337 AsmCpucfg ( 338 IN UINT32 Index, 339 OUT UINT32 *Data 340 ); 341 342 /** 343 Gets the timer count value. 344 345 @param[] VOID 346 @retval timer count value. 347 348 **/ 349 UINTN 350 AsmReadStableCounter ( 351 VOID 352 ); 353 354 /** 355 CSR read operation. 356 357 @param[in] Select CSR read instruction select values. 358 359 @return The return value of csrrd instruction, return -1 means no CSR instruction 360 is found. 361 **/ 362 UINTN 363 CsrRead ( 364 IN UINT16 Select 365 ); 366 367 /** 368 CSR write operation. 369 370 @param[in] Select CSR write instruction select values. 371 @param[in] Value The csrwr will write the value. 372 373 @return The return value of csrwr instruction, that is, store the old value of 374 the register, return -1 means no CSR instruction is found. 375 **/ 376 UINTN 377 CsrWrite ( 378 IN UINT16 Select, 379 IN UINTN Value 380 ); 381 382 /** 383 CSR exchange operation. 384 385 @param[in] Select CSR exchange instruction select values. 386 @param[in] Value The csrxchg will write the value. 387 @param[in] Mask The csrxchg mask value. 388 389 @return The return value of csrxchg instruction, that is, store the old value of 390 the register, return -1 means no CSR instruction is found. 391 **/ 392 UINTN 393 CsrXChg ( 394 IN UINT16 Select, 395 IN UINTN Value, 396 IN UINTN Mask 397 ); 398 399 /** 400 IO CSR read byte operation. 401 402 @param[in] Select IO CSR read instruction select values. 403 404 @return The return value of iocsrrd.b instruction. 405 406 **/ 407 UINT8 408 IoCsrRead8 ( 409 IN UINTN Select 410 ); 411 412 /** 413 IO CSR read half word operation. 414 415 @param[in] Select IO CSR read instruction select values. 416 417 @return The return value of iocsrrd.h instruction. 418 419 **/ 420 UINT16 421 IoCsrRead16 ( 422 IN UINTN Select 423 ); 424 425 /** 426 IO CSR read word operation. 427 428 @param[in] Select IO CSR read instruction select values. 429 430 @return The return value of iocsrrd.w instruction. 431 432 **/ 433 UINT32 434 IoCsrRead32 ( 435 IN UINTN Select 436 ); 437 438 /** 439 IO CSR read double word operation. Only for LoongArch64. 440 441 @param[in] Select IO CSR read instruction select values. 442 443 @return The return value of iocsrrd.d instruction. 444 445 **/ 446 UINT64 447 IoCsrRead64 ( 448 IN UINTN Select 449 ); 450 451 /** 452 IO CSR write byte operation. 453 454 @param[in] Select IO CSR write instruction select values. 455 @param[in] Value The iocsrwr.b will write the value. 456 457 @return VOID. 458 459 **/ 460 VOID 461 IoCsrWrite8 ( 462 IN UINTN Select, 463 IN UINT8 Value 464 ); 465 466 /** 467 IO CSR write half word operation. 468 469 @param[in] Select IO CSR write instruction select values. 470 @param[in] Value The iocsrwr.h will write the value. 471 472 @return VOID. 473 474 **/ 475 VOID 476 IoCsrWrite16 ( 477 IN UINTN Select, 478 IN UINT16 Value 479 ); 480 481 /** 482 IO CSR write word operation. 483 484 @param[in] Select IO CSR write instruction select values. 485 @param[in] Value The iocsrwr.w will write the value. 486 487 @return VOID. 488 489 **/ 490 VOID 491 IoCsrWrite32 ( 492 IN UINTN Select, 493 IN UINT32 Value 494 ); 495 496 /** 497 IO CSR write double word operation. Only for LoongArch64. 498 499 @param[in] Select IO CSR write instruction select values. 500 @param[in] Value The iocsrwr.d will write the value. 501 502 @return VOID. 503 504 **/ 505 VOID 506 IoCsrWrite64 ( 507 IN UINTN Select, 508 IN UINT64 Value 509 ); 510 232 511 #endif // defined (MDE_CPU_LOONGARCH64) 233 512 … … 4599 4878 IN UINT16 InitialValue 4600 4879 ); 4880 4881 // 4882 // Initial value for the CRC16-ANSI algorithm, when no prior checksum has been calculated. 4883 // 4884 #define CRC16ANSI_INIT 0xffff 4601 4885 4602 4886 /** … … 7593 7877 ); 7594 7878 7879 /// 7880 /// The structure used to supply and return data to and from the SVSM. 7881 /// 7882 typedef struct { 7883 VOID *Caa; 7884 UINT64 RaxIn; 7885 UINT64 RcxIn; 7886 UINT64 RdxIn; 7887 UINT64 R8In; 7888 UINT64 R9In; 7889 UINT64 RaxOut; 7890 UINT64 RcxOut; 7891 UINT64 RdxOut; 7892 UINT64 R8Out; 7893 UINT64 R9Out; 7894 UINT8 *CallPending; 7895 } SVSM_CALL_DATA; 7896 7897 /** 7898 Executes a VMGEXIT instruction (VMMCALL with a REP prefix) with arguments 7899 and return code 7900 7901 Executes a VMGEXIT instruction placing the specified arguments in the 7902 corresponding registers before invocation. Upon return an XCHG is done to 7903 atomically clear and retrieve the SVSM call pending value. The returned RAX 7904 register value becomes the function return code. This function is intended 7905 for use with an SVSM. This function is only available on IA-32 and x64. 7906 7907 @param[in,out] SvsmCallPending Pointer to the location of the SVSM call data 7908 7909 @return Value of the RAX register on return 7910 7911 **/ 7912 UINT32 7913 EFIAPI 7914 AsmVmgExitSvsm ( 7915 IN OUT SVSM_CALL_DATA *SvsmCallData 7916 ); 7917 7595 7918 /** 7596 7919 Patch the immediate operand of an IA32 or X64 instruction such that the byte,
Note:
See TracChangeset
for help on using the changeset viewer.