summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Green <evgreen@chromium.org>2021-08-11 09:59:55 -0700
committerCommit Bot <commit-bot@chromium.org>2021-08-12 21:37:38 +0000
commit5a4e00419e645148b80e000793f25abd9c80674f (patch)
treed878508a5fcf247ff644a3feb0fcc287031a0ea1
parent51879dc24aea94851fc28ffc2f68cba1b58f3db8 (diff)
downloadvboot-5a4e00419e645148b80e000793f25abd9c80674f.tar.gz
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 <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3088839 Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r--cgpt/cgpt_common.c2
-rw-r--r--firmware/include/gpt.h2
2 files changed, 4 insertions, 0 deletions
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