From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9603270451.AA00439@brillig.amt.tay1.dec.com> Date: Tue, 26 Mar 96 23:51:34 -0500 From: Jay Estabrook - Alpha Migration Tools - LINUX Project Subject: Re: EB164 libraries and hardware access In-Reply-To: <199603271128.LAA26141@moondance.np.ac.sg> > 3. Other axp software in redhat 2.1 that needs hardware access > doesn't run and causes memory violations. This includes > the graphics libraries, programs compiled with the graphics > libraries, and even the io portion of libc.a (with _inb() etc). > > 4. This is due to the libraries not yet being ported to the > EB164 hardware environment????? Yes, you're correct; the current LIBC implementation of _inb/_outb and siblings, supports most of the Alpha platforms but not all, namely the EB164 and JENSEN. There is development going on to port GNU LIBC to the Alphas; this port *WILL* adapt its implementation of _inb/_outb to the platform on which it is running. The same will be true of the Xservers, as they will use that GNU LIBC, and use a similar technique to that employed by GNU LIBC, to mmap bus memory (frame buffers) appropriately for the given platform. But neither are ready yet... :-( > Any help greatly appreciated. Have patience, or start hacking... :-) To the latter end, you could try this for tailoring _inb/_outb to the EB164: FIRST MAKE A COPY OF THE APP YOU WILL BE PATCHING!!!! Then, using GDB, load the unstripped app, and do: gdb> set write on <--------- to allow writing to the image gdb> exec app <--------- app is the name of the executable gdb> x/i ioperm+204 <--------- examine 1 instruction at ioperm+204 this will dump an instruction which should be: lda a5,4103 <---------- in hex, 22bf1007 along with the address of that instruction, something *like* 0x120214814. Now, change the value of the short at the above address (which was 0x1007), like so: gdb> set {short}0x120214814 = 0x1216 Now, when you quit gracefully from GDB, the executable will have been patched. Try running it to see if it now works on the EB164. WARNING!!! This will only make _inb/_outb and siblings do the right thing on the EB164 for that app, and it will no longer work on any other machine! WARNING!!! This will *NOT* make bus memory space accesses work, like trying to read VGA BIOS ROM, or dump things directly into the VGA memory aperture at 0xA0000 through 0xBFFFF, as I fear "svgalib" may attempt. These must be solved via source code mods, which I won't go into here; Email me privately if you wish more details. If you've done everything right, and only _inb/_outb are required by the app for correct operation, it *should* work; that's how I did the EV5 versions of the S3 and TGA Xservers (with 4-5 additional patches only)... :-) Good luck... --Jay++ ------------------------------------------------------------------------------- American Non Sequitur Society: we don't make sense, but we do like pizza... Jay A Estabrook Alpha Migration Tools Mailstop: TAY1-2 (DTN) 227-4202 Digital Equipment Corp. (external) (508) 952-4202 151 Taylor Street enet: jestabro@amt.tay1.dec.com Littleton, MA 01460-1407 decnet: tallis::jestabro -------------------------------------------------------------------------------