Subversion Repositories HelenOS

Rev

Rev 534 | Rev 537 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 534 Rev 536
Line 36... Line 36...
36
#include <list.h>
36
#include <list.h>
37
#include <synch/spinlock.h>
37
#include <synch/spinlock.h>
38
#include <arch/asm.h>
38
#include <arch/asm.h>
39
#include <arch.h>
39
#include <arch.h>
40
#include <print.h>
40
#include <print.h>
-
 
41
#include <align.h>
41
 
42
 
42
spinlock_t zone_head_lock;       /**< this lock protects zone_head list */
43
spinlock_t zone_head_lock;       /**< this lock protects zone_head list */
43
link_t zone_head;                /**< list of all zones in the system */
44
link_t zone_head;                /**< list of all zones in the system */
44
 
45
 
45
region_t zone_blacklist[ZONE_BLACKLIST_SIZE];
46
region_t zone_blacklist[ZONE_BLACKLIST_SIZE];
Line 60... Line 61...
60
 */
61
 */
61
void frame_init(void)
62
void frame_init(void)
62
{
63
{
63
    if (config.cpu_active == 1) {
64
    if (config.cpu_active == 1) {
64
        zone_init();
65
        zone_init();
65
        frame_region_not_free(config.base, config.base + config.kernel_size + CONFIG_STACK_SIZE);
66
        frame_region_not_free(config.base, config.kernel_size);
66
    }
67
    }
67
 
68
 
68
    frame_arch_init();
69
    frame_arch_init();
69
}
70
}
70
 
71
 
Line 209... Line 210...
209
    count_t index;
210
    count_t index;
210
    index = zone_blacklist_count++;
211
    index = zone_blacklist_count++;
211
    ASSERT(base % FRAME_SIZE == 0);
212
    ASSERT(base % FRAME_SIZE == 0);
212
   
213
   
213
    if (size % FRAME_SIZE != 0) {
214
    if (size % FRAME_SIZE != 0) {
214
        size = size + (FRAME_SIZE - size % FRAME_SIZE);
215
        size = ALIGN(size, FRAME_SIZE);
215
    }
216
    }
216
    ASSERT(size % FRAME_SIZE == 0);
217
    ASSERT(size % FRAME_SIZE == 0);
217
    ASSERT(zone_blacklist_count <= ZONE_BLACKLIST_SIZE);
218
    ASSERT(zone_blacklist_count <= ZONE_BLACKLIST_SIZE);
218
    zone_blacklist[index].base = base;
219
    zone_blacklist[index].base = base;
219
    zone_blacklist[index].size = size;
220
    zone_blacklist[index].size = size;