22,10 → 22,16 |
int flags; |
} zone_t; |
|
typedef struct |
{ |
count_t count; |
addr_t frames[18]; |
}phismem_t; |
|
# define PA2KA(x) (((u32_t) (x)) + OS_BASE) |
# define KA2PA(x) (((u32_t) (x)) - OS_BASE) |
|
# define PA2KA(x) (((addr_t) (x)) + OS_BASE) |
# define KA2PA(x) (((addr_t) (x)) - OS_BASE) |
|
#define PAGE_SIZE 4096 |
#define FRAME_WIDTH 12 |
|
50,10 → 56,13 |
|
void init_mm(); |
|
pfn_t core_alloc(u32_t order); |
addr_t __fastcall core_alloc(u32_t order); |
void __fastcall core_free(addr_t frame); |
|
pfn_t alloc_page() __attribute__ ((deprecated)); |
pfn_t __stdcall alloc_pages(count_t count) __asm__ ("_alloc_pages") __attribute__ ((deprecated)); |
|
void core_free(pfn_t frame); |
void frame_free(pfn_t frame); |
|
void __fastcall frame_set_parent(pfn_t pfn, void *data); |
void* __fastcall frame_get_parent(pfn_t pfn); |