This is the mail archive of the sid@sources.redhat.com mailing list for the SID project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch][rfa] Mapping base for BoardCfg::add_memory


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
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]