* [patch][rfa] Mapping base for BoardCfg::add_memory
@ 2003-05-26 17:16 Dave Brolley
0 siblings, 0 replies; only message in thread
From: Dave Brolley @ 2003-05-26 17:16 UTC (permalink / raw)
To: sid
[-- Attachment #1: Type: text/plain, Size: 352 bytes --]
Hi,
Some architectures have complex memory maps and so I found it necessary
on the port I'm working with to defer the setting of the base of the
mapping passed to BoardCfg::add_memory. The base is now explictely set
to zero where requred, but left unset when passed to add_memory.
Tested on an internal port and on xstormy16.
ok to commit?
Dave
[-- Attachment #2: mapbase.patch.txt --]
[-- Type: text/plain, Size: 1627 bytes --]
Index: sid/main/dynamic/commonCfg.cxx
===================================================================
RCS file: /cvs/src/src/sid/main/dynamic/commonCfg.cxx,v
retrieving revision 1.3
diff -c -p -r1.3 commonCfg.cxx
*** sid/main/dynamic/commonCfg.cxx 16 Apr 2003 22:01:07 -0000 1.3
--- sid/main/dynamic/commonCfg.cxx 26 May 2003 16:46:13 -0000
*************** void BoardCfg::add_icache (const string
*** 1078,1084 ****
void BoardCfg::add_memory (const Mapping &m)
{
if (main_mapper)
! main_mapper->map (m);
}
--- 1102,1111 ----
void BoardCfg::add_memory (const Mapping &m)
{
if (main_mapper)
! {
! Mapping map(m);
! main_mapper->map (map.base(0));
! }
}
Index: sid/main/dynamic/mainDynamic.cxx
===================================================================
RCS file: /cvs/src/src/sid/main/dynamic/mainDynamic.cxx,v
retrieving revision 1.3
diff -c -p -r1.3 mainDynamic.cxx
*** sid/main/dynamic/mainDynamic.cxx 9 Jan 2003 04:22:50 -0000 1.3
--- sid/main/dynamic/mainDynamic.cxx 26 May 2003 16:46:13 -0000
*************** void try_add_memory (const string memspe
*** 381,390 ****
i != bases.end(); ++i)
{
Mapping m = Mapping()
! .slave(mem).bus(port).base(0)
.low(*i).high((*i) + size - 1);
if (map)
! map->map (m);
else if (board)
board->add_memory (m);
else
--- 385,394 ----
i != bases.end(); ++i)
{
Mapping m = Mapping()
! .slave(mem).bus(port)
.low(*i).high((*i) + size - 1);
if (map)
! map->map (m.base(0));
else if (board)
board->add_memory (m);
else
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-05-26 17:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-26 17:16 [patch][rfa] Mapping base for BoardCfg::add_memory Dave Brolley
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 read-only IMAP folder(s) and NNTP newsgroup(s).