From: Guillaume Laurès <guillaume.laures@noos.fr>
To: "linuxppc-dev@lists.linuxppc.org" <linuxppc-dev@lists.linuxppc.org>
Subject: Trying to enable backside on a G4
Date: Sat, 08 Jul 2000 01:50:16 +0200 [thread overview]
Message-ID: <39666CB7.DE6B2BC5@noos.fr> (raw)
Hi,
I'm just starting writing kernel-level code :-), and I was trying to set
the L2CR register on a G4 upgrade for a PCI PowerMac (actually a
8600/250 upgraded with a XLR8 MACh Carrier G4 350/233)
So this is my code, extracted from arch/ppc/kernel/setup.c :
/* Programme réalisant l'initialisation du registre l2cr sur G3 ou G4
08/07/00 Guillaume Laures
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/reboot.h>
#include <linux/delay.h>
#include <linux/blk.h>
int main()
{
unsigned long val = 0xb5100000; // XLR8 MACh Carrier G4 350/233
// unsigned long val = 0xb9100000; // XLR8 MACh Carrier G4
350/175
// unsigned long val = 0xb9000000; // Apple G4 450/225 SawTooth
cpu module
// unsigned long val = 0xb5000000; // Apple G4 450/300 ?
if ( ((_get_PVR() >> 16) == 8) || ((_get_PVR() >> 16) == 12) )
{
printk(KERN_INFO "l2cr set to %lx\n", val);
_set_L2CR(0);
// _set_L2CR(val);
return 0;
}
else
return 1;
}
And here is my makefile :
all: l2cr_ini
clean:
rm -f l2cr_ini l2cr_ini.o
l2cr_ini.o: l2cr_ini.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall
-Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing
-D__powerpc__ -fsigned-char -msoft-float -pipe -fno-builtin -ffixed-r2
-Wno-uninitialized -mmultiple -mstring -c l2cr_ini.c
l2cr_ini: l2cr_ini.o
gcc -o l2cr_ini l2cr_ini.o
I can get the .o, but obviously not the executable, does anyone could
help me get it please ?
--
Guillaume
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next reply other threads:[~2000-07-07 23:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-07 23:50 Guillaume Laurès [this message]
2000-07-08 6:15 ` Trying to enable backside on a G4 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
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=39666CB7.DE6B2BC5@noos.fr \
--to=guillaume.laures@noos.fr \
--cc=linuxppc-dev@lists.linuxppc.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.