source: trunk/softs/tsar_boot/include/boot_utils.h @ 490

Last change on this file since 490 was 425, checked in by cfuguet, 11 years ago

Modifications in tsar_boot:

  • Creating new files boot_utils.[c h] containing the memcpy, memset and some ELF format debug functions
  • Introducing assert in the boot_elf_loader to show an error when some of segments to load conflicts with some of the pre-loader segments
  • Cosmetic changes in boot_elf_loader to improve code readibility
  • Fixing bug in dcache_buf_invalidate function used by boot_ioc_read when cache coherence not supported. The condition in the for loop was erroneous.
  • Modification in Makefile: The SYSCLK_FREQ parameter is not passed anymore

as a Makefile parameter but it is definesd in the defs_platform.h file

File size: 1.3 KB
Line 
1/**
2 * \file    : boot_utils.h
3 * \date    : August 2012
4 * \author  : Cesar Fuguet
5 *
6 * Definition of some miscellaneous functions used by the
7 * pre-loader
8 */
9
10#ifndef BOOT_UTILS_H
11#define BOOT_UTILS_H
12
13#include <elf-types.h>
14#include <boot_tty.h>
15
16/**
17 * memcpy( _dst, _src, size )
18 *
19 * Transfer data between to memory buffers.
20 *
21 * \param _dst   : Destination buffer base address
22 * \param _src   : Source buffer base address
23 * \param size   : Number of bytes to transfer
24 *
25 */
26void * memcpy(void *_dst, const void *_src, unsigned int size);
27
28/**
29 * memset( _dst, value, size )
30 *
31 * Initialize memory buffers with predefined value.
32 *
33 * \param _dst   : Destination buffer base address
34 * \param value  : Initialization value
35 * \param size   : Number of bytes to initialize
36 *
37 */
38void * memset(void *_dst, const int value, unsigned int size);
39
40/******************************************************************************
41 * Misc functions for the ELF
42 *****************************************************************************/
43
44/**
45 * boot_print_elf_phdr( elf_phdr_ptr )
46 *
47 * Print some fields of a ELF program header
48 *
49 * \param elf_phdr_ptr : Pointer to the ELF program header to print
50 *
51 */
52void boot_print_elf_phdr(Elf32_Phdr * elf_phdr_ptr);
53
54#endif
55
56// vim: tabstop=4 : softtabstop=4 : shiftwidth=4 : expandtab
57
Note: See TracBrowser for help on using the repository browser.