commit
91391dc52b
86 changed files with 1935 additions and 1034 deletions
|
@ -23,6 +23,10 @@
|
|||
|
||||
#define GRUB_ARM64_LINUX_MAGIC 0x644d5241 /* 'ARM\x64' */
|
||||
|
||||
#define GRUB_EFI_PAGE_SHIFT 12
|
||||
#define BYTES_TO_PAGES(bytes) (((bytes) + 0xfff) >> GRUB_EFI_PAGE_SHIFT)
|
||||
#define GRUB_EFI_PE_MAGIC 0x5A4D
|
||||
|
||||
/* From linux/Documentation/arm64/booting.txt */
|
||||
struct grub_arm64_linux_kernel_header
|
||||
{
|
||||
|
@ -38,4 +42,11 @@ struct grub_arm64_linux_kernel_header
|
|||
grub_uint32_t hdr_offset; /* Offset of PE/COFF header */
|
||||
};
|
||||
|
||||
/* Declare the functions for getting dtb and checking/booting image */
|
||||
void *grub_linux_get_fdt (void);
|
||||
grub_err_t grub_arm64_uefi_check_image (struct grub_arm64_linux_kernel_header
|
||||
*lh);
|
||||
grub_err_t grub_arm64_uefi_boot_image (grub_addr_t addr, grub_size_t size,
|
||||
char *args);
|
||||
|
||||
#endif /* ! GRUB_LINUX_CPU_HEADER */
|
||||
|
|
|
@ -115,11 +115,36 @@ void *
|
|||
EXPORT_FUNC (__aeabi_memcpy) (void *dest, const void *src, grub_size_t n);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE___AEABI_MEMCPY4
|
||||
void *
|
||||
EXPORT_FUNC (__aeabi_memcpy4) (void *dest, const void *src, grub_size_t n);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE___AEABI_MEMCPY8
|
||||
void *
|
||||
EXPORT_FUNC (__aeabi_memcpy8) (void *dest, const void *src, grub_size_t n);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE___AEABI_MEMSET
|
||||
void *
|
||||
EXPORT_FUNC(__aeabi_memset) (void *s, int c, grub_size_t n);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE___AEABI_MEMCLR
|
||||
void *
|
||||
EXPORT_FUNC(__aeabi_memclr) (void *s, grub_size_t n);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE___AEABI_MEMCLR4
|
||||
void *
|
||||
EXPORT_FUNC(__aeabi_memclr4) (void *s, grub_size_t n);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE___AEABI_MEMCLR8
|
||||
void *
|
||||
EXPORT_FUNC(__aeabi_memclr8) (void *s, grub_size_t n);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE___AEABI_LASR
|
||||
grub_uint64_t
|
||||
EXPORT_FUNC (__aeabi_lasr) (grub_uint64_t u, int b);
|
||||
|
|
|
@ -88,7 +88,14 @@ EXPORT_FUNC (__aeabi_lmul) (grub_uint64_t a, grub_uint64_t b);
|
|||
void *
|
||||
EXPORT_FUNC (__aeabi_memcpy) (void *dest, const void *src, grub_size_t n);
|
||||
void *
|
||||
EXPORT_FUNC (__aeabi_memcpy4) (void *dest, const void *src, grub_size_t n);
|
||||
void *
|
||||
EXPORT_FUNC (__aeabi_memcpy8) (void *dest, const void *src, grub_size_t n);
|
||||
void *
|
||||
EXPORT_FUNC(__aeabi_memset) (void *s, int c, grub_size_t n);
|
||||
void EXPORT_FUNC(__aeabi_memclr) (void *s, grub_size_t n);
|
||||
void EXPORT_FUNC(__aeabi_memclr4) (void *s, grub_size_t n);
|
||||
void EXPORT_FUNC(__aeabi_memclr8) (void *s, grub_size_t n);
|
||||
|
||||
grub_uint64_t
|
||||
EXPORT_FUNC (__aeabi_lasr) (grub_uint64_t u, int b);
|
||||
|
|
|
@ -172,7 +172,7 @@ grub_diskfilter_unregister (grub_diskfilter_t diskfilter)
|
|||
|
||||
struct grub_diskfilter_vg *
|
||||
grub_diskfilter_make_raid (grub_size_t uuidlen, char *uuid, int nmemb,
|
||||
char *name, grub_uint64_t disk_size,
|
||||
const char *name, grub_uint64_t disk_size,
|
||||
grub_uint64_t stripe_size,
|
||||
int layout, int level);
|
||||
|
||||
|
|
|
@ -1501,17 +1501,31 @@ enum
|
|||
GRUB_EFI_NETWORK_INITIALIZED,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
GRUB_EFI_SIMPLE_NETWORK_RECEIVE_UNICAST = 0x01,
|
||||
GRUB_EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST = 0x02,
|
||||
GRUB_EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST = 0x04,
|
||||
GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS = 0x08,
|
||||
GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST = 0x10,
|
||||
};
|
||||
|
||||
struct grub_efi_simple_network
|
||||
{
|
||||
grub_uint64_t revision;
|
||||
grub_efi_status_t (*start) (struct grub_efi_simple_network *this);
|
||||
void (*stop) (void);
|
||||
grub_efi_status_t (*stop) (struct grub_efi_simple_network *this);
|
||||
grub_efi_status_t (*initialize) (struct grub_efi_simple_network *this,
|
||||
grub_efi_uintn_t extra_rx,
|
||||
grub_efi_uintn_t extra_tx);
|
||||
void (*reset) (void);
|
||||
void (*shutdown) (void);
|
||||
void (*receive_filters) (void);
|
||||
grub_efi_status_t (*shutdown) (struct grub_efi_simple_network *this);
|
||||
grub_efi_status_t (*receive_filters) (struct grub_efi_simple_network *this,
|
||||
grub_uint32_t enable,
|
||||
grub_uint32_t disable,
|
||||
grub_efi_boolean_t reset_mcast_filter,
|
||||
grub_efi_uintn_t mcast_filter_count,
|
||||
grub_efi_mac_address_t *mcast_filter);
|
||||
void (*station_address) (void);
|
||||
void (*statistics) (void);
|
||||
void (*mcastiptomac) (void);
|
||||
|
|
|
@ -56,6 +56,10 @@ void EXPORT_FUNC(grub_efi_print_device_path) (grub_efi_device_path_t *dp);
|
|||
char *EXPORT_FUNC(grub_efi_get_filename) (grub_efi_device_path_t *dp);
|
||||
grub_efi_device_path_t *
|
||||
EXPORT_FUNC(grub_efi_get_device_path) (grub_efi_handle_t handle);
|
||||
grub_efi_device_path_t *
|
||||
EXPORT_FUNC(grub_efi_find_last_device_path) (const grub_efi_device_path_t *dp);
|
||||
grub_efi_device_path_t *
|
||||
EXPORT_FUNC(grub_efi_duplicate_device_path) (const grub_efi_device_path_t *dp);
|
||||
grub_err_t EXPORT_FUNC (grub_efi_finish_boot_services) (grub_efi_uintn_t *outbuf_size, void *outbuf,
|
||||
grub_efi_uintn_t *map_key,
|
||||
grub_efi_uintn_t *efi_desc_size,
|
||||
|
|
|
@ -117,4 +117,16 @@ int grub_fdt_set_prop (void *fdt, unsigned int nodeoffset, const char *name,
|
|||
grub_fdt_set_prop ((fdt), (nodeoffset), (name), &_val, 8); \
|
||||
})
|
||||
|
||||
/* Setup "reg" property for
|
||||
* #address-cells = <0x2>
|
||||
* #size-cells = <0x2>
|
||||
*/
|
||||
#define grub_fdt_set_reg64(fdt, nodeoffset, addr, size) \
|
||||
({ \
|
||||
grub_uint64_t reg_64[2]; \
|
||||
reg_64[0] = grub_cpu_to_be64(addr); \
|
||||
reg_64[1] = grub_cpu_to_be64(size); \
|
||||
grub_fdt_set_prop ((fdt), (nodeoffset), "reg", reg_64, 16); \
|
||||
})
|
||||
|
||||
#endif /* ! GRUB_FDT_HEADER */
|
||||
|
|
|
@ -62,6 +62,17 @@ EXPORT_FUNC(grub_fshelp_find_file) (const char *path,
|
|||
enum grub_fshelp_filetype expect);
|
||||
|
||||
|
||||
grub_err_t
|
||||
EXPORT_FUNC(grub_fshelp_find_file_lookup) (const char *path,
|
||||
grub_fshelp_node_t rootnode,
|
||||
grub_fshelp_node_t *foundnode,
|
||||
grub_err_t (*lookup_file) (grub_fshelp_node_t dir,
|
||||
const char *name,
|
||||
grub_fshelp_node_t *foundnode,
|
||||
enum grub_fshelp_filetype *foundtype),
|
||||
char *(*read_symlink) (grub_fshelp_node_t node),
|
||||
enum grub_fshelp_filetype expect);
|
||||
|
||||
/* Read LEN bytes from the file NODE on disk DISK into the buffer BUF,
|
||||
beginning with the block POS. READ_HOOK should be set before
|
||||
reading a block from the file. GET_BLOCK is used to translate file
|
||||
|
|
|
@ -21,8 +21,4 @@
|
|||
|
||||
#include <grub/symbol.h>
|
||||
|
||||
#ifdef ASM_FILE
|
||||
#define mips_attributes .gnu_attribute 4, 3
|
||||
#endif
|
||||
|
||||
#endif /* ! GRUB_KERNEL_MACHINE_HEADER */
|
||||
|
|
|
@ -126,7 +126,7 @@ typedef struct zio_cksum {
|
|||
* +-------+-------+-------+-------+-------+-------+-------+-------+
|
||||
* 5 |G| offset3 |
|
||||
* +-------+-------+-------+-------+-------+-------+-------+-------+
|
||||
* 6 |BDX|lvl| type | cksum | comp | PSIZE | LSIZE |
|
||||
* 6 |BDX|lvl| type | cksum |E| comp| PSIZE | LSIZE |
|
||||
* +-------+-------+-------+-------+-------+-------+-------+-------+
|
||||
* 7 | padding |
|
||||
* +-------+-------+-------+-------+-------+-------+-------+-------+
|
||||
|
@ -160,7 +160,8 @@ typedef struct zio_cksum {
|
|||
* G gang block indicator
|
||||
* B byteorder (endianness)
|
||||
* D dedup
|
||||
* X unused
|
||||
* X encryption
|
||||
* E blkptr_t contains embedded data
|
||||
* lvl level of indirection
|
||||
* type DMU object type
|
||||
* phys birth txg of block allocation; zero if same as logical birth txg
|
||||
|
@ -203,8 +204,8 @@ typedef struct blkptr {
|
|||
#define BP_SET_LSIZE(bp, x) \
|
||||
BF64_SET_SB((bp)->blk_prop, 0, 16, SPA_MINBLOCKSHIFT, 1, x)
|
||||
|
||||
#define BP_GET_COMPRESS(bp) BF64_GET((bp)->blk_prop, 32, 8)
|
||||
#define BP_SET_COMPRESS(bp, x) BF64_SET((bp)->blk_prop, 32, 8, x)
|
||||
#define BP_GET_COMPRESS(bp) BF64_GET((bp)->blk_prop, 32, 7)
|
||||
#define BP_SET_COMPRESS(bp, x) BF64_SET((bp)->blk_prop, 32, 7, x)
|
||||
|
||||
#define BP_GET_CHECKSUM(bp) BF64_GET((bp)->blk_prop, 40, 8)
|
||||
#define BP_SET_CHECKSUM(bp, x) BF64_SET((bp)->blk_prop, 40, 8, x)
|
||||
|
@ -215,6 +216,8 @@ typedef struct blkptr {
|
|||
#define BP_GET_LEVEL(bp) BF64_GET((bp)->blk_prop, 56, 5)
|
||||
#define BP_SET_LEVEL(bp, x) BF64_SET((bp)->blk_prop, 56, 5, x)
|
||||
|
||||
#define BP_IS_EMBEDDED(bp) BF64_GET((bp)->blk_prop, 39, 1)
|
||||
|
||||
#define BP_GET_PROP_BIT_61(bp) BF64_GET((bp)->blk_prop, 61, 1)
|
||||
#define BP_SET_PROP_BIT_61(bp, x) BF64_SET((bp)->blk_prop, 61, 1, x)
|
||||
|
||||
|
@ -277,9 +280,27 @@ typedef struct blkptr {
|
|||
(zcp)->zc_word[3] = w3; \
|
||||
}
|
||||
|
||||
#define BPE_GET_ETYPE(bp) BP_GET_CHECKSUM(bp)
|
||||
#define BPE_GET_LSIZE(bp) \
|
||||
BF64_GET_SB((bp)->blk_prop, 0, 25, 0, 1)
|
||||
#define BPE_GET_PSIZE(bp) \
|
||||
BF64_GET_SB((bp)->blk_prop, 25, 7, 0, 1)
|
||||
|
||||
typedef enum bp_embedded_type {
|
||||
BP_EMBEDDED_TYPE_DATA,
|
||||
NUM_BP_EMBEDDED_TYPES
|
||||
} bp_embedded_type_t;
|
||||
|
||||
#define BPE_NUM_WORDS 14
|
||||
#define BPE_PAYLOAD_SIZE (BPE_NUM_WORDS * sizeof(grub_uint64_t))
|
||||
#define BPE_IS_PAYLOADWORD(bp, wp) \
|
||||
((wp) != &(bp)->blk_prop && (wp) != &(bp)->blk_birth)
|
||||
|
||||
#define BP_IDENTITY(bp) (&(bp)->blk_dva[0])
|
||||
#define BP_IS_GANG(bp) DVA_GET_GANG(BP_IDENTITY(bp))
|
||||
#define BP_IS_HOLE(bp) ((bp)->blk_birth == 0)
|
||||
#define DVA_IS_EMPTY(dva) ((dva)->dva_word[0] == 0ULL && \
|
||||
(dva)->dva_word[1] == 0ULL)
|
||||
#define BP_IS_HOLE(bp) DVA_IS_EMPTY(BP_IDENTITY(bp))
|
||||
|
||||
/* BP_IS_RAIDZ(bp) assumes no block compression */
|
||||
#define BP_IS_RAIDZ(bp) (DVA_GET_ASIZE(&(bp)->blk_dva[0]) > \
|
||||
|
|
|
@ -156,9 +156,6 @@ struct multiboot_header_tag_module_align
|
|||
multiboot_uint16_t type;
|
||||
multiboot_uint16_t flags;
|
||||
multiboot_uint32_t size;
|
||||
multiboot_uint32_t width;
|
||||
multiboot_uint32_t height;
|
||||
multiboot_uint32_t depth;
|
||||
};
|
||||
|
||||
struct multiboot_color
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue