This requires a corresponding increase in the memory allocated to OFMEM in order to store the page tables.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@siriusit.co.uk --- openbios-devel/arch/sparc32/lib.c | 8 ++++---- openbios-devel/arch/sparc32/ofmem_sparc32.c | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/openbios-devel/arch/sparc32/lib.c b/openbios-devel/arch/sparc32/lib.c index 10599ce..788d6f5 100644 --- a/openbios-devel/arch/sparc32/lib.c +++ b/openbios-devel/arch/sparc32/lib.c @@ -273,7 +273,7 @@ find_pte(unsigned long va, int alloc) pte = l1[(va >> SRMMU_PGDIR_SHIFT) & (SRMMU_PTRS_PER_PGD - 1)]; if ((pte & SRMMU_ET_MASK) == SRMMU_ET_INVALID) { if (alloc) { - ret = posix_memalign(&p, SRMMU_PTRS_PER_PMD * sizeof(int), + ret = ofmem_posix_memalign(&p, SRMMU_PTRS_PER_PMD * sizeof(int), SRMMU_PTRS_PER_PMD * sizeof(int)); if (ret != 0) return ret; @@ -290,7 +290,7 @@ find_pte(unsigned long va, int alloc) pte = *(uint32_t *)pa2va(pa); if ((pte & SRMMU_ET_MASK) == SRMMU_ET_INVALID) { if (alloc) { - ret = posix_memalign(&p, SRMMU_PTRS_PER_PTE * sizeof(void *), + ret = ofmem_posix_memalign(&p, SRMMU_PTRS_PER_PTE * sizeof(void *), SRMMU_PTRS_PER_PTE * sizeof(void *)); if (ret != 0) return ret; @@ -602,9 +602,9 @@ init_mmu_swift(void) mem_init(&cmem, (char *) &_vmem, (char *)&_evmem); mem_init(&cio, (char *)&_end, (char *)&_iomem);
- posix_memalign((void *)&context_table, NCTX_SWIFT * sizeof(int), + ofmem_posix_memalign((void *)&context_table, NCTX_SWIFT * sizeof(int), NCTX_SWIFT * sizeof(int)); - posix_memalign((void *)&l1, 256 * sizeof(int), 256 * sizeof(int)); + ofmem_posix_memalign((void *)&l1, 256 * sizeof(int), 256 * sizeof(int));
context_table[0] = (((unsigned long)va2pa((unsigned long)l1)) >> 4) | SRMMU_ET_PTD; diff --git a/openbios-devel/arch/sparc32/ofmem_sparc32.c b/openbios-devel/arch/sparc32/ofmem_sparc32.c index 2e6f7b5..6484be9 100644 --- a/openbios-devel/arch/sparc32/ofmem_sparc32.c +++ b/openbios-devel/arch/sparc32/ofmem_sparc32.c @@ -21,8 +21,7 @@
#define OF_MALLOC_BASE ((char*)OFMEM + ALIGN_SIZE(sizeof(ofmem_t), 8))
-/* Temporarily very small */ -#define MEMSIZE (1 * 1024) +#define MEMSIZE (256 * 1024) static union { char memory[MEMSIZE]; ofmem_t ofmem;