Changeset 328f2934 in mainline for arch/mips32/src/mm/frame.c


Ignore:
Timestamp:
2005-12-04T19:37:13Z (20 years ago)
Author:
Sergey Bondari <bondari@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cf585c9
Parents:
d7ac642
Message:

Buddy allocator for physical memory complete implementation.
Tested on IA32, AMD64, MIPS32. RWLock Test #5 is not passed.
NOTE: Other architectures could be broken (but should not be)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/src/mm/frame.c

    rd7ac642 r328f2934  
    3333#include <config.h>
    3434#include <panic.h>
     35#include <print.h>
    3536
    3637void frame_arch_init(void)
    3738{
    38         zone_t *z;
    39        
    40         z = zone_create(0, config.memory_size, 0);
    41         if (!z) {
    42                 panic("Can't allocate zone (%dB).\n", config.memory_size);
    43         }
    44         zone_attach(z);
    45 
    4639        /* Disable Everything until load address */
    47         frame_region_not_free(0, KA2PA(KERNEL_LOAD_ADDRESS));
     40        frame_region_not_free(0, KA2PA(KERNEL_LOAD_ADDRESS) + FRAME_SIZE);
     41        zone_create_in_region(0, config.memory_size & ~(FRAME_SIZE-1));
    4842}
Note: See TracChangeset for help on using the changeset viewer.