Jonathan Neuschäfer (j.neuschaefer(a)gmx.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17709
-gerrit
commit 712db2324809c87b544668eff16f7f0afab0ac23
Author: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Date: Sun Dec 4 07:57:48 2016 +0100
[DO NOT MERGE] riscv: Work around lowrisc's different page table format
See https://github.com/lowRISC/rocket/issues/3
Change-Id: I23b9cc16c105d11b84a9da4a737a653c991e9d72
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
---
src/arch/riscv/virtual_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/arch/riscv/virtual_memory.c b/src/arch/riscv/virtual_memory.c
index 26a0169..d9b0e84 100644
--- a/src/arch/riscv/virtual_memory.c
+++ b/src/arch/riscv/virtual_memory.c
@@ -138,7 +138,7 @@ pte_t pte_create(uintptr_t ppn, int prot, int user)
pte |= PTE_X;
if (user)
pte |= PTE_U;
- return pte;
+ return pte | 0x1f;
}
// The current RISCV *physical* address space is this:
Jonathan Neuschäfer (j.neuschaefer(a)gmx.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17708
-gerrit
commit 8ad15834db54b90bd140035870435531e56f3a4d
Author: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Date: Thu Nov 24 08:26:03 2016 +0100
soc/lowrisc: Place CBMEM at top of autodetected RAM
Change-Id: I9f169db330d1792128db7a6308ed3afbe5803c03
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
---
src/soc/lowrisc/lowrisc/cbmem.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/soc/lowrisc/lowrisc/cbmem.c b/src/soc/lowrisc/lowrisc/cbmem.c
index ea7ad70..44ffa26 100644
--- a/src/soc/lowrisc/lowrisc/cbmem.c
+++ b/src/soc/lowrisc/lowrisc/cbmem.c
@@ -11,13 +11,15 @@
* GNU General Public License for more details.
*/
-#include <console/console.h>
#include <cbmem.h>
+#include <commonlib/configstring.h>
void *cbmem_top(void)
{
- // TODO: find out how the lowrisc SOC decides to provide
- // this information, when they know.
- printk(BIOS_SPEW, "Returning hard-coded 128M; fix me\n");
- return (void *)((uintptr_t)(2ULL*GiB+128*MiB));
+ uintptr_t base;
+ size_t size;
+
+ query_mem(configstring(), &base, &size);
+
+ return (void *)(base + size);
}