EFI GUID Partition Table support
PATCH 1/1 EFI GUID Partition Table support
Attached is my patch (against 2.4.0-test9) to add EFI GUID Partition Table support to the Linux kernel, specifically for IA-64. This code is licensed under the GPL.
To enable support, add CONFIG_EFI_PARTITION=y to your config files.
Special thanks to Andries Brouwer for his assistance in helping me to understand the kernel block device layer.
Please direct any feedback you have with about code to me.
Thanks,
Matt Domsch
Dell Enterprise Systems Group
Linux Development Team
<<linux-2.4.0-test9-efigpt-001025.patch>>
Documentation/Configure.help +6 -0
@@ -11279,6 +11279,12 @@ Say Y here if you would like to be able to read the hard disk partition table format used by SGI machines. +Intel EFI GUID partition support +CONFIG_EFI_PARTITION + Say Y here if you would like to use hard disks under Linux which + were partitioned using EFI GPT. Presently only useful on the + IA-64 platform. + ADFS file system support (EXPERIMENTAL) CONFIG_ADFS_FS The Acorn Disc Filing System is the standard file system of the
fs/partitions/Config.in +1 -0
@@ -23,6 +23,7 @@ bool ' BSD disklabel (FreeBSD partition tables) support' CONFIG_BSD_DISKLABEL bool ' Solaris (x86) partition table support' CONFIG_SOLARIS_X86_PARTITION bool ' Unixware slices support' CONFIG_UNIXWARE_DISKLABEL + bool ' EFI GUID Partition support' CONFIG_EFI_PARTITION fi bool ' SGI partition support' CONFIG_SGI_PARTITION bool ' Ultrix partition table support' CONFIG_ULTRIX_PARTITION
fs/partitions/Makefile +1 -0
@@ -20,6 +20,7 @@ obj-$(CONFIG_SUN_PARTITION) += sun.o obj-$(CONFIG_ULTRIX_PARTITION) += ultrix.o obj-$(CONFIG_IBM_PARTITION) += ibm.o +obj-$(CONFIG_EFI_PARTITION) += efi.o O_OBJS += $(obj-y) M_OBJS += $(obj-m)
fs/partitions/check.c +4 -0
@@ -32,6 +32,7 @@#include "sun.h" #include "ibm.h" #include "ultrix.h" +#include "efi.h" extern void device_init (void );extern int *blk_size[];
@@ -71,6 +72,9 @@#endif #ifdef CONFIG_IBM_PARTITION ibm_partition, +#endif +#ifdef CONFIG_EFI_PARTITION + efi_partition, #endifNULL };
fs/partitions/efi.c +646 -0
646 lines not on this page · raw message
fs/partitions/efi.h +154 -0
154 lines not on this page · raw message
fs/partitions/msdos.c +14 -0
@@ -36,6 +36,10 @@#include "check.h" #include "msdos.h" +#ifdef CONFIG_EFI_PARTITION +#include "efi.h" +#endif +#if CONFIG_BLK_DEV_MD &&CONFIG_AUTODETECT_RAID extern void md_autodetect_dev (kdev_t dev);#endif
@@ -378,6 +382,16 @@bforget (bh);return 0 ; } +#ifdef CONFIG_EFI_PARTITION + p = (struct partition *) (0x1be + data); +for (i=1 ; i<=4 ; i++,p++) { +/* If this is an EFI GPT disk, msdos should ignore it. */ +if (SYS_IND (p) ==EFI_PMBR_OSTYPE_EFI_GPT ) { +bforget (bh); +return 0 ; + } + } +#endif p = (struct partition *) (0x1be + data);#ifdef CONFIG_BLK_DEV_IDE