Re: APUS and IOs question

4 messages, 4 authors, 2006-11-10 · open the first message on its own page

Re: APUS and IOs question

From: Simon Richter <hidden>
Date: 2006-11-09 14:34:58

Hi,

Benjamin Herrenschmidt schrieb:
Can you give me a proper explanation of the whole memory map story on it
so I get a better idea of how invasive handling it would be ?
On APUS systems, you have two (major) kinds of memory, that on the Amiga
board and that on the CPU board. The former is generally mapped at
address zero, but you don't want to use it except as DMA buffers when
talking to the internal hardware (because the internal hardware doesn't
see the memory on the CPU board).

The memory on the CPU board is the "main" memory for Linux (because
there is more of it, and the access is faster), but its location is
assigned dynamically during the boot process, and depends on the size of
the memory and on other boards installed.

My plan for moving APUS to arch/powerpc involves writing a new
bootloader (I'm currently hacking binutils to support AmigaOS binaries)
that builds a proper flattened device tree and calls the kernel, but I'm
not sure where the kernel virtual mapping that allows the kernel to run
from a fixed address should be set up -- if in the bootloader, the
kernel needs to be aware that changing the MMU settings will yield
interesting results, and if in the kernel, we need some platform
specific init code to handle that.

   Simon

Re: APUS and IOs question

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-11-09 22:48:31

My plan for moving APUS to arch/powerpc involves writing a new
bootloader (I'm currently hacking binutils to support AmigaOS binaries)
that builds a proper flattened device tree and calls the kernel, but I'm
not sure where the kernel virtual mapping that allows the kernel to run
from a fixed address should be set up -- if in the bootloader, the
kernel needs to be aware that changing the MMU settings will yield
interesting results, and if in the kernel, we need some platform
specific init code to handle that.
Well, the problem is that you basially have to hack the linear mapping,
thus hitting anything that relies on __pa/__va or operating in real mode
indeed.

How do you do for exception vectors ? Since those have to be either at 0
or at ff* ? You stick branches at 0 to jump to where the kernel
resides ?

Ben.

Re: APUS and IOs question

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2006-11-10 02:07:50

On Fri, 10 Nov 2006, Benjamin Herrenschmidt wrote:
quoted
My plan for moving APUS to arch/powerpc involves writing a new
bootloader (I'm currently hacking binutils to support AmigaOS binaries)
that builds a proper flattened device tree and calls the kernel, but I'm
not sure where the kernel virtual mapping that allows the kernel to run
from a fixed address should be set up -- if in the bootloader, the
kernel needs to be aware that changing the MMU settings will yield
interesting results, and if in the kernel, we need some platform
specific init code to handle that.
Well, the problem is that you basially have to hack the linear mapping,
thus hitting anything that relies on __pa/__va or operating in real mode
indeed.

How do you do for exception vectors ? Since those have to be either at 0
or at ff* ? You stick branches at 0 to jump to where the kernel
resides ?
IIRC (Roman please correct me if I'm wrong), APUS has them at ff* because the
memory at adress 0 is slower.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

Re: APUS and IOs question

From: Roman Zippel <hidden>
Date: 2006-11-10 02:23:02

Hi,

On Fri, 10 Nov 2006, Geert Uytterhoeven wrote:
On Fri, 10 Nov 2006, Benjamin Herrenschmidt wrote:
quoted
quoted
My plan for moving APUS to arch/powerpc involves writing a new
bootloader (I'm currently hacking binutils to support AmigaOS binaries)
that builds a proper flattened device tree and calls the kernel, but I'm
not sure where the kernel virtual mapping that allows the kernel to run
from a fixed address should be set up -- if in the bootloader, the
kernel needs to be aware that changing the MMU settings will yield
interesting results, and if in the kernel, we need some platform
specific init code to handle that.
Well, the problem is that you basially have to hack the linear mapping,
thus hitting anything that relies on __pa/__va or operating in real mode
indeed.

How do you do for exception vectors ? Since those have to be either at 0
or at ff* ? You stick branches at 0 to jump to where the kernel
resides ?
IIRC (Roman please correct me if I'm wrong), APUS has them at ff* because the
memory at adress 0 is slower.
Earlier APUS did put the exception vectors at 0, which is slow of course. 
The hardware maps part of the local memory to ff, so the exception vectors 
are copied there and the transfer handler jump to the mapped location.

bye, Roman
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help