Subversion Repositories HelenOS

Rev

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

Rev 3891 Rev 3908
Line 48... Line 48...
48
 
48
 
49
size_t hardcoded_unmapped_ktext_size = 0;
49
size_t hardcoded_unmapped_ktext_size = 0;
50
size_t hardcoded_unmapped_kdata_size = 0;
50
size_t hardcoded_unmapped_kdata_size = 0;
51
 
51
 
52
uintptr_t last_frame = 0;
52
uintptr_t last_frame = 0;
-
 
53
uintptr_t end_frame = 0;
53
 
54
 
54
static void init_e820_memory(pfn_t minconf)
55
static void init_e820_memory(pfn_t minconf)
55
{
56
{
56
    unsigned int i;
57
    unsigned int i;
57
    pfn_t start, conf;
58
    pfn_t start, conf;
Line 71... Line 72...
71
           
72
           
72
            if (last_frame < ALIGN_UP(e820table[i].base_address +
73
            if (last_frame < ALIGN_UP(e820table[i].base_address +
73
                e820table[i].size, FRAME_SIZE))
74
                e820table[i].size, FRAME_SIZE))
74
                last_frame =
75
                last_frame =
75
                    ALIGN_UP(e820table[i].base_address + e820table[i].size, FRAME_SIZE);
76
                    ALIGN_UP(e820table[i].base_address + e820table[i].size, FRAME_SIZE);
76
        }          
77
        }
77
    }
78
    }
-
 
79
   
-
 
80
    end_frame = last_frame;
78
}
81
}
79
 
82
 
80
static char *e820names[] = {
83
static char *e820names[] = {
81
    "invalid",
84
    "invalid",
82
    "available",
85
    "available",
Line 111... Line 114...
111
{
114
{
112
    pfn_t minconf;
115
    pfn_t minconf;
113
   
116
   
114
    if (config.cpu_active == 1) {
117
    if (config.cpu_active == 1) {
115
        minconf = 1;
118
        minconf = 1;
-
 
119
       
116
#ifdef CONFIG_SMP
120
#ifdef CONFIG_SMP
117
        minconf = max(minconf,
121
        minconf = max(minconf,
118
            ADDR2PFN(AP_BOOT_OFFSET + hardcoded_unmapped_ktext_size +
122
            ADDR2PFN(AP_BOOT_OFFSET + hardcoded_unmapped_ktext_size +
119
            hardcoded_unmapped_kdata_size));
123
            hardcoded_unmapped_kdata_size));
120
#endif
124
#endif
121
        init_e820_memory(minconf);
125
        init_e820_memory(minconf);
122
 
126
       
123
        /* Reserve frame 0 (BIOS data) */
127
        /* Reserve frame 0 (BIOS data) */
124
        frame_mark_unavailable(0, 1);
128
        frame_mark_unavailable(0, 1);
125
       
129
       
126
#ifdef CONFIG_SMP
130
#ifdef CONFIG_SMP
127
        /* Reserve AP real mode bootstrap memory */
131
        /* Reserve AP real mode bootstrap memory */