Subject: Re: AE memory size
To: John Ruschmeyer <jruschme@mac.com>
From: Henry B. Hotz <hotz@jpl.nasa.gov>
List: port-mac68k
Date: 09/23/2001 16:14:22
At 6:43 PM -0400 9/22/01, John Ruschmeyer wrote:
>  > From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
>  >

>  > Index: if_ae.c
>>  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>  RCS file: /cvsroot/syssrc/sys/arch/mac68k/dev/if_ae.c,v
>>  retrieving revision 1.67.26.2
>>  diff -u -u -r1.67.26.2 if_ae.c
>>  --- if_ae.c 2000/09/14 06:35:16 1.67.26.2
>>  +++ if_ae.c 2001/09/22 16:01:46
>>  @@ -37,7 +37,7 @@
>>  bus_space_handle_t bsh;
>>  int ofs;
>>  {
>>  - int i1, i2, i3, i4;
>>  + int i1, i2, i3, i4, i8;
>>
>>  /*
>>  * banks; also assume it will generally mirror in upper banks
>>  @@ -47,11 +47,20 @@
>>  i2 =3D (8192 * 1);
>>  i3 =3D (8192 * 2);
>>  i4 =3D (8192 * 3);
>>  + i8 =3D (8192 * 7);
>>
>>  bus_space_write_2(bst, bsh, ofs + i1, 0x1111);
>>  bus_space_write_2(bst, bsh, ofs + i2, 0x2222);
>>  bus_space_write_2(bst, bsh, ofs + i3, 0x3333);
>>  bus_space_write_2(bst, bsh, ofs + i4, 0x4444);
>>  + bus_space_write_2(bst, bsh, ofs + i8, 0x8888);
>>  +
>>  + if (bus_space_read_2(bst, bsh, ofs + i1) =3D=3D 0x1111 &&
>>  +     bus_space_read_2(bst, bsh, ofs + i2) =3D=3D 0x2222 &&
>>  +     bus_space_read_2(bst, bsh, ofs + i3) =3D=3D 0x3333 &&
>>  +     bus_space_read_2(bst, bsh, ofs + i4) =3D=3D 0x4444 &&
>>  +     bus_space_read_2(bst, bsh, ofs + i8) =3D=3D 0x8888)
>>  +  return 8192 * 8;
>>
>>  if (bus_space_read_2(bst, bsh, ofs + i1) =3D=3D 0x1111 &&
>>  bus_space_read_2(bst, bsh, ofs + i2) =3D=3D 0x2222 &&
>>
>>  Back then, Allen suspected problems with cards that have fragmented buff=
er
>>  memory. I have no such card, only some very old fullsize 3COM cards and =
an
>>  Asant=E9 card in my SE/30 which all have 16K and run fine with the patch=
=2E
>
>One thing, the patch seems to omit the extra testing required if the card
>has <64K but mirrors memory from unavailable banks.

I'd have to think too much to be sure, but isn't that the reason why 
the code word is different for each size?