Re: > 1GB on alpha. Patch to 1TB?

Richard Henderson (rth@twiddle.net)
Sat, 13 Mar 1999 10:45:38 -0800


--CE+1k2dSO48ffgeK
Content-Type: text/plain; charset=us-ascii

On Wed, Mar 10, 1999 at 11:57:38PM -0600, Bob McElrath wrote:
> It seems simple to me to modify these two files to support up to 1TB memory
> on the alpha, as opposed to the hard-coded limit of 1GB now. It appears the
> 21172 will only decode 40 bits of address, not 64, but that's 1TB...

With 32-bit PCI devices, it is difficult to get past 2GB RAM. More
than that requires either bounce buffers or that PCI windows be
adjusted at runtime to cope with the various outstanding DMA requests.
Which would be cool, but i think fairly tricky to modify all the
drivers to get right.

However, there's no reason we can't support 2GB instead of 1.

r~

--CE+1k2dSO48ffgeK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=d-axp-223

diff -rup 2.2.3/arch/alpha/kernel/core_cia.c 2.2.3-axp/arch/alpha/kernel/core_cia.c
--- 2.2.3/arch/alpha/kernel/core_cia.c Sun Sep 6 10:34:33 1998
+++ 2.2.3-axp/arch/alpha/kernel/core_cia.c Sat Mar 13 10:09:24 1999
@@ -535,8 +535,6 @@ cia_init_arch(unsigned long *mem_start,
* Set up the PCI->physical memory translation windows.
* For now, windows 1,2 and 3 are disabled. In the future,
* we may want to use them to do scatter/gather DMA.
- *
- * Window 0 goes at 1 GB and is 1 GB large.
*/

*(vuip)CIA_IOC_PCI_W0_BASE = 1U | (CIA_DMA_WIN_BASE_DEFAULT & 0xfff00000U);
diff -rup 2.2.3/arch/alpha/kernel/core_pyxis.c 2.2.3-axp/arch/alpha/kernel/core_pyxis.c
--- 2.2.3/arch/alpha/kernel/core_pyxis.c Mon Oct 12 11:40:12 1998
+++ 2.2.3-axp/arch/alpha/kernel/core_pyxis.c Sat Mar 13 10:09:35 1999
@@ -427,8 +427,6 @@ pyxis_native_window_setup(void)
* Set up the PCI->physical memory translation windows.
* For now, windows 1,2 and 3 are disabled. In the future, we may
* want to use them to do scatter/gather DMA.
- *
- * Window 0 goes at 1 GB and is 1 GB large.
*/

*(vuip)PYXIS_W0_BASE = 1U | (PYXIS_DMA_WIN_BASE_DEFAULT & 0xfff00000U);
diff -rup 2.2.3/include/asm-alpha/core_cia.h 2.2.3-axp/include/asm-alpha/core_cia.h
--- 2.2.3/include/asm-alpha/core_cia.h Wed Jan 13 10:42:49 1999
+++ 2.2.3-axp/include/asm-alpha/core_cia.h Sat Mar 13 10:20:59 1999
@@ -77,14 +77,14 @@
#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 */

-#define CIA_DMA_WIN_BASE_DEFAULT (1024*1024*1024)
-#define CIA_DMA_WIN_SIZE_DEFAULT (1024*1024*1024)
+#define CIA_DMA_WIN_BASE_DEFAULT (2UL*1024*1024*1024)
+#define CIA_DMA_WIN_SIZE_DEFAULT (2UL*1024*1024*1024)

#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
-#define CIA_DMA_WIN_BASE CIA_DMA_WIN_SIZE_DEFAULT
+#define CIA_DMA_WIN_BASE CIA_DMA_WIN_BASE_DEFAULT
#define CIA_DMA_WIN_SIZE CIA_DMA_WIN_SIZE_DEFAULT
#endif

diff -rup 2.2.3/include/asm-alpha/core_pyxis.h 2.2.3-axp/include/asm-alpha/core_pyxis.h
--- 2.2.3/include/asm-alpha/core_pyxis.h Sun Dec 27 15:21:50 1998
+++ 2.2.3-axp/include/asm-alpha/core_pyxis.h Sat Mar 13 10:20:42 1999
@@ -74,8 +74,8 @@
#define PYXIS_MEM_R2_MASK 0x07ffffff /* SPARSE Mem region 2 mask is 27 bits */
#define PYXIS_MEM_R3_MASK 0x03ffffff /* SPARSE Mem region 3 mask is 26 bits */

-#define PYXIS_DMA_WIN_BASE_DEFAULT (1024*1024*1024)
-#define PYXIS_DMA_WIN_SIZE_DEFAULT (1024*1024*1024)
+#define PYXIS_DMA_WIN_BASE_DEFAULT (2UL*1024*1024*1024)
+#define PYXIS_DMA_WIN_SIZE_DEFAULT (2UL*1024*1024*1024)

#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM_SETUP)
#define PYXIS_DMA_WIN_BASE alpha_mv.dma_win_base
diff -rup 2.2.3/include/asm-alpha/semaphore-helper.h 2.2.3-axp/include/asm-alpha/semaphore-helper.h
--- 2.2.3/include/asm-alpha/semaphore-helper.h Sat Mar 13 10:43:40 1999
+++ 2.2.3-axp/include/asm-alpha/semaphore-helper.h Sat Mar 13 10:22:20 1999
@@ -90,9 +90,9 @@ waking_non_zero_interruptible(struct sem
"1: ldq_l %1,%4\n"
" lda %0,0\n"
" addq %1,1,%2\n"
- " ldah %3,0x8000(%1)\n"
+ " ldah %3,-32768(%1)\n"
" cmovne %5,%6,%0\n"
- " ldah %3,0x8000(%3)\n"
+ " ldah %3,-32768(%3)\n"
" cmovge %1,1,%0\n"
" cmovne %5,%2,%1\n"
" cmovge %2,%3,%1\n"
diff -rup 2.2.3/include/asm-alpha/semaphore.h 2.2.3-axp/include/asm-alpha/semaphore.h
--- 2.2.3/include/asm-alpha/semaphore.h Sat Mar 13 10:43:40 1999
+++ 2.2.3-axp/include/asm-alpha/semaphore.h Sat Mar 13 10:21:46 1999
@@ -141,8 +141,8 @@ extern inline int down_trylock(struct se
" subq %1,1,%1\n"
" blt %2,2f\n"
" blt %1,2f\n"
- " ldah %1,0x8000(%1)\n"
- " ldah %1,0x8000(%1)\n"
+ " ldah %1,-32768(%1)\n"
+ " ldah %1,-32768(%1)\n"
" lda %0,1\n"
" stq_c %1,%3\n"
" beq %1,3f\n"

--CE+1k2dSO48ffgeK--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/