[U-Boot] [PATCH] Fix some bugs in the EFI support

Anton Staaf robotboy at chromium.org
Tue Dec 6 19:50:14 CET 2011


On Fri, Dec 2, 2011 at 1:59 PM, Simon Glass <sjg at chromium.org> wrote:
> Hi Graeme,
>
> On Fri, Dec 2, 2011 at 1:28 PM, Graeme Russ <graeme.russ at gmail.com> wrote:
>> Hi Anton,
>>
>> On 30/11/11 10:39, Gabe Black wrote:
>>> The ALLOC_CACHE_ALIGN_BUFFER macro allocates a pointer to a buffer, and the
>>> address of the pointer and not the buffer was being passed to a function
>>> that expected the other. This change fixes a few places that bug crops up.
>>> Also, it provides a default definition for the CONFIG_SYS_CACHELINE_SIZE
>>> macro to avoid compiler errors.
>>>
>>> Signed-off-by: Gabe Black <gabeblack at chromium.org>
>>> ---
>>>  disk/part_efi.c |    8 ++++++--
>>>  1 files changed, 6 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/disk/part_efi.c b/disk/part_efi.c
>>> index e7f2714..c94d808 100644
>>> --- a/disk/part_efi.c
>>> +++ b/disk/part_efi.c
>>> @@ -37,6 +37,10 @@
>>>  #include "part_efi.h"
>>>  #include <linux/ctype.h>
>>>
>>> +#ifndef CONFIG_SYS_CACHELINE_SIZE
>>> +#define CONFIG_SYS_CACHELINE_SIZE __BIGGEST_ALIGNMENT__
>>> +#endif
>>> +
>>>  #if defined(CONFIG_CMD_IDE) || \
>>>      defined(CONFIG_CMD_MG_DISK) || \
>>>      defined(CONFIG_CMD_SATA) || \
>>> @@ -130,7 +134,7 @@ void print_part_efi(block_dev_desc_t * dev_desc)
>>>       }
>>>       /* This function validates AND fills in the GPT header and PTE */
>>>       if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA,
>>> -                      &(gpt_head), &gpt_pte) != 1) {
>>> +                      gpt_head, &gpt_pte) != 1) {
>>>               printf("%s: *** ERROR: Invalid GPT ***\n", __func__);
>>>               return;
>>>       }
>>> @@ -169,7 +173,7 @@ int get_partition_info_efi(block_dev_desc_t * dev_desc, int part,
>>>
>>>       /* This function validates AND fills in the GPT header and PTE */
>>>       if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA,
>>> -                     &(gpt_head), &gpt_pte) != 1) {
>>> +                     gpt_head, &gpt_pte) != 1) {
>>>               printf("%s: *** ERROR: Invalid GPT ***\n", __func__);
>>>               return -1;
>>>       }
>>
>> This appears to be a fix for your "part_efi: dcache: allocate cacheline
>> aligned buffers" commit - Can you have a look at it please? If you ack, I
>> will apply to staging
>
> A fix for this is apparently already in the ARM tree. Perhaps it could
> be applied so everyone can see it?
>
> Regards,
> Simon
>
>
>>
>> Regards,
>>
>> Graeme
>>
>>

Whimper whimper.  This is silly, what happened was that two different
patches collided when committed.  Mine had the correct change to this
file.  Doug Andersons also touched this file but reverted the change.
So when both changes went in the result was that these lines didn't
change.  Since then there have been no fewer than four attempts to get
this simple fix committed.  I have acked and pinged at least two of
them.  One finally made it into the ARM tree.  Someone should just put
this into the main tree because that is where my changes to add the
MACRO went in initially.  Oh, and we really don't want to have a
default for CONFIG_SYS_CACHELINE_SIZE, especially not in this file.

Thanks,
    Anton


More information about the U-Boot mailing list