AGESA: Move amd_initmmio() call
Function enables PCI MMCONF and XIP cache, it needs to be called before giving platform any chance of calling any PCI access functions. Change-Id: Ic044d4df7b93667fa987c29c810d0bd826af87ad Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/18623 Tested-by: build bot (Jenkins) Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
b85ddc787e
commit
13cf135871
|
@ -108,19 +108,24 @@ cache_as_ram_setup:
|
||||||
# use call far to switch to 64-bit code segment
|
# use call far to switch to 64-bit code segment
|
||||||
ljmp $0x18, $1f
|
ljmp $0x18, $1f
|
||||||
1:
|
1:
|
||||||
|
|
||||||
|
.code64
|
||||||
|
|
||||||
|
call early_all_cores
|
||||||
|
|
||||||
/* Pass the cpu_init_detected */
|
/* Pass the cpu_init_detected */
|
||||||
cvtsd2si %xmm1, %esi
|
cvtsd2si %xmm1, %esi
|
||||||
|
|
||||||
/* Pass the BIST result */
|
/* Pass the BIST result */
|
||||||
cvtsd2si %xmm0, %edi
|
cvtsd2si %xmm0, %edi
|
||||||
|
|
||||||
|
|
||||||
.code64
|
|
||||||
call cache_as_ram_main
|
call cache_as_ram_main
|
||||||
.code32
|
.code32
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
call early_all_cores
|
||||||
|
|
||||||
/* Restore the BIST result */
|
/* Restore the BIST result */
|
||||||
cvtsd2si %xmm0, %edx
|
cvtsd2si %xmm0, %edx
|
||||||
|
|
||||||
|
|
|
@ -35,13 +35,17 @@
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include "platform_cfg.h"
|
#include "platform_cfg.h"
|
||||||
|
|
||||||
|
void asmlinkage early_all_cores(void)
|
||||||
|
{
|
||||||
|
amd_initmmio();
|
||||||
|
}
|
||||||
|
|
||||||
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
||||||
{
|
{
|
||||||
struct sysinfo *cb = NULL;
|
struct sysinfo *cb = NULL;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
post_code(0x35);
|
post_code(0x35);
|
||||||
amd_initmmio();
|
|
||||||
|
|
||||||
if (!cpu_init_detectedx && boot_cpu()) {
|
if (!cpu_init_detectedx && boot_cpu()) {
|
||||||
post_code(0x30);
|
post_code(0x30);
|
||||||
|
|
|
@ -39,13 +39,16 @@
|
||||||
#include <cpu/amd/car.h>
|
#include <cpu/amd/car.h>
|
||||||
#include <sb_cimx.h>
|
#include <sb_cimx.h>
|
||||||
|
|
||||||
|
void asmlinkage early_all_cores(void)
|
||||||
|
{
|
||||||
|
amd_initmmio();
|
||||||
|
}
|
||||||
|
|
||||||
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
||||||
{
|
{
|
||||||
struct sysinfo *cb = NULL;
|
struct sysinfo *cb = NULL;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
amd_initmmio();
|
|
||||||
|
|
||||||
if (!cpu_init_detectedx && boot_cpu()) {
|
if (!cpu_init_detectedx && boot_cpu()) {
|
||||||
post_code(0x30);
|
post_code(0x30);
|
||||||
sb_Poweron_Init();
|
sb_Poweron_Init();
|
||||||
|
|
|
@ -30,13 +30,16 @@
|
||||||
#include <nb_cimx.h>
|
#include <nb_cimx.h>
|
||||||
#include <sb_cimx.h>
|
#include <sb_cimx.h>
|
||||||
|
|
||||||
|
void asmlinkage early_all_cores(void)
|
||||||
|
{
|
||||||
|
amd_initmmio();
|
||||||
|
}
|
||||||
|
|
||||||
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
||||||
{
|
{
|
||||||
struct sysinfo *cb = NULL;
|
struct sysinfo *cb = NULL;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
post_code(0x30);
|
|
||||||
amd_initmmio();
|
|
||||||
post_code(0x31);
|
post_code(0x31);
|
||||||
|
|
||||||
/* Halt if there was a built in self test failure */
|
/* Halt if there was a built in self test failure */
|
||||||
|
|
|
@ -33,13 +33,16 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <southbridge/amd/agesa/hudson/hudson.h>
|
#include <southbridge/amd/agesa/hudson/hudson.h>
|
||||||
|
|
||||||
|
void asmlinkage early_all_cores(void)
|
||||||
|
{
|
||||||
|
amd_initmmio();
|
||||||
|
}
|
||||||
|
|
||||||
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
||||||
{
|
{
|
||||||
struct sysinfo *cb = NULL;
|
struct sysinfo *cb = NULL;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
amd_initmmio();
|
|
||||||
|
|
||||||
if (!cpu_init_detectedx && boot_cpu()) {
|
if (!cpu_init_detectedx && boot_cpu()) {
|
||||||
post_code(0x30);
|
post_code(0x30);
|
||||||
board_BeforeAgesa(cb);
|
board_BeforeAgesa(cb);
|
||||||
|
|
|
@ -34,13 +34,16 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <southbridge/amd/agesa/hudson/hudson.h>
|
#include <southbridge/amd/agesa/hudson/hudson.h>
|
||||||
|
|
||||||
|
void asmlinkage early_all_cores(void)
|
||||||
|
{
|
||||||
|
amd_initmmio();
|
||||||
|
}
|
||||||
|
|
||||||
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
||||||
{
|
{
|
||||||
struct sysinfo *cb = NULL;
|
struct sysinfo *cb = NULL;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
amd_initmmio();
|
|
||||||
|
|
||||||
if (!cpu_init_detectedx && boot_cpu()) {
|
if (!cpu_init_detectedx && boot_cpu()) {
|
||||||
post_code(0x30);
|
post_code(0x30);
|
||||||
|
|
||||||
|
|
|
@ -33,13 +33,16 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <southbridge/amd/agesa/hudson/hudson.h>
|
#include <southbridge/amd/agesa/hudson/hudson.h>
|
||||||
|
|
||||||
|
void asmlinkage early_all_cores(void)
|
||||||
|
{
|
||||||
|
amd_initmmio();
|
||||||
|
}
|
||||||
|
|
||||||
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
||||||
{
|
{
|
||||||
struct sysinfo *cb = NULL;
|
struct sysinfo *cb = NULL;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
amd_initmmio();
|
|
||||||
|
|
||||||
if (!cpu_init_detectedx && boot_cpu()) {
|
if (!cpu_init_detectedx && boot_cpu()) {
|
||||||
post_code(0x30);
|
post_code(0x30);
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,6 @@ void cache_as_ram_new_stack(void);
|
||||||
void disable_cache_as_ram(void);
|
void disable_cache_as_ram(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void asmlinkage early_all_cores(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue