omap3evm: Add support for EFI partitions
cover omap3evm: Add support for EFI partitions
After enabling CONFIG_EFI_PARTITION, following errors were noticed.
part_efi.c: In function 'print_part_efi':
part_efi.c:133:5: warning: passing argument 3 of 'is_gpt_valid'
from incompatible pointer type
part_efi.c:95:12: note: expected 'struct gpt_header *' but arg ument is of type 'struct gpt_header **'part_efi.c: In function 'get_partition_info_efi':
part_efi.c:173:4: warning: passing argument 3 of 'is_gpt_valid ' from incompatible pointer type
part_efi.c:95:12: note: expected 'struct gpt_header *' but arg ument is of type 'struct gpt_header **'part_efi.c: In function 'alloc_read_gpt_entries':
part_efi.c:384:18: error: 'CONFIG_SYS_CACHELINE_SIZE' undeclar ed (first use in this function)
part_efi.c:384:18: note: each undeclared identifier is reporte d only once for each function it appears in
make[1]: *** [part_efi.o] Error 1
make[1]: Leaving directory `/db/psp_git/users/a0756819/u-boot/ disk'
make: *** [disk/libdisk.o] Error 2
Fixes for these errors are contained in PATCH 1/2.
Tested working via command "mmc part" on OMAP3EVM on MMC card with EFI partitions.
Sanjeev Premi (2):
part_efi: Fix compile errors
omap3evm: Add support for EFI partitions
disk/part_efi.c | 4 ++-- include/configs/omap3_evm.h | 1 + include/configs/omap3_evm_common.h | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-)
PATCH 1/2 part_efi: Fix compile errors
Fix errors noticed after enabling CONFIG_EFI_PARTITION for the OMAP3 EVM board:
part_efi.c: In function 'print_part_efi':
part_efi.c:133:5: warning: passing argument 3 of 'is_gpt_valid'
from incompatible pointer type
part_efi.c:95:12: note: expected 'struct gpt_header *' but arg ument is of type 'struct gpt_header **'part_efi.c: In function 'get_partition_info_efi':
part_efi.c:173:4: warning: passing argument 3 of 'is_gpt_valid ' from incompatible pointer type
part_efi.c:95:12: note: expected 'struct gpt_header *' but arg ument is of type 'struct gpt_header **'part_efi.c: In function 'alloc_read_gpt_entries':
--- disk/part_efi.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
disk/part_efi.c +2 -2
@@ -130,7 +130,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 +169,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 ; }
Signature · 1 line
1.7.0.4
PATCH 2/2 omap3evm: Add support for EFI partitions
In reply to Sanjeev PremiDefines CONFIG_EFI_PARTITION for OMAP3 EVM.
Also, fix this board specific error noticed after
enabling this config option:
part_efi.c: In function 'alloc_read_gpt_entries':
part_efi.c:384:18: error: 'CONFIG_SYS_CACHELINE_SIZE' undeclare d (first use in this function)
---
Cache line length for ARM Cortex-A8 can be referenced here:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0344f/Chdebced.html
I wasn't sure if these changes should be treated separate, so keeping them in same file - but can be split if needed.
include/configs/omap3_evm.h | 1 + include/configs/omap3_evm_common.h | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-)
include/configs/omap3_evm.h +1 -0
@@ -84,6 +84,7 @@#define CONFIG_GENERIC_MMC #define CONFIG_OMAP_HSMMC #define CONFIG_DOS_PARTITION +#define CONFIG_EFI_PARTITION /* USB *
include/configs/omap3_evm_common.h +3 -0
@@ -53,6 +53,9 @@/* Size of malloc pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10)) +/* Size of cache line */ +#define CONFIG_SYS_CACHELINE_SIZE 64 +/* * Stack sizes * These values are used in start.S
Signature · 1 line
1.7.0.4
cover omap3evm: Add support for EFI partitions
In reply to Sanjeev PremiQuoted 14 lines · Sanjeev Premi
After enabling
CONFIG_EFI_PARTITION, following errors were noticed.
part_efi.c: In function 'print_part_efi':
part_efi.c:133:5: warning: passing argument 3 of 'is_gpt_valid' ?from incompatible pointer type
part_efi.c:95:12: note: expected 'structgpt_header*' but arg ument is of type 'structgpt_header**'part_efi.c: In function 'get_partition_info_efi':
part_efi.c:173:4: warning: passing argument 3 of 'is_gpt_valid' from incompatible pointer type
part_efi.c:95:12: note: expected 'structgpt_header*' but arg ument is of type 'structgpt_header**'part_efi.c: In function 'alloc_read_gpt_entries':
Quoted 8 lines
part_efi.c:384:18: error: '
CONFIG_SYS_CACHELINE_SIZE' undeclar ed (first use in this function)
part_efi.c:384:18: note: each undeclared identifier is reporte d only once for each function it appears in
make[1]: *** [part_efi.o] Error 1
make[1]: Leaving directory `/db/psp_git/users/a0756819/u-boot/ disk'
make: *** [disk/libdisk.o] Error 2
Is there a reason EFI doesn't use ARCH_DMA_MINALIGN ?
Signature · 1 line
Tom
PATCH 1/2 part_efi: Fix compile errors
In reply to Sanjeev PremiQuoted 2 lines · Sanjeev Premi
Fix errors noticed after enabling
CONFIG_EFI_PARTITIONfor the OMAP3 EVM board:
There is already a patch for this waiting to be committed.
Thanks,
Anton
Quoted 47 lines
part_efi.c: In function 'print_part_efi':
part_efi.c:133:5: warning: passing argument 3 of 'is_gpt_valid' ?from incompatible pointer type
part_efi.c:95:12: note: expected 'structgpt_header*' but arg ument is of type 'structgpt_header**'part_efi.c: In function 'get_partition_info_efi':
part_efi.c:173:4: warning: passing argument 3 of 'is_gpt_valid' from incompatible pointer type
part_efi.c:95:12: note: expected 'structgpt_header*' but arg ument is of type 'structgpt_header**'part_efi.c: In function 'alloc_read_gpt_entries':Signed-off-by Sanjeev Premi <[email protected]>---
?disk/part_efi.c | ? ?4 ++--
?1 files changed, 2 insertions(+), 2 deletions(-)disk/part_efi.c +0
-0@@ -130,7 +130,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;
? ? ? ?}disk/part_efi.c +0
-0@@ -169,7 +169,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;
? ? ? ?}
--
1.7.0.4_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Premi
cover omap3evm: Add support for EFI partitions
In reply to Tom RiniQuoted 34 lines
-----Original Message-----
From: Tom Rini [mailto:tom.rini at gmail.com]
Sent: Monday, November 14, 2011 9:05 PM
To: Premi, Sanjeev
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 0/2] omap3evm: Add support for EFI partitionsQuoted 14 lines · Sanjeev Premi
After enabling
CONFIG_EFI_PARTITION, following errors were noticed.
part_efi.c: In function 'print_part_efi':
part_efi.c:133:5: warning: passing argument 3 of 'is_gpt_valid' ?from incompatible pointer type
part_efi.c:95:12: note: expected 'structgpt_header*' but arg ument is of type 'structgpt_header**'part_efi.c: In function 'get_partition_info_efi':
part_efi.c:173:4: warning: passing argument 3 of 'is_gpt_valid' from incompatible pointer type
part_efi.c:95:12: note: expected 'structgpt_header*' but arg ument is of type 'structgpt_header**'part_efi.c: In function 'alloc_read_gpt_entries':Quoted 8 lines
part_efi.c:384:18: error: '
CONFIG_SYS_CACHELINE_SIZE' undeclar ed (first use in this function)
part_efi.c:384:18: note: each undeclared identifier is reporte d only once for each function it appears in
make[1]: *** [part_efi.o] Error 1
make[1]: Leaving directory `/db/psp_git/users/a0756819/u-boot/ disk'
make: *** [disk/libdisk.o] Error 2
Quoted 1 line
Is there a reason EFI doesn't use
ARCH_DMA_MINALIGN?
I have no idea, but use of CONFIG_SYS_CACHELINE_SIZE in part_efi.c was introduced in:
commit f75dd584cdfe29dfdcfd424bb237b9238cfb8fe4
Author: Anton staaf <[email protected]> Date: Wed Oct 12 13:56:04 2011 +0000
~sanjeev
Quoted 4 lines
Signature · 2 lines
-- Tom
Premi
cover omap3evm: Add support for EFI partitions
Quoted 42 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Premi, Sanjeev
Sent: Tuesday, November 15, 2011 12:15 PM
To: Tom Rini
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 0/2] omap3evm: Add support for EFI partitionsQuoted 32 lines
-----Original Message-----
From: Tom Rini [mailto:tom.rini at gmail.com]
Sent: Monday, November 14, 2011 9:05 PM
To: Premi, Sanjeev
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 0/2] omap3evm: Add support for EFI partitionsQuoted 14 lines · Sanjeev Premi
After enabling
CONFIG_EFI_PARTITION, following errors were noticed.
part_efi.c: In function 'print_part_efi':
part_efi.c:133:5: warning: passing argument 3 of 'is_gpt_valid' ?from incompatible pointer type
part_efi.c:95:12: note: expected 'structgpt_header*' but arg ument is of type 'structgpt_header**'part_efi.c: In function 'get_partition_info_efi':
part_efi.c:173:4: warning: passing argument 3 of 'is_gpt_valid' from incompatible pointer type
part_efi.c:95:12: note: expected 'structgpt_header*' but arg ument is of type 'structgpt_header**'part_efi.c: In function 'alloc_read_gpt_entries':Quoted 8 lines
part_efi.c:384:18: error: '
CONFIG_SYS_CACHELINE_SIZE' undeclar ed (first use in this function)
part_efi.c:384:18: note: each undeclared identifier is reporte d only once for each function it appears in
make[1]: *** [part_efi.o] Error 1
make[1]: Leaving directory `/db/psp_git/users/a0756819/u-boot/ disk'
make: *** [disk/libdisk.o] Error 2Quoted 1 line
Is there a reason EFI doesn't use
ARCH_DMA_MINALIGN?
Quoted 8 lines
I have no idea, but use of
CONFIG_SYS_CACHELINE_SIZEinpart_efi.cwas introduced in:commit
f75dd584cdfe29dfdcfd424bb237b9238cfb8fe4Author: Anton staaf <[email protected]> Date: Wed Oct 12 13:56:04 2011 +0000~sanjeev
After a bit more digging, I see that "ARCH_DMA_MINALIGN" is set to 64 OR CONFIG_SYS_CACHELINE_SIZE (if defined) - in this commit:
commit 3b75eeef620c018c312e8149246cd330cc27d16d
Author: Anton Staaf <[email protected]> Date: Mon Oct 17 16:46:03 2011 -0700
arm: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment
So, CONFIG_SYS_CACHELINE_SIZE shouldn't really be used in the file.
I will submit fresh set soon.
~sanjeev
Quoted 10 lines
Quoted 5 lines
Signature · 2 lines
-- Tom_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot