From mboxrd@z Thu Jan 1 00:00:00 1970 To: debian-powerpc@lists.debian.org, stewart.sadler@roke.co.uk, linuxppc-dev@lists.linuxppc.org Subject: External Monitor under Pismo Mime-Version: 1.0 (generated by tm-edit 1.5) Content-Type: multipart/mixed; boundary="Multipart_Mon_Apr__2_13:18:34_2001-1" From: jason@openinformatics.com (Jason E. Stewart) Date: 02 Apr 2001 13:18:34 -0700 Message-ID: <87vgonhx7p.fsf@amadeus.openinformatics.com> Sender: owner-linuxppc-dev@lists.linuxppc.org List-Id: --Multipart_Mon_Apr__2_13:18:34_2001-1 Content-Type: text/plain; charset=US-ASCII Hey All, So after 7 months of flailing I finally got my Pismo to run it's external monitor port, yeah!!! 3 days before I had a talk to give about our OpenSource project, I realized I was going to be using OpenOffice under linux, and I couldn't actually drive a projector... So after I got done panicing I hit google. I find a link on the YDL lists about the 'mirror' program that appears to have been originally written by Paul Mackeras. It gives me the functionality I need, but unfortunately it doesn't seem to work with 2.4 kernels, only 2.2. The program is doing some pretty low-level memory mojo which I am clueless about. Could someone slightly wiser point out what would change between 2.2 and 2.4 that would cause this to break? Is it the base memory offset for the framebuffer? Cheers! jas. --Multipart_Mon_Apr__2_13:18:34_2001-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="mirror2.c" Content-Transfer-Encoding: quoted-printable /* * Copyright (C) 1996 Paul Mackerras (paulus@linuxcare.com.au) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * * Minor changes made by Stewart J Sadler (stewart.sadler@roke.co.uk) Oct= 2000 = */ #include #include #include #include #include #include /* SJS apparently not used = static inline void eieio() { asm volatile("eieio" : :); } */ unsigned long regs; /************************************************************************= / static inline unsigned int ld(int regno) { unsigned int x; asm volatile ("lwbrx %0,0,%1; eieio" : "=3Dr" (x) : "r" (regs + regno= )); return x; } /************************************************************************= / static inline void st(int regno, unsigned int x) { asm volatile ("stwbrx %0,0,%1; eieio" : : "r" (x), "r" (regs + regno)= ); } /************************************************************************= / static void print_usage(void) { printf("Usage =3D mirror2 [-h ][-o mirror_level ][-m offset]\n"); printf(" -h Help/ print usage\n"); printf(" -o Set mirroring to mirror_level (0=3Doff 1=3Don ?)\n"); printf(" -m PCI offset for device as a Hex number\n"); } /************************************************************************= / static void get_arguments(int ac, char **av,int *on,unsigned long *offset= ) { int arg; char *thisArg; = /* defaults */ *on=3D1; *offset=3D0xa0000000; = if(ac=3D=3D1) { print_usage(); } for(arg=3D1;arg