void print_part_efi(block_dev_desc_t * dev_desc)
 {
-       gpt_header gpt_head;
+       ALLOC_CACHE_ALIGN_BUFFER(gpt_header, gpt_head, 1);
        gpt_entry **pgpt_pte = NULL;
        int i = 0;
 
        }
        /* This function validates AND fills in the GPT header and PTE */
        if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA,
-                        &(gpt_head), pgpt_pte) != 1) {
+                        gpt_head, pgpt_pte) != 1) {
                printf("%s: *** ERROR: Invalid GPT ***\n", __FUNCTION__);
                return;
        }
        debug("%s: gpt-entry at 0x%08X\n", __FUNCTION__, (unsigned int)*pgpt_pte);
 
        printf("Part\tName\t\t\tStart LBA\tEnd LBA\n");
-       for (i = 0; i < le32_to_int(gpt_head.num_partition_entries); i++) {
+       for (i = 0; i < le32_to_int(gpt_head->num_partition_entries); i++) {
 
                if (is_pte_valid(&(*pgpt_pte)[i])) {
                        printf("%3d\t%-18s\t0x%08llX\t0x%08llX\n", (i + 1),
 int get_partition_info_efi(block_dev_desc_t * dev_desc, int part,
                                disk_partition_t * info)
 {
-       gpt_header gpt_head;
+       ALLOC_CACHE_ALIGN_BUFFER(gpt_header, gpt_head, 1);
        gpt_entry **pgpt_pte = NULL;
 
        /* "part" argument must be at least 1 */
 
        /* This function validates AND fills in the GPT header and PTE */
        if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA,
-                       &(gpt_head), pgpt_pte) != 1) {
+                        gpt_head, pgpt_pte) != 1) {
                printf("%s: *** ERROR: Invalid GPT ***\n", __FUNCTION__);
                return -1;
        }
 
 int test_part_efi(block_dev_desc_t * dev_desc)
 {
-       legacy_mbr legacymbr;
+       ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, legacymbr, 1);
 
        /* Read legacy MBR from block 0 and validate it */
-       if ((dev_desc->block_read(dev_desc->dev, 0, 1, (ulong *) & legacymbr) != 1)
-               || (is_pmbr_valid(&legacymbr) != 1)) {
+       if ((dev_desc->block_read(dev_desc->dev, 0, 1, (ulong *)legacymbr) != 1)
+               || (is_pmbr_valid(legacymbr) != 1)) {
                return -1;
        }
        return 0;
 
        /* Allocate memory for PTE, remember to FREE */
        if (count != 0) {
-               pte = malloc(count);
+               pte = memalign(CONFIG_SYS_CACHELINE_SIZE, count);
        }
 
        if (count == 0 || pte == NULL) {