From a9b2fb5ee3114fe835f6515b6aeae7454f66d821 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Tue, 16 Oct 2007 01:25:17 +0000 Subject: Finally full multicore support for PortalPlayer 502x targets with an eye towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/pp5020.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'firmware/export/pp5020.h') diff --git a/firmware/export/pp5020.h b/firmware/export/pp5020.h index 5654a7de63..b591bce695 100644 --- a/firmware/export/pp5020.h +++ b/firmware/export/pp5020.h @@ -34,11 +34,15 @@ /* Each processor has two mailboxes it can write to and two which it can read from. We define the first to be for sending messages and the second for replying to messages */ -#define CPU_MESSAGE (*(volatile unsigned long *)(0x60001000)) -#define COP_MESSAGE (*(volatile unsigned long *)(0x60001004)) -#define CPU_REPLY (*(volatile unsigned long *)(0x60001008)) -#define COP_REPLY (*(volatile unsigned long *)(0x6000100c)) -#define MBOX_CONTROL (*(volatile unsigned long *)(0x60001010)) +#define CPU_MESSAGE (*(volatile unsigned long *)(0x60001000)) +#define COP_MESSAGE (*(volatile unsigned long *)(0x60001004)) +#define CPU_REPLY (*(volatile unsigned long *)(0x60001008)) +#define COP_REPLY (*(volatile unsigned long *)(0x6000100c)) +#define MBOX_CONTROL (*(volatile unsigned long *)(0x60001010)) + +/* Simple convenient array-like access */ +#define PROC_MESSAGE(core) ((&CPU_MESSAGE)[core]) +#define PROC_REPLY(core) ((&CPU_REPLY)[core]) /* Interrupts */ #define CPU_INT_STAT (*(volatile unsigned long*)(0x60004000)) @@ -142,6 +146,7 @@ /* Processors Control */ #define CPU_CTL (*(volatile unsigned long *)(0x60007000)) #define COP_CTL (*(volatile unsigned long *)(0x60007004)) +#define PROC_CTL(core) ((&CPU_CTL)[core]) #define PROC_SLEEP 0x80000000 #define PROC_WAIT 0x40000000 -- cgit v1.2.3