Last change
on this file since 777 was
758,
checked in by cfuguet, 10 years ago
|
tsar_boot: improving configuration infrastructure
- Using hard_config.h which respects the same sintax that
the hard_config.h file of all TSAR platforms.
This file can be then generated by the GIET-VM genmap
tool or written manually.
- All peripheral drivers have been moved to a drivers
directory and they are compiled as a static library.
This allows GCC to only include in the final .ELF the
object files of used peripherals and not all of them.
- Example hard_config.h and ldscripts have been introduced
in the conf directory.
- Improving comments in all files
|
File size:
637 bytes
|
Line | |
---|
1 | /** |
---|
2 | * \file reset_rdk.c |
---|
3 | * \date December 14, 2014 |
---|
4 | * \author Cesar Fuguet |
---|
5 | */ |
---|
6 | #include <reset_rdk.h> |
---|
7 | #include <reset_utils.h> |
---|
8 | #include <defs.h> |
---|
9 | |
---|
10 | #ifndef SEG_RDK_BASE |
---|
11 | # error "SEG_RDK_BASE constant must be defined in the hard_config.h file" |
---|
12 | #endif |
---|
13 | |
---|
14 | static int* const rdk_address = (int* const)SEG_RDK_BASE; |
---|
15 | |
---|
16 | int reset_rdk_init() |
---|
17 | { |
---|
18 | return 0; |
---|
19 | } |
---|
20 | |
---|
21 | int reset_rdk_read( unsigned int lba, void* buffer, unsigned int count ) |
---|
22 | { |
---|
23 | char* const src = (char* const)rdk_address + (lba * BLOCK_SIZE); |
---|
24 | memcpy(buffer, (void*)src, count * BLOCK_SIZE); |
---|
25 | return 0; |
---|
26 | } |
---|
27 | |
---|
28 | /* |
---|
29 | * vim: tabstop=4 : softtabstop=4 : shiftwidth=4 : expandtab |
---|
30 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.