mirror of https://github.com/thesofproject/sof.git
memory: pass sof context to platform_init_memmap
Changes platform_init_memmap function's argument list to take sof context. It will be needed to add memory map pointer into sof context. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
parent
b332bee751
commit
3f53d59e7b
|
@ -47,7 +47,7 @@ int master_core_init(int argc, char *argv[], struct sof *sof)
|
|||
|
||||
/* initialise system services */
|
||||
trace_point(TRACE_BOOT_SYS_HEAP);
|
||||
platform_init_memmap();
|
||||
platform_init_memmap(sof);
|
||||
init_heap(sof);
|
||||
|
||||
interrupt_init();
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
|
||||
#if !defined(__ASSEMBLER__) && !defined(LINKER)
|
||||
|
||||
void platform_init_memmap(void);
|
||||
struct sof;
|
||||
|
||||
void platform_init_memmap(struct sof *sof);
|
||||
|
||||
static inline void *platform_shared_get(void *ptr, int bytes)
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <sof/common.h>
|
||||
#include <sof/lib/alloc.h>
|
||||
#include <sof/lib/memory.h>
|
||||
#include <sof/sof.h>
|
||||
#include <ipc/topology.h>
|
||||
|
||||
/* Heap blocks for system runtime */
|
||||
|
@ -88,7 +89,7 @@ struct mm memmap = {
|
|||
HEAP_RUNTIME_SIZE + HEAP_BUFFER_SIZE,},
|
||||
};
|
||||
|
||||
void platform_init_memmap(void)
|
||||
void platform_init_memmap(struct sof *sof)
|
||||
{
|
||||
/* memmap has been initialized statically as a part of .data */
|
||||
}
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
|
||||
#if !defined(__ASSEMBLER__) && !defined(LINKER)
|
||||
|
||||
void platform_init_memmap(void);
|
||||
struct sof;
|
||||
|
||||
void platform_init_memmap(struct sof *sof);
|
||||
|
||||
static inline void *platform_shared_get(void *ptr, int bytes)
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <sof/common.h>
|
||||
#include <sof/lib/alloc.h>
|
||||
#include <sof/lib/memory.h>
|
||||
#include <sof/sof.h>
|
||||
#include <ipc/topology.h>
|
||||
|
||||
/* Heap blocks for system runtime */
|
||||
|
@ -88,7 +89,7 @@ struct mm memmap = {
|
|||
HEAP_RUNTIME_SIZE + HEAP_BUFFER_SIZE,},
|
||||
};
|
||||
|
||||
void platform_init_memmap(void)
|
||||
void platform_init_memmap(struct sof *sof)
|
||||
{
|
||||
/* memmap has been initialized statically as a part of .data */
|
||||
}
|
||||
|
|
|
@ -173,7 +173,9 @@
|
|||
|
||||
#if !defined(__ASSEMBLER__) && !defined(LINKER)
|
||||
|
||||
void platform_init_memmap(void);
|
||||
struct sof;
|
||||
|
||||
void platform_init_memmap(struct sof *sof);
|
||||
|
||||
static inline void *platform_shared_get(void *ptr, int bytes)
|
||||
{
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <sof/lib/alloc.h>
|
||||
#include <sof/lib/memory.h>
|
||||
#include <sof/platform.h>
|
||||
#include <sof/sof.h>
|
||||
#include <ipc/topology.h>
|
||||
|
||||
/* Heap blocks for system runtime */
|
||||
|
@ -91,7 +92,7 @@ struct mm memmap = {
|
|||
HEAP_RUNTIME_SIZE + HEAP_BUFFER_SIZE,},
|
||||
};
|
||||
|
||||
void platform_init_memmap(void)
|
||||
void platform_init_memmap(struct sof *sof)
|
||||
{
|
||||
/* memmap has been initialized statically as a part of .data */
|
||||
}
|
||||
|
|
|
@ -66,6 +66,8 @@
|
|||
|
||||
#if !defined(__ASSEMBLER__) && !defined(LINKER)
|
||||
|
||||
struct sof;
|
||||
|
||||
#define SRAM_ALIAS_BASE 0x9E000000
|
||||
#define SRAM_ALIAS_MASK 0xFF000000
|
||||
#define SRAM_ALIAS_OFFSET 0x20000000
|
||||
|
@ -108,7 +110,7 @@ static inline void *platform_rfree_prepare(void *ptr)
|
|||
return is_uncached(ptr) ? uncache_to_cache(ptr) : ptr;
|
||||
}
|
||||
|
||||
void platform_init_memmap(void);
|
||||
void platform_init_memmap(struct sof *sof);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <sof/lib/cpu.h>
|
||||
#include <sof/lib/memory.h>
|
||||
#include <sof/platform.h>
|
||||
#include <sof/sof.h>
|
||||
#include <ipc/topology.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -105,7 +106,7 @@ static struct block_map lp_buf_heap_map[] = {
|
|||
|
||||
struct mm memmap;
|
||||
|
||||
void platform_init_memmap(void)
|
||||
void platform_init_memmap(struct sof *sof)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ static struct test_case test_cases[] = {
|
|||
static int setup(void **state)
|
||||
{
|
||||
sof = malloc(sizeof(struct sof));
|
||||
platform_init_memmap();
|
||||
platform_init_memmap(sof);
|
||||
init_heap(sof);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue