From 5a4e00419e645148b80e000793f25abd9c80674f Mon Sep 17 00:00:00 2001 From: Evan Green Date: Wed, 11 Aug 2021 09:59:55 -0700 Subject: vboot_reference: Add GPT GUID for hibernate Add a known partition type guid for hibernate partitions, so that they can be uniquely distinguished from other data partitions. BUG=b:196224292 TEST=build volteer with disk_layout_v4 BRANCH=main Change-Id: I62d969671ee1f80388c2c0cc5982051f5cb1bd0c Signed-off-by: Evan Green Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3088839 Reviewed-by: Julius Werner --- cgpt/cgpt_common.c | 2 ++ firmware/include/gpt.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cgpt/cgpt_common.c b/cgpt/cgpt_common.c index 932e81f1..2f888fdd 100644 --- a/cgpt/cgpt_common.c +++ b/cgpt/cgpt_common.c @@ -673,6 +673,7 @@ const Guid guid_chromeos_reserved = GPT_ENT_TYPE_CHROMEOS_RESERVED; const Guid guid_efi = GPT_ENT_TYPE_EFI; const Guid guid_unused = GPT_ENT_TYPE_UNUSED; const Guid guid_chromeos_minios = GPT_ENT_TYPE_CHROMEOS_MINIOS; +const Guid guid_chromeos_hibernate = GPT_ENT_TYPE_CHROMEOS_HIBERNATE; const static struct { const Guid *type; @@ -688,6 +689,7 @@ const static struct { {&guid_efi, "efi", "EFI System Partition"}, {&guid_unused, "unused", "Unused (nonexistent) partition"}, {&guid_chromeos_minios, "minios", "ChromeOS miniOS"}, + {&guid_chromeos_hibernate, "hibernate", "ChromeOS hibernate"}, }; /* Resolves human-readable GPT type. diff --git a/firmware/include/gpt.h b/firmware/include/gpt.h index 133a9087..9f50509c 100644 --- a/firmware/include/gpt.h +++ b/firmware/include/gpt.h @@ -55,6 +55,8 @@ extern "C" { {{{0x0fc63daf,0x8483,0x4772,0x8e,0x79,{0x3d,0x69,0xd8,0x47,0x7d,0xe4}}}} #define GPT_ENT_TYPE_CHROMEOS_MINIOS \ {{{0x09845860,0x705f,0x4bb5,0xb1,0x6c,{0x8a,0x8a,0x09,0x9c,0xaf,0x52}}}} +#define GPT_ENT_TYPE_CHROMEOS_HIBERNATE \ + {{{0x3f0f8318,0xf146,0x4e6b,0x82,0x22,{0xc2,0x8c,0x8f,0x02,0xe0,0xd5}}}} #define UUID_NODE_LEN 6 #define GUID_SIZE 16 -- cgit v1.2.1