Last change
on this file since 773 was
347,
checked in by cfuguet, 12 years ago
|
Introducing dcache line invalidation mechanism in the boot_ioc_read
function, when using platform without cache coherency.
Introducing two parameters in the defs_platform.h file:
CACHE_COHERENCE
Equals to 0 when no cache coherency
CACHE_LINE_SIZE
Number of bytes in a cache line
- TODO: Use the config register of the cache models to get
this size
Adding new platform configuration file for the
caba_vgsb_xicu_mmu SOCLIB platform.
|
File size:
1.4 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 <defs.h> |
---|
12 | #include <boot_tty.h> |
---|
13 | #include <io.h> |
---|
14 | |
---|
15 | /** |
---|
16 | * boot_ioc_read() |
---|
17 | * |
---|
18 | * Transfer data from a file on the block device to a memory buffer. |
---|
19 | * |
---|
20 | * \param lba : first block index on the disk |
---|
21 | * \param buffer : base address of the memory buffer |
---|
22 | * \param count : number of blocks to be transfered |
---|
23 | * |
---|
24 | * \note This is a blocking function. The function returns once the transfer |
---|
25 | * has finished |
---|
26 | */ |
---|
27 | int boot_ioc_read(unsigned int lba, void* buffer, unsigned int count); |
---|
28 | |
---|
29 | /** |
---|
30 | * boot_ioc_init() |
---|
31 | * |
---|
32 | * Initialize the SPI controller use to access a SD card |
---|
33 | */ |
---|
34 | int boot_ioc_init(); |
---|
35 | |
---|
36 | /** |
---|
37 | * boot_dbuf_invalidate() |
---|
38 | * |
---|
39 | * Invalidate all data cache lines corresponding to a memory buffer. |
---|
40 | */ |
---|
41 | #if (CACHE_COHERENCE == 0) |
---|
42 | void boot_dbuf_invalidate( |
---|
43 | const void * buffer, |
---|
44 | unsigned int line_size, |
---|
45 | unsigned int size); |
---|
46 | #endif |
---|
47 | |
---|
48 | /** |
---|
49 | * boot_ioc_write() |
---|
50 | * |
---|
51 | * Transfer data from a memory buffer to a file on the block_device. |
---|
52 | * |
---|
53 | * \param lba : first block index on the disk |
---|
54 | * \param buffer : base address of the memory buffer |
---|
55 | * \param count : number of blocks to be transfered |
---|
56 | * |
---|
57 | * \note The source buffer must be in user address space. |
---|
58 | */ |
---|
59 | //int boot_ioc_write(unsigned int lba, void* buffer, unsigned int count); |
---|
60 | |
---|
61 | #endif |
---|
62 | |
---|
63 | /* |
---|
64 | * vim: tabstop=4 : shiftwidth=4 : expandtab |
---|
65 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.