-#ifdef garbage
- /* count up memory */
-
- xorl %eax,%eax /* start with base memory at 0x0 */
- #movl $0xA0000/NBPG,%ecx /* look every 4K up to 640K */
- movl $0xA0,%ecx /* look every 4K up to 640K */
-1: movl (%eax),%ebx /* save location to check */
- movl $0xa55a5aa5,(%eax) /* write test pattern */
- /* flush stupid cache here! (with bcopy(0,0,512*1024) ) */
- cmpl $0xa55a5aa5,(%eax) /* does not check yet for rollover */
- jne 2f
- movl %ebx,(%eax) /* restore memory */
- addl $NBPG,%eax
- loop 1b
-2: shrl $12,%eax
- movl %eax,_Maxmem-KERNBASE
-
- movl $0x100000,%eax /* next, talley remaining memory */
- #movl $((0xFFF000-0x100000)/NBPG),%ecx
- movl $(0xFFF-0x100),%ecx
-1: movl (%eax),%ebx /* save location to check */
- movl $0xa55a5aa5,(%eax) /* write test pattern */
- cmpl $0xa55a5aa5,(%eax) /* does not check yet for rollover */
- jne 2f
- movl %ebx,(%eax) /* restore memory */
- addl $NBPG,%eax
- loop 1b
-2: shrl $12,%eax
- movl %eax,_Maxmem-KERNBASE
-#endif
-