Subject: Re: CVS commit: syssrc/sys/arch/arc/conf
To: M. Warner Losh <imp@bsdimp.com>
From: Noriyuki Soda <soda@sra.co.jp>
List: port-arc
Date: 12/04/2002 19:02:02
>>>>> On Wed, 04 Dec 2002 01:49:18 -0700 (MST),
	"M. Warner Losh" <imp@bsdimp.com> said:

> However, there are two problems.  First problem is that the magic
> number should be 0407 not 0413 in order for the BIOS' run command to
> be able to run the binary.

Perhaps using usr.bin/elf2ecoff (or, even old OpenBSD elf2ecoff
source) may be safer way to load the kernel to rPC44 in this point,
although I'm not really sure.

> However, shortly after we load the OS, we get a panic accessing
> either address 0x00000004 or addres 0x00a000a4[sic].  I'd have
> expected it to be 0x000a0000 or so since that's where the video RAM
> is (well, we really should be accessing it via 0xa00a0000 because it
> should be treated, I think, as uncached physical memory).

Hmmm, strange.
pccons for rPC44 is intialized via following path:

kern/init_main.c:main()
  -> arch/arc/arc/machdep.c:consinit()
    -> arch/arc/arc/c_isa.c:c_isa_cons_init() via (*platform->cons_init)()
      -> arch/arc/isa/pccons_isa.c:pccons_isa_cnattach()
        -> arch/arc/dev/pccons.c:pccons_common_cnattach()

In this point, arc_bus_io and arc_bus_mem, which are initialized in
arch/arc/arc/p_dti_arcstation.c:p_dti_arcstation_init(), should be
passed to pccons_common_cnattach(), so that pccons must access
framebuffer via arc_bus_mem with RPC44_V_ISA_MEM offset (== 0xa0000000).
But perhaps I made some mistakes in this rPC44 code path.

Anyway, thanks for the work!
--
soda