From 5821f37cb6f1875f5912adc37a01139a159e697c Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 6 Dec 2004 11:44:22 -0500 Subject: Add support for tsunami with 64 processors and fix some console bugs I steped on while doing it console/console.c: Allocate more HWRPB pages so we have room for 64 percpu_rpbs Fix writing of Console Relocation Block virtual addresses so that if they are outside of the first page, which they will be with more than 8 processors, the correct adress is written palcode/Makefile: Update makefile for tsunami with 64 processors palcode/platform_m5.S: Add support for tsunami with 64 processors --- system/alpha/console/console.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'system/alpha/console/console.c') diff --git a/system/alpha/console/console.c b/system/alpha/console/console.c index b4afcaae1..2ab4c6ec8 100644 --- a/system/alpha/console/console.c +++ b/system/alpha/console/console.c @@ -58,7 +58,7 @@ typedef unsigned int uint32; /* Kernel write | kernel read | valid */ #define KPTE(x) ((ul)((((ul)(x)) << 32) | 0x1101)) -#define HWRPB_PAGES 4 +#define HWRPB_PAGES 16 #define MDT_BITMAP_PAGES 4 #define CSERVE_K_JTOKERN 0x18 @@ -480,6 +480,7 @@ unixBoot(int go, int argc, char **argv) first[1] = KPTE(PFN(first)); /* Region 3 */ second[SECOND(0x10000000)] = KPTE(PFN(third_rpb)); /* Region 0 */ + for (i=0;irpb_map[0].rpb_pgcount = HWRPB_PAGES; - printf_lock("Console Callback at 0x%x, fixup at 0x%x \n", + printf_lock("Console Callback at 0x%x, fixup at 0x%x, crb offset: 0x%x\n", rpb_crb->rpb_va_disp, - rpb_crb->rpb_va_fixup ); + rpb_crb->rpb_va_fixup, + rpb->rpb_crb_off); rpb_mdt = (struct _xxm_rpb_mdt *) (((ul)rpb_crb) + sizeof(struct rpb_crb)); rpb->rpb_mdt_off = (ul)rpb_mdt - (ul)rpb; @@ -811,11 +813,7 @@ unixBoot(int go, int argc, char **argv) { ul *ptr = (ul*)((char*)rpb_dsr + sizeof(struct rpb_dsr )); rpb_crb->rpb_pa_disp = KSEG_TO_PHYS(ptr); -#if 0 - rpb_crb->rpb_va_disp = 0x10000000 + ((ul)ptr&(0x2000*HWRPB_PAGES-1)); -#else - rpb_crb->rpb_va_disp = 0x10000000 + ((ul)ptr & 0x1fff); -#endif + rpb_crb->rpb_va_disp = 0x10000000 + (((ul)ptr - (ul)rpb) & (0x2000*HWRPB_PAGES-1)); printf_lock("ConsoleDispatch at virt %x phys %x val %x\n", rpb_crb->rpb_va_disp, rpb_crb->rpb_pa_disp, @@ -823,12 +821,9 @@ unixBoot(int go, int argc, char **argv) *ptr++ = 0; *ptr++ = (ul) consoleCallback; rpb_crb->rpb_pa_fixup = KSEG_TO_PHYS(ptr); -#if 0 - rpb_crb->rpb_va_fixup = 0x10000000 + ((ul)ptr& (0x2000*HWRPB_PAGES-1)); -#else - rpb_crb->rpb_va_fixup = 0x10000000 + ((ul)ptr & 0x1fff); -#endif + rpb_crb->rpb_va_fixup = 0x10000000 + (((ul)ptr - (ul)rpb) & (0x2000*HWRPB_PAGES-1)); *ptr++ = 0; + *ptr++ = (ul) consoleFixup; } -- cgit v1.2.3