123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- /*++
- Copyright (c) 2014 Minoca Corp. All Rights Reserved
- Module Name:
- util.h
- Abstract:
- This header contains common utility definitions for the TI first stage
- loaders.
- Author:
- Evan Green 19-Dec-2014
- --*/
- //
- // ------------------------------------------------------------------- Includes
- //
- //
- // ---------------------------------------------------------------- Definitions
- //
- //
- // ------------------------------------------------------ Data Type Definitions
- //
- //
- // -------------------------------------------------------------------- Globals
- //
- //
- // -------------------------------------------------------- Function Prototypes
- //
- VOID
- EfipInitializeCrc32 (
- VOID *TableBuffer
- );
- /*++
- Routine Description:
- This routine initializes support for the early CRC32 support.
- Arguments:
- TableBuffer - Supplies a pointer to a region of memory that will be used to
- store the CRC32 table.
- Return Value:
- None.
- --*/
- UINT32
- EfipInitCalculateCrc32 (
- VOID *Buffer,
- UINTN DataSize
- );
- /*++
- Routine Description:
- This routine computes the CRC of the given buffer.
- Arguments:
- Buffer - Supplies a pointer to the buffer to CRC.
- DataSize - Supplies the number of bytes to CRC.
- Return Value:
- Returns the CRC of the buffer.
- --*/
- VOID
- EfipInitZeroMemory (
- VOID *Buffer,
- UINTN Size
- );
- /*++
- Routine Description:
- This routine zeroes memory.
- Arguments:
- Buffer - Supplies a pointer to the buffer to zero.
- Size - Supplies the number of bytes to zero.
- Return Value:
- None.
- --*/
- VOID
- EfipSerialPrintBuffer32 (
- CHAR8 *Title,
- VOID *Buffer,
- UINT32 Size
- );
- /*++
- Routine Description:
- This routine prints a buffer of 32-bit hex integers.
- Arguments:
- Title - Supplies an optional pointer to a string to title the buffer.
- Buffer - Supplies the buffer to print.
- Size - Supplies the size of the buffer. This is assumed to be divisible by
- 4.
- Return Value:
- None.
- --*/
- VOID
- EfipSerialPrintString (
- CHAR8 *String
- );
- /*++
- Routine Description:
- This routine prints a string to the serial console.
- Arguments:
- String - Supplies a pointer to the string to send.
- Return Value:
- None.
- --*/
- VOID
- EfipSerialPrintHexInteger (
- UINT32 Value
- );
- /*++
- Routine Description:
- This routine prints a hex integer to the console.
- Arguments:
- Value - Supplies the value to print.
- Return Value:
- None.
- --*/
- VOID
- EfipSerialPutCharacter (
- CHAR8 Character
- );
- /*++
- Routine Description:
- This routine prints a character to the serial console.
- Arguments:
- Character - Supplies the character to send.
- Return Value:
- None.
- --*/
|