소스 검색

[efi] Add basic EFI SAN booting capability

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 년 전
부모
커밋
fd95c780b6
5개의 변경된 파일1097개의 추가작업 그리고 1개의 파일을 삭제
  1. 6
    1
      src/config/defaults/efi.h
  2. 27
    0
      src/include/ipxe/efi/efi_block.h
  3. 1
    0
      src/include/ipxe/errfile.h
  4. 1
    0
      src/include/ipxe/sanboot.h
  5. 1062
    0
      src/interface/efi/efi_block.c

+ 6
- 1
src/config/defaults/efi.h 파일 보기

@@ -16,7 +16,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
16 16
 #define TIMER_EFI
17 17
 #define UMALLOC_EFI
18 18
 #define SMBIOS_EFI
19
-#define SANBOOT_NULL
19
+#define SANBOOT_EFI
20 20
 #define BOFM_EFI
21 21
 #define ENTROPY_EFI
22 22
 #define TIME_EFI
@@ -27,6 +27,11 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
27 27
 #define	IMAGE_EFI		/* EFI image support */
28 28
 #define	IMAGE_SCRIPT		/* iPXE script image support */
29 29
 
30
+#define	SANBOOT_PROTO_ISCSI	/* iSCSI protocol */
31
+#define	SANBOOT_PROTO_AOE	/* AoE protocol */
32
+#define	SANBOOT_PROTO_IB_SRP	/* Infiniband SCSI RDMA protocol */
33
+#define	SANBOOT_PROTO_FCP	/* Fibre Channel protocol */
34
+
30 35
 #define	USB_HCD_XHCI		/* xHCI USB host controller */
31 36
 #define	USB_HCD_EHCI		/* EHCI USB host controller */
32 37
 #define	USB_HCD_UHCI		/* UHCI USB host controller */

+ 27
- 0
src/include/ipxe/efi/efi_block.h 파일 보기

@@ -0,0 +1,27 @@
1
+#ifndef _IPXE_EFI_BLOCK_H
2
+#define _IPXE_EFI_BLOCK_H
3
+
4
+/** @block
5
+ *
6
+ * EFI block device protocols
7
+ *
8
+ */
9
+
10
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11
+
12
+#ifdef SANBOOT_EFI
13
+#define SANBOOT_PREFIX_efi
14
+#else
15
+#define SANBOOT_PREFIX_efi __efi_
16
+#endif
17
+
18
+static inline __always_inline unsigned int
19
+SANBOOT_INLINE ( efi, san_default_drive ) ( void ) {
20
+	/* Drive numbers don't exist as a concept under EFI.  We
21
+	 * arbitarily choose to use drive 0x80 to minimise differences
22
+	 * with a standard BIOS.
23
+	 */
24
+	return 0x80;
25
+}
26
+
27
+#endif /* _IPXE_EFI_BLOCK_H */

+ 1
- 0
src/include/ipxe/errfile.h 파일 보기

@@ -71,6 +71,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
71 71
 #define ERRFILE_fault		       ( ERRFILE_CORE | 0x001f0000 )
72 72
 #define ERRFILE_blocktrans	       ( ERRFILE_CORE | 0x00200000 )
73 73
 #define ERRFILE_pixbuf		       ( ERRFILE_CORE | 0x00210000 )
74
+#define ERRFILE_efi_block	       ( ERRFILE_CORE | 0x00220000 )
74 75
 
75 76
 #define ERRFILE_eisa		     ( ERRFILE_DRIVER | 0x00000000 )
76 77
 #define ERRFILE_isa		     ( ERRFILE_DRIVER | 0x00010000 )

+ 1
- 0
src/include/ipxe/sanboot.h 파일 보기

@@ -54,6 +54,7 @@ struct uri;
54 54
 
55 55
 /* Include all architecture-independent sanboot API headers */
56 56
 #include <ipxe/null_sanboot.h>
57
+#include <ipxe/efi/efi_block.h>
57 58
 
58 59
 /* Include all architecture-dependent sanboot API headers */
59 60
 #include <bits/sanboot.h>

+ 1062
- 0
src/interface/efi/efi_block.c
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


Loading…
취소
저장