OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [posix/] [mm0/] [include/] [physmem.h] - Blame information for rev 7

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * Physical memory descriptors
3
 *
4
 * Copyright (C) 2007 - 2009 Bahadir Balban
5
 */
6
#ifndef __PAGER_PHYSMEM_H__
7
#define __PAGER_PHYSMEM_H__
8
 
9
/* A compact memory descriptor to determine used/unused pages in the system */
10
struct page_bitmap {
11
        unsigned long pfn_start;
12
        unsigned long pfn_end;
13
        unsigned int map[];
14
};
15
 
16
/* Describes a portion of physical memory. */
17
struct memdesc {
18
        unsigned int start;
19
        unsigned int end;
20
        unsigned int free_cur;
21
        unsigned int free_end;
22
        unsigned int numpages;
23
};
24
 
25
struct membank {
26
        unsigned long start;
27
        unsigned long end;
28
        unsigned long free;
29
        struct page *page_array;
30
};
31
extern struct membank membank[];
32
 
33
/* Describes bitmap of used/unused state for all physical pages */
34
extern struct memdesc physmem;
35
 
36
/* Sets the global page map as used/unused. Aligns input when needed. */
37
int set_page_map(struct page_bitmap *pmap, unsigned long start,
38
                 int numpages, int val);
39
 
40
void init_physmem_primary();
41
void init_physmem_secondary(struct membank *membank);
42
 
43
#endif /* __PAGER_PHYSMEM_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.