提交 dd6c910a 编写于 作者: K Kumar Gala 提交者: Andrew Fleming-AFLEMING

85xx: Add cpu_mp_lmb_reserve helper to reserve boot page

Provide a board_lmb_reserve helper function to ensure we reserve
the page of memory we are using for the boot page translation code.
Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
上级 79679d80
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <common.h> #include <common.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <ioports.h> #include <ioports.h>
#include <lmb.h>
#include <asm/io.h> #include <asm/io.h>
#include "mp.h" #include "mp.h"
...@@ -177,6 +178,19 @@ static void pq3_mp_up(unsigned long bootpg) ...@@ -177,6 +178,19 @@ static void pq3_mp_up(unsigned long bootpg)
out_be32(&gur->devdisr, devdisr); out_be32(&gur->devdisr, devdisr);
} }
void cpu_mp_lmb_reserve(struct lmb *lmb)
{
u32 bootpg;
/* if we have 4G or more of memory, put the boot page at 4Gb-4k */
if ((u64)gd->ram_size > 0xfffff000)
bootpg = 0xfffff000;
else
bootpg = gd->ram_size - 4096;
lmb_reserve(lmb, bootpg, 4096);
}
void setup_mp(void) void setup_mp(void)
{ {
extern ulong __secondary_start_page; extern ulong __secondary_start_page;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
ulong get_spin_addr(void); ulong get_spin_addr(void);
void setup_mp(void); void setup_mp(void);
u32 get_my_id(void); u32 get_my_id(void);
void cpu_mp_lmb_reserve(struct lmb *lmb);
#define BOOT_ENTRY_ADDR_UPPER 0 #define BOOT_ENTRY_ADDR_UPPER 0
#define BOOT_ENTRY_ADDR_LOWER 1 #define BOOT_ENTRY_ADDR_LOWER 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册