Changeset fa62f19 in rtems


Ignore:
Timestamp:
12/11/09 20:52:41 (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 5, master
Children:
e0d83f69
Parents:
f36eeb3
Message:

2009-12-11 Joel Sherrill <joel.sherrill@…>

  • page.c: Use bsp_mem_size.
Location:
c/src/lib/libcpu/i386
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/i386/ChangeLog

    rf36eeb3 rfa62f19  
     12009-12-11      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * page.c: Use bsp_mem_size.
     4
    152009-10-28  Till Straumann <strauman@slac.stanford.edu>
    26
  • c/src/lib/libcpu/i386/page.c

    rf36eeb3 rfa62f19  
    3232static page_directory *pageDirectory;
    3333
    34 extern uint32_t   rtemsFreeMemStart;
    35 
     34extern uint32_t   bsp_mem_size;
    3635
    3736/*************************************************************************/
     
    7372int init_paging(void)
    7473{
    75   int memorySize;
    7674  int nbPages;
    7775  int nbInitPages;
     
    8280  int nbTables=0;
    8381
    84   /*
    85    * rtemsFreeMemStart is the last valid 32-bits address
    86    * so the size is rtemsFreeMemStart + 4
    87    */
    88   memorySize = rtemsFreeMemStart + 4;
    89 
    90   nbPages = ( (memorySize - 1) / PG_SIZE ) + 1;
    91   nbTables = ( (memorySize - 1) / FOUR_MB ) + 2;
     82  nbPages = ( (bsp_mem_size - 1) / PG_SIZE ) + 1;
     83  nbTables = ( (bsp_mem_size - 1) / FOUR_MB ) + 2;
    9284
    9385  /* allocate 1 page more to page alignement */
Note: See TracChangeset for help on using the changeset viewer.