Changeset ef67bab in mainline for generic/src/main


Ignore:
Timestamp:
2006-02-01T00:02:16Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
071a8ae6
Parents:
fc1e4f6
Message:

Memory management work.
Remove the last (i.e. 'root') argument from page_mapping_insert() and page_mapping_find().
Page table address is now extracted from the first (i.e. 'as') argument.
Add a lot of infrastructure to make the above possible.
sparc64 is now broken, most likely because of insufficient identity mapping of physical memory.

Location:
generic/src/main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • generic/src/main/kinit.c

    rfc1e4f6 ref67bab  
    148148                        panic("config.init_addr is not frame aligned");
    149149               
    150                 as = as_create(NULL, 0);
     150                as = as_create(0);
    151151                if (!as)
    152152                        panic("as_create\n");
     
    159159               
    160160                /*
    161                  * Create the text as_area and copy the userspace code there.
     161                 * Create the text as_area and initialize its mapping.
    162162                 */
    163163               
     
    170170                if (!a)
    171171                        panic("as_area_create: text\n");
    172                
     172
     173                for (i = 0; i < frames; i++)
     174                        as_set_mapping(as, UTEXT_ADDRESS + i * PAGE_SIZE, frame + i * FRAME_SIZE);
     175
    173176                /*
    174177                 * Create the data as_area.
     
    178181                        panic("as_area_create: stack\n");
    179182
    180                 /*
    181                  * Initialize text area mapping.
    182                  */
    183                 for (i = 0; i < frames; i++)
    184                         as_set_mapping(as, UTEXT_ADDRESS + i * PAGE_SIZE, frame + i * FRAME_SIZE);
    185 
    186        
    187183                thread_ready(t);
    188184        }
  • generic/src/main/main.c

    rfc1e4f6 ref67bab  
    139139void main_bsp_separated_stack(void)
    140140{
    141         as_t *as;
    142141        task_t *k;
    143142        thread_t *t;
     
    152151        kconsole_init();
    153152
    154         /* Exception handler initialization, before architecture
     153        /*
     154         * Exception handler initialization, before architecture
    155155         * starts adding its own handlers
    156156         */
     
    163163        early_heap_init(config.heap_addr, config.heap_size + config.heap_delta);
    164164        frame_init();
     165        as_init();
    165166        page_init();
    166167        tlb_init();
     
    190191
    191192        /*
    192          * Create kernel address space.
    193          */
    194         as = as_create(GET_PTL0_ADDRESS(), FLAG_AS_KERNEL);
    195         if (!as)
    196                 panic("can't create kernel address space\n");
    197 
    198         /*
    199193         * Create kernel task.
    200194         */
    201         k = task_create(as);
     195        k = task_create(AS_KERNEL);
    202196        if (!k)
    203197                panic("can't create kernel task\n");
Note: See TracChangeset for help on using the changeset viewer.