Repository navigation
bootloader: enable LPSRAM memory for cannonlake - #1552
Conversation
tlauda
left a comment
There was a problem hiding this comment.
Could we create something like CONFIG_LP_SRAM?
Adding additional platforms is not a good idea.
|
Yes this is good idea I think. |
There was a problem hiding this comment.
Why its not "depends on CAVS" if LP_MEMORY_BANKS depends on CAVS?
Anyway the best option:
LP_SRAM should depends on CAVS and LP_MEMORY_BANKS depends on LP_SRAM
tlauda
left a comment
There was a problem hiding this comment.
You are not selecting LP_SRAM for any platform.
There was a problem hiding this comment.
Better to use #if CONFIG_LP_SRAM.
There was a problem hiding this comment.
The question is should we enable LPSRAM in defconfig? And if so for what platforms?
There was a problem hiding this comment.
we can select LP_SRAM under platform config, e.g. select LP_SRAM under CONFIG_APOLLOLAKE and CONFIG_CANNOLAKE.
There was a problem hiding this comment.
@mrajwa I would expect to have it enabled by default for APL and CNL.
There was a problem hiding this comment.
It got a bit messy, we have LSPGCTL once used as shim (here) and another time as just memory mng register to turn it off at all (in asm_memory_management). Please clean it up.
There was a problem hiding this comment.
Why its not "depends on CAVS" if LP_MEMORY_BANKS depends on CAVS?
Anyway the best option:
LP_SRAM should depends on CAVS and LP_MEMORY_BANKS depends on LP_SRAM
There was a problem hiding this comment.
With this change you will have whole LP_SRAM for heap buffer but also in the same place there will be heaps like HEAP_LP_SYSTEM_BASE or HEAP_LP_RUNTIME_BASE, change them if not needed
There was a problem hiding this comment.
@abonislawski, and this is the intention we need whole LPSRAM for heap buffer.
There was a problem hiding this comment.
@mrajwa I mean in this case not needed defines like HEAP_LP_RUNTIME_BASE should be deleted to make this clear because right now two defines will point to the same memory and we need to check which one is actually used
3f351c8 to
3a0cfd6
Compare
To be able to use register read interfaces like shim_read() we need to specify offset. This patch adds such offset for LSPGCTL register. Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
|
CI fails because FW touches LP related defines even though they have been disabled. I will commit further in regards to this. |
tlauda
left a comment
There was a problem hiding this comment.
Small style change and we're good to go.
There was a problem hiding this comment.
Go with the rest of the source code: #if.
|
@tlauda, updated. |
|
@tlauda I found it complains -> "WARNING: please write a paragraph that describes the config symbol fully... FILE: Kconfig:28" |
Yea, for checkpatch fully means 4 lines ;) No need to always satisfy this check as sometimes there are not so much to write about config |
There was a problem hiding this comment.
no need for depends here (as above)
There was a problem hiding this comment.
I think you may remove and all related defines will return zero, it's better not to write implemenation details, especially when this statement is not true, because it will result in different (0/false/undefined) values depending in what enviroment config is used (fe cmake/make vs C preprocessor vs C compiler).
Stale review, feel free to rereview tho.
Choose to power ON LPSRAM banks in Kconfig menu. Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch changes the rules of LPSRAM enabling. Now it is no longer platform dependent but rather rely on config selection. Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Enable whole LPSRAM bank to be allocated by heap buffer. Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch enables LPSRAM memory by default on all APL platforms. Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch enables LPSRAM memory by default on all APL platforms. Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch sets all LPSRAM related memory defines to zero if CONFIG_LP_MEMORY_BANKS is not defined. Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
| #define PLATFORM_LPSRAM_EBB_COUNT CONFIG_LP_MEMORY_BANKS | ||
| #else | ||
| #define PLATFORM_LPSRAM_EBB_COUNT 0 | ||
| #endif |
There was a problem hiding this comment.
@mrajwa , the preprocessor replaces undefined macros with 0 so I don't see when or how the newer and more convoluted code behaves differently from the previous code, can you explain? Besides moving any -Wundef warning to the previous line I couldn't find any difference.
Signed-off-by: Marcin Rajwa marcin.rajwa@linux.intel.com