Ignore:
Timestamp:
2013-09-10T17:48:57Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
85147f3
Parents:
86733f3
Message:

new physical memory allocator supporting physical address constrains
the buddy allocator framework is retired and replaced by a two-level bitmap
the allocator can allocate an arbitrary number of frames, not only a power-of-two count

Caution: Change of semantics
The physical memory allocator no longer allocates naturally aligned blocks. If you require an aligned block, specify it as the constraint.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/mm/sun4v/as.c

    r86733f3 rb0c2075  
    6666{
    6767#ifdef CONFIG_TSB
    68         uint8_t order = fnzb32(
    69                 (TSB_ENTRY_COUNT * sizeof(tsb_entry_t)) >> FRAME_WIDTH);
     68        size_t frames =
     69            SIZE2FRAMES(TSB_ENTRY_COUNT * sizeof(tsb_entry_t));
    7070       
    71         uintptr_t tsb = frame_alloc(order, flags, 0);
     71        uintptr_t tsb = frame_alloc(frames, flags, 0);
    7272        if (!tsb)
    7373                return -1;
Note: See TracChangeset for help on using the changeset viewer.