diff options
author | Peter Jones <pjones@redhat.com> | 2017-09-13 18:05:25 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2017-09-20 10:20:19 +0200 |
commit | ff98cb90514d9b787ddc097c203ac8db2941efe1 (patch) | |
tree | 18c1894c6eb53cd60889d6044a87f9b1f81a8afe /include/blk.h | |
parent | 0d6ab32e3712fe7bc2e3aaf3d93e0d5910264df3 (diff) | |
download | u-boot-ff98cb90514d9b787ddc097c203ac8db2941efe1.tar.gz |
part: extract MBR signature from partitions
EFI client programs need the signature information from the partition
table to determine the disk a partition is on, so we need to fill that
in here.
Signed-off-by: Peter Jones <pjones@redhat.com>
[separated from efi_loader part, and fixed build-errors for non-
CONFIG_EFI_PARTITION case]
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/blk.h')
-rw-r--r-- | include/blk.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/blk.h b/include/blk.h index 1965812a9d..41b4d7efa8 100644 --- a/include/blk.h +++ b/include/blk.h @@ -8,6 +8,8 @@ #ifndef BLK_H #define BLK_H +#include <efi.h> + #ifdef CONFIG_SYS_64BIT_LBA typedef uint64_t lbaint_t; #define LBAFlength "ll" @@ -41,6 +43,17 @@ enum if_type { #define BLK_REV_SIZE 8 /* + * Identifies the partition table type (ie. MBR vs GPT GUID) signature + */ +enum sig_type { + SIG_TYPE_NONE, + SIG_TYPE_MBR, + SIG_TYPE_GUID, + + SIG_TYPE_COUNT /* Number of signature types */ +}; + +/* * With driver model (CONFIG_BLK) this is uclass platform data, accessible * with dev_get_uclass_platdata(dev) */ @@ -67,6 +80,11 @@ struct blk_desc { char vendor[BLK_VEN_SIZE + 1]; /* device vendor string */ char product[BLK_PRD_SIZE + 1]; /* device product number */ char revision[BLK_REV_SIZE + 1]; /* firmware revision */ + enum sig_type sig_type; /* Partition table signature type */ + union { + uint32_t mbr_sig; /* MBR integer signature */ + efi_guid_t guid_sig; /* GPT GUID Signature */ + }; #if CONFIG_IS_ENABLED(BLK) /* * For now we have a few functions which take struct blk_desc as a |