From 0d88d54f987fa0e464177febbc04c93257a17b40 Mon Sep 17 00:00:00 2001 From: kavsrf Date: Sat, 28 Jan 2017 14:12:08 +0300 Subject: full disk encryption support --- Include/Library/CommonLib.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'Include') diff --git a/Include/Library/CommonLib.h b/Include/Library/CommonLib.h index 950406f..98e93db 100644 --- a/Include/Library/CommonLib.h +++ b/Include/Library/CommonLib.h @@ -21,6 +21,7 @@ https://opensource.org/licenses/LGPL-3.0 #include #include #include +#include ////////////////////////////////////////////////////////////////////////// // Check error @@ -136,6 +137,42 @@ EfiFindPartByGUID( OUT EFI_HANDLE* h ); +////////////////////////////////////////////////////////////////////////// +// GPT +////////////////////////////////////////////////////////////////////////// + +BOOLEAN +GptHeaderCheckCrc( + IN UINTN MaxSize, + IN OUT EFI_TABLE_HEADER *Hdr + ); + +EFI_STATUS +GptCheckEntryArray( + IN EFI_PARTITION_TABLE_HEADER *PartHeader, + IN EFI_PARTITION_ENTRY *Entrys + ); + +EFI_STATUS +GptUpdateCRC( + IN EFI_PARTITION_TABLE_HEADER *PartHeader, + IN EFI_PARTITION_ENTRY *Entrys + ); + +EFI_STATUS +GptReadEntryArray( + IN EFI_BLOCK_IO_PROTOCOL* BlockIo, + IN EFI_PARTITION_TABLE_HEADER *PartHeader, + OUT EFI_PARTITION_ENTRY **Entrys + ); + +EFI_STATUS +GptReadHeader( + IN EFI_BLOCK_IO_PROTOCOL* BlockIo, + IN EFI_LBA HeaderLba, + OUT EFI_PARTITION_TABLE_HEADER **PartHeader + ); + ////////////////////////////////////////////////////////////////////////// // Bluetooth ////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3