summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-10-01 15:55:22 +0100
committerMark Brown <broonie@kernel.org>2026-10-01 15:55:22 +0100
commit070d18a6be3563488b1249aa1a6fa2a68807189b (patch)
treeb2879598f2c8dcfaacf922d09cb6ce262003cde4 /include
parent4d61264496d55fd920ac4361d70371b070f8e0eb (diff)
parent7eef16311a234b5d77c1493e19c6538a3aa1a203 (diff)
downloadlinux-next-070d18a6be3563488b1249aa1a6fa2a68807189b.tar.gz
linux-next-070d18a6be3563488b1249aa1a6fa2a68807189b.zip
Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
Diffstat (limited to 'include')
-rw-r--r--include/linux/efi.h23
-rw-r--r--include/linux/ucs2_string.h11
2 files changed, 33 insertions, 1 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index aa15ff88539b..ecb34be37a87 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -957,6 +957,17 @@ extern int efi_status_to_err(efi_status_t status);
#define EFI_DEV_END_INSTANCE 0x01
#define EFI_DEV_END_ENTIRE 0xFF
+enum efi_hd_partition_format {
+ EFI_HD_PARTITION_FORMAT_MBR = 1,
+ EFI_HD_PARTITION_FORMAT_GPT,
+};
+
+enum efi_hd_signature_type {
+ EFI_HD_SIGNATURE_TYPE_NONE,
+ EFI_HD_SIGNATURE_TYPE_MBR,
+ EFI_HD_SIGNATURE_TYPE_GUID,
+};
+
struct efi_generic_dev_path {
u8 type;
u8 sub_type;
@@ -988,6 +999,16 @@ struct efi_rel_offset_dev_path {
u64 ending_offset;
} __packed;
+struct efi_hd_dev_path {
+ struct efi_generic_dev_path header;
+ u32 partition_number;
+ u64 partition_start;
+ u64 partition_size;
+ efi_guid_t signature;
+ u8 partition_format;
+ u8 signature_type;
+} __packed;
+
struct efi_mem_mapped_dev_path {
struct efi_generic_dev_path header;
u32 memory_type;
@@ -1007,6 +1028,7 @@ struct efi_dev_path {
struct efi_pci_dev_path pci;
struct efi_vendor_dev_path vendor;
struct efi_rel_offset_dev_path rel_offset;
+ struct efi_hd_dev_path hd;
};
} __packed;
@@ -1109,6 +1131,7 @@ extern void efi_call_virt_check_flags(unsigned long flags, const void *caller);
extern unsigned long efi_call_virt_save_flags(void);
void efi_runtime_assert_lock_held(void);
+efi_status_t efi_runtime_set_enable_flag(bool enable);
enum efi_secureboot_mode {
efi_secureboot_mode_unset,
diff --git a/include/linux/ucs2_string.h b/include/linux/ucs2_string.h
index c499ae809c7d..74f23ca5a967 100644
--- a/include/linux/ucs2_string.h
+++ b/include/linux/ucs2_string.h
@@ -14,7 +14,16 @@ ssize_t ucs2_strscpy(ucs2_char_t *dst, const ucs2_char_t *src, size_t count);
int ucs2_strncmp(const ucs2_char_t *a, const ucs2_char_t *b, size_t len);
unsigned long ucs2_utf8size(const ucs2_char_t *src);
+unsigned long
+ucs2_as_utf8_l(u8 *dest, const ucs2_char_t *src, unsigned long limit,
+ unsigned long maxlength);
+
+static inline
unsigned long ucs2_as_utf8(u8 *dest, const ucs2_char_t *src,
- unsigned long maxlength);
+ unsigned long maxlength)
+{
+ return ucs2_as_utf8_l(dest, src, ucs2_strnlen(src, maxlength),
+ maxlength);
+}
#endif /* _LINUX_UCS2_STRING_H_ */