Subject: Re: g4, cache and speculative addressing
To: Riccardo Mottola <rollei@tiscalinet.it>
From: Michael <macallan18@earthlink.net>
List: port-macppc
Date: 06/27/2005 07:03:05
--Signature_Mon__27_Jun_2005_07_03_05_-0400_Mjkrt5m7hgQ_Vo+o
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hello,

> 1. the card I have (from newertech) seems to work fine under macos,
when
> set to the card specs
> 	- 400Mhz (verified to be such with the utility, macos reports
bogus
> data for an unkown cpu probably)
> 	- 1:2 cache (the card was called maxpower 400/200)
> 	- 1Mb cache
> 	- speculative addressing off
> 	- powersaving ON
>=20
> 2. the kernel I have in netbsd has the following cache options line:
>=20
> options 	ALTIVEC		# Include AltiVec support
> options         L2CR_CONFIG=3D"(L2SIZ_1M|L2CLK_20|L2RAM_PIPELINE_BURST)"
> #MaxPower newertech g4 400

Ok, so cache size and ratio should be ok. Does removing
L2RAM_PIPELINE_BURST change anything?

> the kernel was compiled with optimization flags (-maltivec is included
> just by using the option above) and reports the cpu as:
>=20
> cpu0 at mainbus0: 7400 (Revision 2.7), ID 0 (primary)
> cpu0: HID0 8294c0a4<EMCP,ECLK,DOZE,DPM,EIEC,ICE,DCE,SGE,BTIC,BHT>
> cpu0: 409.10 MHz, no-parity 1MB WB L2 cache (PB SRAM) at 2:1 ratio

I'm still wondering why it probes as ~410MHz.=20

> - I don't know if I have a backside cache. To be honest I don't even
> know exactly what a backside cache is. I thought it was essentially
> 1:2 cache on the cpu or the cpu doughterboard.

You do and it essentially means 'cache on a separate bus' - as opposed
to ' cache between CPU and mainboard'.

> - powerlogix states that speculative addressing could be a problem on
> non-g3/g4 computers which get such a processor. But My question is
> "why" ?

No idea, I think it's enables here. ( Phase5 G3 card though )
See arch/powerpc/oea/cpu_subr.c for more flags to play with.

> - the speeds seem reasonable. The powerlogic utility repots a bus
> speed of 44Mhz, when operating in 400/200 mode which would imply a
> multiplyer of 4.545 which is  strange. Anyway it is far below 50Mhz
> and under macos it runs fine.

Are there any switches on the card?

> the powerlogic utility reports the L2CR bytesin hex that it will use.
> Could it be useful to get those? netbsd should come up with the same
> values?

Most definitely and yes I think so. It would at least tell us what MacOS
uses.

have fun
Michael

--Signature_Mon__27_Jun_2005_07_03_05_-0400_Mjkrt5m7hgQ_Vo+o
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (NetBSD)

iQEVAwUBQr/c6cpnzkX8Yg2nAQKc5Qf/c9i9Ag1RELOzHNh+iTVI5hzYJZm6uHHv
g94Yvz53nJcwMukEewb66qPUU/5TurHfKnaIuquuSkA/IsRZEnuGfIgCo5e1PQ33
agY+dzXxYxn50rZ8ZCIHgLODtuKqvCaw8rrqQUKiTT+tO8HYI0KClGYI+OEXq/zj
VcgnswYkq99GuKexdko5GxjfDLpUSS+YHAuGyUWQJrfRAYDV3bTAtVl8T6/CnxBn
PeTY9+VKH+jwiw3e6ljggXWL49Bbc85ExKDGk6DitnCF8sEh7Vf7DFkDW0qmcIj5
mcSQNK76NPfl8VcwEIhaI3H/+nxeanHc7SyOOYE7bQBaqshMeMQgeQ==
=/ulV
-----END PGP SIGNATURE-----

--Signature_Mon__27_Jun_2005_07_03_05_-0400_Mjkrt5m7hgQ_Vo+o--