From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 24031 invoked from network); 11 Mar 1999 06:21:19 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 11 Mar 1999 06:21:19 -0000 Received: from ares.cs.Virginia.EDU (ares.cs.Virginia.EDU [128.143.136.41] (may be forged)) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id BAA06769 for ; Thu, 11 Mar 1999 01:14:11 -0500 Received: from adder.cs.Virginia.EDU (adder.cs.Virginia.EDU [128.143.137.18]) by ares.cs.Virginia.EDU (8.9.2/8.9.2/UVACS-1999030200) with ESMTP id BAA14960; Thu, 11 Mar 1999 01:13:59 -0500 (EST) From: Greg Lindahl Received: (from lindahl@localhost) by adder.cs.Virginia.EDU (8.8.5/8.8.5) id BAA01846; Thu, 11 Mar 1999 01:13:59 -0500 (EST) Message-Id: <199903110613.BAA01846@adder.cs.Virginia.EDU> Subject: Re: > 1GB on alpha. Patch to 1TB? To: axp-list@redhat.com Date: Thu, 11 Mar 1999 01:13:58 -0500 (EST) Cc: debian-alpha@lists.debian.org, linux-kernel@vger.rutgers.edu In-Reply-To: from "Bob McElrath" at Mar 10, 99 11:57:38 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > It appears that Linux on the alpha is limited to 1GB of physical RAM. This > is bad. It really seems silly to be limited to 1GB of RAM on a 64-bit > processor. It is entertaining that you posted this to axp-list -- Bjorn Bjornsson posted a patch yesterday on axp-list to get 2GB on his AlphaServer 800. A similar patch should suffice on other platforms, and may take us up to 4GB, where the PCI address limit dictates bounce buffers... I reproduce his posting and patch below. I would love to see 264DP systems with 4-8 gigs of ram. They have 16 dimm slots. -- greg From: "Bjorn R. Bjornsson" Subject: More than 1GB RAM with AlphaLinux (was ... 4-8GB RAM) To: axp-list@redhat.com Date: Tue, 9 Mar 1999 22:05:13 +0000 (GMT) If I read the code correctly, then few of the Alpha systems support more than 1GB RAM running Linux with an unmodified kernel. However it should be fairly straightforward to support more than 1GB of physical RAM on most Alpha systems, although I must admit it took me quite some time to get an AlphaServer 800 (aka Corelle) to run with more than 1GB. PCI limitations ought not to show up until you try go past 4GB. Following is a patch to linux/include/asm-alpha/cia_core.h to allow the AlphaServer 800 to support 2GB of RAM (I'm also including a uu-encoded version of the patch below). --- linux-2.2.3/include/asm-alpha/core_cia.h Wed Jan 13 18:42:49 1999 +++ linux-2.2.3-brbkludge/include/asm-alpha/core_cia.h Tue Mar 9 21:25:01 1999 @@ -77,14 +77,49 @@ #define CIA_MEM_R2_MASK 0x07ffffff /* SPARSE Mem region 2 mask is 27 bits */ #define CIA_MEM_R3_MASK 0x03ffffff /* SPARSE Mem region 3 mask is 26 bits */ +/* + * Kludge to enable 2GB RAM on Alphaserver 800 (Corelle). + * The AlphaLinux firmware/chipset/pci code is in need of a + * bit of rewrite, but this kludge is quick, dirty and works. + * + * It is imperative for these changes to work that that + * the SRM initialized PCI configuration is not preserved + * at boot time, ie. say NO to 'Use SRM PCI setup' during + * kernel config (On the AlphaServer 800, SRM always comes + * up with a DMA_WIN_BASE at 1GB * and DMA_WIN_SIZE of 1GB, + * regardless of the amount of memory). + * + * Similar KLUDGES should work for other Alpha systems, although + * the SX164 should support 2GB without changes. + * Also I see no reason why, setting the dma window at 4GB and + * size of 4GB, would not enable the Corelle to run with 4GB of + * RAM. + * + * For further info contact: Bjorn R. Bjornsson, brb@halo.hi.is + */ +#define BRB_2GB_KLUDGE +#ifdef BRB_2GB_KLUDGE +#define CIA_DMA_WIN_BASE_DEFAULT 0x80000000 /* fixed, 2G @ 2G */ +#define CIA_DMA_WIN_SIZE_DEFAULT 0x80000000 /* fixed, 2G @ 2G */ +#else #define CIA_DMA_WIN_BASE_DEFAULT (1024*1024*1024) #define CIA_DMA_WIN_SIZE_DEFAULT (1024*1024*1024) +#endif + #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM_SETUP) #define CIA_DMA_WIN_BASE alpha_mv.dma_win_base #define CIA_DMA_WIN_SIZE alpha_mv.dma_win_size #else +/* + * The next source line used to read: + * #define CIA_DMA_WIN_BASE CIA_DMA_WIN_SIZE_DEFAULT + * + * Which is almost certainly a typo, but is literally a Freudian + * slip, in view of the chipset spec. + */ +#define CIA_DMA_WIN_BASE CIA_DMA_WIN_BASE_DEFAULT #define CIA_DMA_WIN_SIZE CIA_DMA_WIN_SIZE_DEFAULT #endif @@ -553,6 +588,12 @@ #define __outw cia_outw #define __outl cia_outl +#ifdef BRB_2GB_KLUDGE +#define __readb cia_readb +#define __readw cia_readw +#define __writeb cia_writeb +#define __writew cia_writew +#else #ifdef CONFIG_ALPHA_SRM_SETUP #define __readb cia_srm_readb #define __readw cia_srm_readw @@ -563,6 +604,7 @@ #define __readw cia_readw #define __writeb cia_writeb #define __writew cia_writew +#endif #endif #define __readl cia_readl Here is the uuencoded version: begin 644 AS800-2GB-patch M+2TM(&QI;G5X+3(N,BXS+VEN8VQU9&4O87-M+6%L<&AA+V-O"TR+C(N,RUB2!A;F0@=V]R:W,N"BL@*@HK("H@270@:7,@:6UP97)A=&EV M92!F;W(@=&AE7,@8V]M97,**R`J('5P('=I M=&@@82!$34%?5TE.7T)!4T4@870@,4="("H@86YD($1-05]724Y?4TE:12!O M9B`Q1T(L"BL@*B!R96=A2P@#@P,#`P,#`P("`@("`@+RH@9FEX960L(#)'($`@ M,D<@*B\**R-D969I;F4@0TE!7T1-05]724Y?4TE:15]$149!54Q4("`@(#!X M.#`P,#`P,#`@("`@("`O*B!F:7AE9"P@,D<@0"`R1R`J+PHK(V5LF4*("-E;'-E"BLO*@HK("H@5&AE(&YE>'0@2!A('1Y<&\L(&)U="!I