source: trunk/softs/tsar_boot/include/boot_ioc.h @ 305

Last change on this file since 305 was 292, checked in by cfuguet, 12 years ago

Changing directory structure of the TSAR boot loader.
A README.txt file has been included to explain the new structure
and the MAKEFILE parameters.

Erasing the heap segment for the boot elf loader. All the work space
is allocated in the stack.

The stack size is defined in the include/defs.h.

Important modification in the reset.S file. The non-boot
processors (processor id != 0) wait in a low comsumption energy
mode to be wake up by processor 0 using an IPI. Each processor
has a private mailbox in the local XICU. The value written in
the mailbox will be used as address to jump by the processors.

The waking up of non-boot processors is not done in this boot loader
so it must be done in the application loaded.

The boot_loader_elf function loads into memory an executable .elf file
which must be placed in the BOOT_LOADER_LBA block of the disk. This
constant can be defined in the include/defs.h file.

File size: 1.2 KB
Line 
1#ifndef BOOT_IOC_H
2#define BOOT_IOC_H
3
4#ifndef SOCLIB_IOC
5    #include <sdcard.h>
6    #include <spi.h>
7#else
8    #include <block_device.h>
9#endif
10
11#include <boot_tty.h>
12#include <io.h>
13
14/**
15 * boot_ioc_read()
16 *
17 * Transfer data from a file on the block device to a memory buffer.
18 *
19 * \param lba    : first block index on the disk
20 * \param buffer : base address of the memory buffer
21 * \param count  : number of blocks to be transfered
22 *
23 * \note This is a blocking function. The function returns once the transfer
24 *       has finished
25 */
26int boot_ioc_read(unsigned int lba, void* buffer, unsigned int count);
27
28/**
29 * boot_ioc_init()
30 *
31 * Initialize the SPI controller use to access a SD card
32 */
33int boot_ioc_init();
34
35/**
36 * boot_ioc_write()
37 *
38 * Transfer data from a memory buffer to a file on the block_device.
39 *
40 * \param lba    : first block index on the disk
41 * \param buffer : base address of the memory buffer
42 * \param count  : number of blocks to be transfered
43 *
44 * \note The source buffer must be in user address space.
45 */
46//int boot_ioc_write(unsigned int lba, void* buffer, unsigned int count);
47
48#endif
49
50/*
51 * vim: tabstop=4 : shiftwidth=4 : expandtab
52 */
Note: See TracBrowser for help on using the repository browser.