Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1467514

Re: [PATCH 0/6] Apple device properties

From Lukas Wunner <lukas@wunner.de>
Newsgroups linux.kernel
Subject Re: [PATCH 0/6] Apple device properties
Date 2016-08-22 12:00 +0200
Message-ID <s8Ubo-4CV-3@gated-at.bofh.it> (permalink)
References (1 earlier) <s2shQ-28W-13@gated-at.bofh.it> <s4fq9-8bw-1@gated-at.bofh.it> <s6oIG-56q-13@gated-at.bofh.it> <s6sMi-7O9-33@gated-at.bofh.it> <s7Gka-6XF-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Aug 18, 2016 at 09:34:33PM +0100, Matt Fleming wrote:
> On Mon, 15 Aug, at 06:13:58PM, Lukas Wunner wrote:
> > But I would like to understand the "cannot jump through pointers at
> > runtime" argument because the binary code looks to me like it should
> > work on 32 bit. I guess I must be missing something obvious?
> 
> Ah no, I forgot that efi_boot_services_{32,64}_t doesn't contain
> pointers - it contains u32/u64 objects. So yeah, your patch looks
> fine.
> 
> It does trigger the following warnings when building for i386 though,
> 
> In file included from /dev/shm/mfleming/git/efi/drivers/firmware/efi/libstub/efi-stub-helper.c:14:0:
> /dev/shm/mfleming/git/efi/drivers/firmware/efi/libstub/efi-stub-helper.c: In function ???efi_get_memory_map???:
> /dev/shm/mfleming/git/efi/arch/x86/include/asm/efi.h:205:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>   ((efi_boot_services_64_t *)__efi_early()->boot_services)->f : \
>    ^

Right, sorry, I didn't compile-test that version on x86_32.

I'm sending out a new version now which compiles cleanly in all three
cases (x86_32, x86_64 with and without mixed-mode), works fine on my
64-bit EFI and the 32-bit code at least *looks* okay when disassembled.

By the way, arch/x86/Kconfig says that "it is not possible to boot a
mixed-mode enabled kernel via the EFI boot stub - a bootloader that
supports the EFI handover protocol must be used".

Is this still correct? With all the mixed-mode support in head_64.S
and eboot.c, I'm wondering what's missing?

Thanks,

Lukas

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 0/6] Apple device properties Matt Fleming <matt@codeblueprint.co.uk> - 2016-08-15 14:00 +0200
  Re: [PATCH 0/6] Apple device properties Lukas Wunner <lukas@wunner.de> - 2016-08-15 18:20 +0200
    Re: [PATCH 0/6] Apple device properties Matt Fleming <matt@codeblueprint.co.uk> - 2016-08-19 03:00 +0200
      Re: [PATCH 0/6] Apple device properties Lukas Wunner <lukas@wunner.de> - 2016-08-22 12:00 +0200
        Re: [PATCH 0/6] Apple device properties Matt Fleming <matt@codeblueprint.co.uk> - 2016-08-24 22:00 +0200

csiph-web