linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Q: Register usage in mpc860 ports
@ 1999-05-21 15:35 Jim Chapman
  1999-05-21 16:36 ` Franz Sirl
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Chapman @ 1999-05-21 15:35 UTC (permalink / raw)
  To: linuxppc-dev


I am porting LinuxPPC to a custom embedded mpc860 board. I am starting
with the mbx port and using home-built egcs-1.1.2 tools on  a Linux
host, using the instructions in
http://members.home.com/mmporter/cross.html

There seem to be register usage conflicts in the MMU TLB handlers. The
code tries to use location 0 (according to the comment) to store a
couple of register values, e.g. in arch/ppc/kernel/head.S

InstructionTLBMiss:
 mtspr M_TW, r20 /* Save a couple of working registers */
 mfcr r20
 stw r20, 0(r0)
 stw r21, 4(r0)

However, I am finding that r0 isn't zero when the MMU exceptions are
taken. Instead, it points to somewhere in the text or data segment. I
hacked the code to save r20 & r21 to a specific memory location and that
fixed that particular problem.

Has anyone else seen this sort of thing when doing a custom port?
Perhaps this is being caused by an init problem since the MBX comments
suggest that E-PPCbug is used to download and init that card but I don't
use EPPCbug? What registers are reserved by the kernel in the MBX port,
apart from r2? What mpc860 register setup should be done in head.S
before going to C?

Thanks

Jim





[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-05-21 16:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-21 15:35 Q: Register usage in mpc860 ports Jim Chapman
1999-05-21 16:36 ` Franz Sirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).