From a4f7d77f7dc929372728cae4d809f17fcf36b70e Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 19 Feb 2016 04:48:50 +0100 Subject: [PATCH] fs --- grub-core/kern/uboot/init.c | 16 ---------------- grub-core/kern/uboot/uboot.c | 35 ----------------------------------- 2 files changed, 51 deletions(-) diff --git a/grub-core/kern/uboot/init.c b/grub-core/kern/uboot/init.c index 5dcc106ed..3e338645c 100644 --- a/grub-core/kern/uboot/init.c +++ b/grub-core/kern/uboot/init.c @@ -36,30 +36,14 @@ extern char __bss_start[]; extern char _end[]; extern grub_size_t grub_total_module_size; -extern int (*grub_uboot_syscall_ptr) (int, int *, ...); static unsigned long timer_start; -extern grub_uint32_t grub_uboot_machine_type; -extern grub_addr_t grub_uboot_boot_data; - void grub_exit (void) { grub_uboot_return (0); } -grub_uint32_t -grub_uboot_get_machine_type (void) -{ - return grub_uboot_machine_type; -} - -grub_addr_t -grub_uboot_get_boot_data (void) -{ - return grub_uboot_boot_data; -} - static grub_uint64_t uboot_timer_ms (void) { diff --git a/grub-core/kern/uboot/uboot.c b/grub-core/kern/uboot/uboot.c index 6800a4beb..cf0168e62 100644 --- a/grub-core/kern/uboot/uboot.c +++ b/grub-core/kern/uboot/uboot.c @@ -39,48 +39,13 @@ * returns: 0 if the call not found, 1 if serviced */ -extern int (*grub_uboot_syscall_ptr) (int, int *, ...); extern int grub_uboot_syscall (int, int *, ...); -extern grub_addr_t grub_uboot_search_hint; static struct sys_info uboot_sys_info; static struct mem_region uboot_mem_info[5]; static struct device_info * devices; static int num_devices; -int -grub_uboot_api_init (void) -{ - struct api_signature *start, *end; - struct api_signature *p; - - if (grub_uboot_search_hint) - { - /* Extended search range to work around Trim Slice U-Boot issue */ - start = (struct api_signature *) ((grub_uboot_search_hint & ~0x000fffff) - - 0x00500000); - end = - (struct api_signature *) ((grub_addr_t) start + UBOOT_API_SEARCH_LEN - - API_SIG_MAGLEN + 0x00500000); - } - else - { - start = 0; - end = (struct api_signature *) (256 * 1024 * 1024); - } - - /* Structure alignment is (at least) 8 bytes */ - for (p = start; p < end; p = (void *) ((grub_addr_t) p + 8)) - { - if (grub_memcmp (&(p->magic), API_SIG_MAGIC, API_SIG_MAGLEN) == 0) - { - grub_uboot_syscall_ptr = p->syscall; - return p->version; - } - } - - return 0; -} /* * All functions below are wrappers around the grub_uboot_syscall() function -- 2.47.2