amd: raminit sysinfo offset fix
The sysinfo object within the k8 ram init is used to communicate progess/status from all the nodes in the system. However, the code was assuming where the sysinfo object lived in cache-as-ram. The layout of cache-as-ram is dynamic so one needs to do the lookup of the correct address at runtime. The way the amd code is compiled by #include'ing .c files makes the solution a little more complex in that some cache-as-ram support code needed to be refactored. Change-Id: I6500fa7b005dc082c4c0b3382ee2c3a138d9ac31 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/10961 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <arch/stages.h>
|
||||
#include <arch/early_variables.h>
|
||||
#include <cpu/x86/mtrr.h>
|
||||
#include <cpu/amd/mtrr.h>
|
||||
#include <cpu/amd/car.h>
|
||||
@@ -22,18 +23,9 @@
|
||||
#define print_car_debug(x)
|
||||
#endif
|
||||
|
||||
extern char _car_data_start[];
|
||||
extern char _car_data_end[];
|
||||
|
||||
static size_t car_data_size(void)
|
||||
{
|
||||
size_t car_size = &_car_data_end[0] - &_car_data_start[0];
|
||||
return ALIGN(car_size, 64);
|
||||
}
|
||||
|
||||
static size_t backup_size(void)
|
||||
{
|
||||
size_t car_size = &_car_data_end[0] - &_car_data_start[0];
|
||||
size_t car_size = car_data_size();
|
||||
return ALIGN(car_size + 1024, 1024);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user