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

Last change on this file since 571 was 568, checked in by cfuguet, 11 years ago

Adding support for TSAR platforms using the vci_io_bridge component.

In this case (USE_IOB=1), when a block is read from the disk controller,
the buffer containing the read data must be invalidated in the Memory
Cache as the transfer is done between the disk controller and the RAM.

File size: 1.4 KB
RevLine 
[292]1#ifndef BOOT_IOC_H
2#define BOOT_IOC_H
3
4#ifndef SOCLIB_IOC
[388]5#include <sdcard.h>
6#include <spi.h>
[292]7#else
[388]8#include <block_device.h>
[568]9#include <mcc.h>
[292]10#endif
11
[347]12#include <defs.h>
[292]13#include <boot_tty.h>
14#include <io.h>
15
16/**
17 * boot_ioc_read()
[412]18 *
[292]19 * Transfer data from a file on the block device to a memory buffer.
20 *
21 * \param lba    : first block index on the disk
22 * \param buffer : base address of the memory buffer
23 * \param count  : number of blocks to be transfered
24 *
25 * \note This is a blocking function. The function returns once the transfer
26 *       has finished
27 */
28int boot_ioc_read(unsigned int lba, void* buffer, unsigned int count);
29
30/**
31 * boot_ioc_init()
32 *
33 * Initialize the SPI controller use to access a SD card
34 */
35int boot_ioc_init();
36
37/**
[347]38 * boot_dbuf_invalidate()
39 *
40 * Invalidate all data cache lines corresponding to a memory buffer.
41 */
42#if (CACHE_COHERENCE == 0)
43void boot_dbuf_invalidate(
44        const void * buffer,
45        unsigned int line_size,
46        unsigned int size);
47#endif
48
49/**
[292]50 * boot_ioc_write()
51 *
52 * Transfer data from a memory buffer to a file on the block_device.
53 *
54 * \param lba    : first block index on the disk
55 * \param buffer : base address of the memory buffer
56 * \param count  : number of blocks to be transfered
57 *
58 * \note The source buffer must be in user address space.
59 */
60//int boot_ioc_write(unsigned int lba, void* buffer, unsigned int count);
61
62#endif
63
64/*
65 * vim: tabstop=4 : shiftwidth=4 : expandtab
66 */
Note: See TracBrowser for help on using the repository browser.