Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Port amigappc



On Sat, Jan 06, 2007 at 09:50:12AM +0100, Frank Wille wrote:
> Hi!
> 
> I'm currently analyzing and experimenting with the amigappc port, to get a
> better understanding for kernel-programming.
> 
> After many years amigappc compiles and links again, but I have a problem
> with the exception handlers from powerpc/powerpc/trap_subr.S: They are using
> the "bla" instruction to branch into the actual kernel, which forces the
> kernel to reside in a region from 0x00000000 to 0x03ffffff or 0xfc000000 to
> 0xffffffff.
> 
> Unfortunately Amigas have their Fast-RAM between 0x07000000 and 0x0fffffff,
> which is out of range. What would be the most elegant solution?
> 
> Maybe implement a stub near the exception address space, which does
> something like:
> 
> s_trap:
>     bl  s_trap2
>     .long   s_trap_kernel   # R_PPC_ADDR32 reloc
> s_trap2:
>     mflr    r11
>     lwz r11,0(r11)
>     mtlr    r11
>     blr

Uh, no. This creates stalls waiting for the memory  read.

There's a load high (or was it or to high) instruction in the PPC
instruction set, and you can tell the assembler/linker to put the
high part of the address in there. There are examples.

        -is




Home | Main Index | Thread Index | Old Index