Subversion Repositories HelenOS-historic

Rev

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

Rev 534 Rev 537
Line 39... Line 39...
39
size_t hardcoded_unmapped_kdata_size = 0;
39
size_t hardcoded_unmapped_kdata_size = 0;
40
 
40
 
41
void frame_arch_init(void)
41
void frame_arch_init(void)
42
{
42
{
43
    zone_t *z;
43
    zone_t *z;
44
    __address start, stop;
-
 
45
    size_t size;
-
 
46
    __u8 i;
44
    __u8 i;
47
   
45
   
48
    if (config.cpu_active == 1) {
46
    if (config.cpu_active == 1) {
49
 
47
 
50
        /* Reserve frame 0 (BIOS data) */
48
        /* Reserve frame 0 (BIOS data) */
51
        frame_region_not_free(0, FRAME_SIZE);
49
        frame_region_not_free(0, FRAME_SIZE);
52
       
50
       
53
        /* Reserve real mode bootstrap memory */
51
        /* Reserve real mode bootstrap memory */
54
        frame_region_not_free(BOOTSTRAP_OFFSET, hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size);
52
        frame_region_not_free(BOOTSTRAP_OFFSET, hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size);
55
       
53
       
56
        for (i=0;i<e820counter;i++) {
54
        for (i = 0; i < e820counter; i++) {
57
            if (e820table[i].type==MEMMAP_MEMORY_AVAILABLE) {
55
            if (e820table[i].type == MEMMAP_MEMORY_AVAILABLE) {
58
                zone_create_in_region(e820table[i].base_address,  e820table[i].size & ~(FRAME_SIZE-1));
56
                zone_create_in_region(e820table[i].base_address,  e820table[i].size & ~(FRAME_SIZE-1));
59
            }
57
            }
60
        }
58
        }
61
    }
59
    }
62
}
60
}