Changeset c0b7f00 in mainline


Ignore:
Timestamp:
2005-12-12T11:43:34Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
af9a7c5
Parents:
96c939e
Message:

Allow for different ARC frame size and kernel frame size.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/src/drivers/arc.c

    r96c939e rc0b7f00  
    3535#include <mm/frame.h>
    3636#include <interrupt.h>
     37#include <align.h>
    3738
    3839/* This is a good joke, SGI HAS different types than NT bioses... */
     
    264265        arc_memdescriptor_t *desc;
    265266        int total = 0;
     267        __address base;
     268        size_t basesize;
     269        unsigned int i,j;
    266270
    267271        desc = arc_entry->getmemorydescriptor(NULL);
     
    269273                if (desc->type == FreeMemory ||
    270274                    desc->type == FreeContiguous) {
    271                         total += desc->basecount*ARC_FRAME;
    272                         zone_create_in_region(desc->basepage*ARC_FRAME,
    273                                               desc->basecount*ARC_FRAME);
     275                        base = desc->basepage*ARC_FRAME;
     276                        basesize = desc->basecount*ARC_FRAME;
     277
     278                        if (base % FRAME_SIZE ) {
     279                                basesize -= FRAME_SIZE - (base % FRAME_SIZE);
     280                                base = ALIGN_UP(base, FRAME_SIZE);
     281                        }
     282                        basesize = ALIGN_DOWN(basesize, FRAME_SIZE);
     283
     284                        total += basesize;
     285                        zone_create_in_region(base, basesize);
    274286                }
    275287                desc = arc_entry->getmemorydescriptor(desc);
Note: See TracChangeset for help on using the changeset viewer.