grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Respect EFI block-io buffer alignment


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: Respect EFI block-io buffer alignment
Date: Wed, 17 Feb 2016 18:06:54 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0

On 17.02.2016 18:00, Andrei Borzenkov wrote:
> 17.02.2016 19:23, Vladimir 'φ-coder/phcoder' Serbinenko пишет:
>> On 17.02.2016 16:48, Leif Lindholm wrote:
>>> This resolves a complete failure to access devices connected to the
>>> SATA port on the ARM ltd. Juno platform (apart from a violation of the
>>> UEFI block io protocol).
>>>
>>> The below is a bit of a hack, but I'd like some feedback on preferred
>>> solution before over(or under)engineering something.
>>>
>>> As far as I can tell, a struct_disk is only ever allocated in
>>> kern/disk.c, using grub_zalloc(). So the only reason for the horrid
>>> ifdefs is that there is no grub_memalign for EMU.
>>>
>>> Do I:
>>> - Keep the ifdefs?
>>> - Implement grub_memalign() for EMU?
>> You could insipire by grub_osdep_dl_memalign
>>> - Something else?
>>>
>> The code as-is will not work. Buf is passed from external call to
>> grub_disk_read and grub_disk_read tries to read in-place whenever
>> possible. There are 2 cases in current codebase when we need a special
> 
> It can be changed to read into cache and copy in buf instead of read
> into buf and copy in cache.
> 
This is often not very good idea as you lose buffering as you split
transactions. This was a reason GRUB2 was slower than GRUB Legacy on
some systems until it was rewritten to current code.
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]