Skip to content

Commit

Permalink
[efi] Add basic EFI SAN booting capability
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Nov 16, 2016
1 parent 81fceae commit fd95c78
Show file tree
Hide file tree
Showing 5 changed files with 1,097 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/config/defaults/efi.h
Expand Up @@ -16,7 +16,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define TIMER_EFI
#define UMALLOC_EFI
#define SMBIOS_EFI
#define SANBOOT_NULL
#define SANBOOT_EFI
#define BOFM_EFI
#define ENTROPY_EFI
#define TIME_EFI
Expand All @@ -27,6 +27,11 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define IMAGE_EFI /* EFI image support */
#define IMAGE_SCRIPT /* iPXE script image support */

#define SANBOOT_PROTO_ISCSI /* iSCSI protocol */
#define SANBOOT_PROTO_AOE /* AoE protocol */
#define SANBOOT_PROTO_IB_SRP /* Infiniband SCSI RDMA protocol */
#define SANBOOT_PROTO_FCP /* Fibre Channel protocol */

#define USB_HCD_XHCI /* xHCI USB host controller */
#define USB_HCD_EHCI /* EHCI USB host controller */
#define USB_HCD_UHCI /* UHCI USB host controller */
Expand Down
27 changes: 27 additions & 0 deletions src/include/ipxe/efi/efi_block.h
@@ -0,0 +1,27 @@
#ifndef _IPXE_EFI_BLOCK_H
#define _IPXE_EFI_BLOCK_H

/** @block
*
* EFI block device protocols
*
*/

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );

#ifdef SANBOOT_EFI
#define SANBOOT_PREFIX_efi
#else
#define SANBOOT_PREFIX_efi __efi_
#endif

static inline __always_inline unsigned int
SANBOOT_INLINE ( efi, san_default_drive ) ( void ) {
/* Drive numbers don't exist as a concept under EFI. We
* arbitarily choose to use drive 0x80 to minimise differences
* with a standard BIOS.
*/
return 0x80;
}

#endif /* _IPXE_EFI_BLOCK_H */
1 change: 1 addition & 0 deletions src/include/ipxe/errfile.h
Expand Up @@ -71,6 +71,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define ERRFILE_fault ( ERRFILE_CORE | 0x001f0000 )
#define ERRFILE_blocktrans ( ERRFILE_CORE | 0x00200000 )
#define ERRFILE_pixbuf ( ERRFILE_CORE | 0x00210000 )
#define ERRFILE_efi_block ( ERRFILE_CORE | 0x00220000 )

#define ERRFILE_eisa ( ERRFILE_DRIVER | 0x00000000 )
#define ERRFILE_isa ( ERRFILE_DRIVER | 0x00010000 )
Expand Down
1 change: 1 addition & 0 deletions src/include/ipxe/sanboot.h
Expand Up @@ -54,6 +54,7 @@ struct uri;

/* Include all architecture-independent sanboot API headers */
#include <ipxe/null_sanboot.h>
#include <ipxe/efi/efi_block.h>

/* Include all architecture-dependent sanboot API headers */
#include <bits/sanboot.h>
Expand Down

0 comments on commit fd95c78

Please sign in to comment.