Changeset e468ba5 in rtems


Ignore:
Timestamp:
Mar 3, 2016, 8:08:08 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
73de9393
Parents:
f831eff
git-author:
Sebastian Huber <sebastian.huber@…> (03/03/16 08:08:08)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/03/16 08:10:13)
Message:

U-Boot: Flush data cache after bdinfo copy

Location:
c/src/lib/libbsp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/qoriq/include/u-boot-config.h

    rf831eff re468ba5  
    1818#include <bspopts.h>
    1919
    20 #define U_BOOT_BOARD_INFO_TEXT_SECTION __attribute__((section(".bsp_start_text")))
    21 
    2220#define U_BOOT_BOARD_INFO_DATA_SECTION __attribute__((section(".bsp_start_data")))
    2321
  • c/src/lib/libbsp/shared/src/bsp-uboot-board-info.c

    rf831eff re468ba5  
    11/*
    2  * Copyright (c) 2010-2014 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2010, 2016 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    1515#include <bsp/u-boot.h>
    1616
    17 #ifndef U_BOOT_BOARD_INFO_TEXT_SECTION
    18 #define U_BOOT_BOARD_INFO_TEXT_SECTION
    19 #endif
     17#include <string.h>
     18#include <rtems.h>
    2019
    2120#ifndef U_BOOT_BOARD_INFO_DATA_SECTION
     
    2524U_BOOT_BOARD_INFO_DATA_SECTION bd_t bsp_uboot_board_info;
    2625
    27 U_BOOT_BOARD_INFO_TEXT_SECTION void bsp_uboot_copy_board_info(const bd_t *src)
     26void bsp_uboot_copy_board_info(const bd_t *src)
    2827{
    29   const int *s = (const int *) src;
    30   int *d = (int *) &bsp_uboot_board_info;
    31   int i = 0;
    32   int n = sizeof(*src) / sizeof(int);
     28  bd_t *dst = &bsp_uboot_board_info;
    3329
    34   for (i = 0; i < n; ++i) {
    35     d [i] = s [i];
    36   }
     30  dst = memcpy(dst, src, sizeof(*dst));
     31  rtems_cache_flush_multiple_data_lines(dst, sizeof(*dst));
    3732}
Note: See TracChangeset for help on using the changeset viewer.