From: Guillaume Laurès <guillaume.laures@noos.fr>
To: mlan@cpu.lu
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Trying to enable backside on a G4
Date: Sun, 09 Jul 2000 18:35:48 +0200 [thread overview]
Message-ID: <3968A9E4.256BDDBA@noos.fr> (raw)
In-Reply-To: 200007081724.TAA00758@piglet.grunz.lu
[-- Attachment #1: Type: text/plain, Size: 4347 bytes --]
Michel Lanners a écrit :
>
> Attached are actually two patches: the first one fixes the output of
> 'cat /proc/sys/kernel/l2cr', as it contains some errors and omissions.
> This part is only needed on 2.2.x and old 2.3.x kernels; it's integrated
> in 2.4.0-something.
Yes it is.
>
>
> The second patch adds command line functionality for 2.3/2.4 kernels.
Hum, it was included already in 2.4 from linuxcare.
I attached what gives a boot on my G4/8600 with "as it comes options in menuconfig" (exept for the
Adaptec stuff which I had to put in a module or I would still get forever
"SCSI host 2 channel 0 reset (pid 1942) timed out - trying harder
SCSI bus is being reset for host 2 channel 0."
What can I say :
l2cr seems not to be enabled, as confirms a cat /proc/... later
There is a conflict on the Adaptec 3940UW board which wasn't there on 2.2
There is still the "SCSI bus is being reset for host..." problem for the usable half of the card (may
be it's a firmware issue, I use the 4.1/AV firmaware)
eth0 and eth1 have been swapped, which is not cool since this box is may IP-Masqu box...
>
> I'll have to check whether all the steps I've taken to enable the cache
> are actually needed, since all the invalidate stuff should be handled by
> the function I'm calling. But it didn't work last I tried.... Once
> that's decided, I will resubmit the command line patch.
Taken from Motorola's G4 User's Manual is the following :
3.7.4 L2 Cache Initialization
Following a power-on or hard reset, the L2 cache and the L2 cache DLL are disabled
initially. Before enabling the L2 cache, the L2 cache DLL must first be configured through
the L2CR register, and the DLL must be allowed 640 L2 cache clock periods to achieve
phase lock. Before enabling the L2 cache, other configuration parameters must be set in the
L2CR, and the L2 cache tags must be globally invalidated. The L2 cache should be
initialized during system start-up.
The sequence for initializing the L2 cache is as follows:
1. (automatically performed by the assertion of HRESET).
2. Disable L2 cache by clearing L2CR[L2E].
3. Set the L2CR[L2CLK] bits to the desired clock divider setting. Setting a nonzero
value automatically enables the DLL. All other L2 cache configuration bits should
be set to properly configure the L2 cache interface for the SRAM type, size, and
interface timing required.
4. Wait for the L2 cache DLL to achieve phase lock. This can be timed by setting the
decrementer for a time period equal to 640 L2 cache clocks, or by performing an L2
cache global invalidate.
5. Perform an L2 cache global invalidate. The global invalidate could be performed
before enabling the DLL, or in parallel with waiting for the DLL to stabilize. Refer
to Section 3.7.3.7, "L2 Cache Global Invalidation," for more information about L2
cache global invalidation. Note that a global invalidate always takes much longer
than it takes for the DLL to stabilize.
6. After the DLL stabilizes, an L2 cache global invalidate has been performed, and the
other L2 cache configuration bits have been set, enable the L2 cache for normal
operation by setting the L2CR[L2E] bit to 1.
So I attached a correct (I think) user-space script called L2BS_enable.sh which I'm going to
propagate on linuxppc-users, tell me what you think about. I will try to work on kernel space then.
I'm just unsure of the behaviour of :
while test 1 = $((`cat /proc/sys/kernel/l2cr | awk -F : '{print $1}'`&0x00000001)); do wait; done
I couldn't test this loop.
>
>
> > Since :
> > - GrabG3CacheSetting (slightly modified to accept any processor or it would complain that I
> > don't have a G3...) from BenH told me that XLR8's extension sets my G4's L2CR to 0xb5100000
>
> Yeah, could you submit that back to Ben? I've noticed that as well when
> I started to play l2cr...
I did, but it's not good yet. Here is what I did :
Original code is :
[...]
if (cpuFamily != gestaltCPU750)
{
printf("Error, CPU is not a G3\n");
exit(0);
}
printf ("Getting value of G3 L2CR register ...\n");
[...]
I put :
[...]
if ((cpuFamily != gestaltCPU750) || (cpuFamily != gestaltCPU7400))
{
printf("Error, CPU is not a G3, nor a G4\n");
exit(0);
}
[...]
but it doesn't compile, so I had to comment out the whole test... Does anybody knows how to identify
a G4 under MacOS ?
Bye bye,
--
Guillaume
[-- Attachment #2: Document --]
[-- Type: application/octet-stream, Size: 5404 bytes --]
Total memory = 192MB; using 1024kB for hash table (at c0300000)
Linux version 2.4.0-test1-ac21 (root@pm8600) (gcc version 2.95.2 20000313 (Debian GNU/Linux)) #2 Sun Jul 9 13:16:00 CEST 2000
PCI buses 0..1 controlled by bandit at f2000000
Cache coherency enabled for bandit/PSX at f7fed000
PCI bus 2 controlled by chaos at f0000000
On node 0 totalpages: 49152
zone(0): 49152 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/sda5 video=controlfb:vmode:18,cmode:8 l2cr=b5100000 devfs=nomount
l2cr set to 0
System has 32 possible interrupts
via_calibrate_decr: decrementer_count = 124991 (749950 ticks)
Console: colour dummy device 80x25
Calibrating delay loop... 699.60 BogoMIPS
Memory: 188892k available (1640k kernel code, 864k data, 300k init) [c0000000,cc000000]
Dentry-cache hash table entries: 32768 (order: 6, 262144 bytes)
Buffer-cache hash table entries: 16384 (order: 4, 65536 bytes)
Page-cache hash table entries: 65536 (order: 6, 262144 bytes)
kmem_create: Poisoning requested, but con given - bdev_cache
Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
kmem_create: Poisoning requested, but con given - inode_cache
kmem_create: Poisoning requested, but con given - file lock cache
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
PCI: Address space collision on region 1 of device Adaptec AHA-3940U/UW / AIC-7882U
PCI: Address space collision on region 6 of device Adaptec AHA-3940U/UW / AIC-7882U
PCI: Address space collision on region 0 of device Adaptec AHA-3940U/UW / AIC-7882U (#2)
PCI: Address space collision on region 1 of device Adaptec AHA-3940U/UW / AIC-7882U (#2)
PCI: Address space collision on region 6 of device Adaptec AHA-3940U/UW / AIC-7882U (#2)
usb.c: registered new driver hub
Linux NET4.0 for Linux 2.3
Based upon Swansea University Computer Society NET3.039
kmem_create: Poisoning requested, but con given - skbuff_head_cache
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 16384)
Starting kswapd v1.6
controlfb: Memory bank 1 present, bank 2 absent, total VRAM 2MB
Monitor sense value = 0x623, using video mode 18 and color mode 0.
Console: switching to colour frame buffer device 144x54
fb0: control display adapter
PowerMac Z8530 serial driver version 2.0
tty00 at 0xcd809020 (irq = 15) is a Z8530 ESCC, port = modem
tty01 at 0xcd810000 (irq = 16) is a Z8530 ESCC, port = printer
pty: 256 Unix98 ptys configured
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: registered device at major 7
loop: enabling 8 loop devices
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
fd0: SWIM3 floppy controller
scsi0 : MESH
scsi1 : 53C94
scsi : 2 hosts.
mesh: target 0 synchronous at 5.0 MB/s
Vendor: SEAGATE Model: ST34520N Rev: 1281
Type: Direct-Access ANSI SCSI revision: 02
Detected scsi disk sda at scsi0, channel 0, id 0, lun 0
mesh: target 3 synchronous at 5.0 MB/s
Vendor: PIONEER Model: DVD-ROM DVD-303 Rev: 1.10
Type: CD-ROM ANSI SCSI revision: 02
Detected scsi CD-ROM sr0 at scsi0, channel 0, id 3, lun 0
Vendor: IOMEGA Model: ZIP 100 Rev: E.08
Type: Direct-Access ANSI SCSI revision: 02
Detected scsi removable disk sdb at scsi0, channel 0, id 5, lun 0
scsi : detected 1 SCSI cdrom 2 SCSI disks total.
sr0: scsi3-mmc drive: 0x/0x cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.11
SCSI device sda: hdwr sector= 512 bytes. Sectors= 8888924 [4340 MB] [4.3 GB]
Partition check:
/dev/scsi/host0/bus0/target0/lun0: p1 p2 p3 p4 p5 p6 p7 p8
sdb : READ CAPACITY failed.
sdb : status = 0, message = 00, host = 0, driver = 08
sdb : extended sense code = 2
sdb : block size assumed to be 512 bytes, disk size 1GB.
/dev/scsi/host0/bus0/target5/lun0: I/O error: dev 08:10, sector 0
unable to read partition table
eth0: DC21140 at 0x2000 (PCI bus 0, device 15), h/w address 00:00:94:a9:70:7c,
eth0: Using generic MII device control. If the board doesn't operate,
please mail the following dump to the author:
MII device address: 1
MII CR: 3100
MII SR: 7809
MII ID0: 181
MII ID1: b802
MII ANA: 5e1
MII ANC: 0
MII 16: 640
MII 17: f010
MII 18: 6800
and requires IRQ25 (provided by PCI BIOS).
de4x5.c:V0.545 1999/11/28 davies@maniac.ultranet.com
Macintosh ADB mouse driver installed.
eth1: MACE at 00:05:02:ce:c6:1d, chip revision 25.64
DMA sound driver installed, using 4 buffers of 32k.
adb: CUDA driver v0.5 for Unified ADB.
adb devices: [2]: 2 5 [3]: 3 1
ADB keyboard at 2, handler set to 3
ADB mouse at 3, handler set to 2
Macintosh non-volatile memory driver v1.0
usb.c: registered new driver hid
mice: PS/2 mouse device common for all mice
devfs: v0.96 (20000430) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x2
kmem_create: Forcing size word alignment - nfs_fh
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 300k init 36k prep 8k chrp
Adding Swap: 196600k swap-space (priority -1)
eth0: media is 100Mb/s.
eth0: media is TP.
eth0: media is 100Mb/s.
arpwatch uses obsolete (PF_INET,SOCK_PACKET)
device eth1 entered promiscuous mode
eth0: media is TP.
[-- Attachment #3: Unknown Document --]
[-- Type: application/x-sh, Size: 1703 bytes --]
next prev parent reply other threads:[~2000-07-09 16:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-07 23:50 Trying to enable backside on a G4 Guillaume Laurès
2000-07-08 6:15 ` Michel Lanners
2000-07-08 11:40 ` Guillaume Laurès
2000-07-08 17:24 ` Michel Lanners
2000-07-09 16:35 ` Guillaume Laurès [this message]
2000-07-09 20:34 ` Benjamin Herrenschmidt
2000-07-10 22:17 ` Michel Lanners
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3968A9E4.256BDDBA@noos.fr \
--to=guillaume.laures@noos.fr \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=mlan@cpu.lu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).