Subversion Repositories HelenOS-historic

Rev

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

Rev 205 Rev 273
Line 159... Line 159...
159
    return sum == ct->ext_table_checksum;
159
    return sum == ct->ext_table_checksum;
160
}
160
}
161
 
161
 
162
void mps_init(void)
162
void mps_init(void)
163
{
163
{
164
    __u8 *addr[2] = { NULL, (__u8 *) 0xf0000 };
164
    __u8 *addr[2] = { NULL, (__u8 *) PA2KA(0xf0000) };
165
    int i, j, length[2] = { 1024, 64*1024 };
165
    int i, j, length[2] = { 1024, 64*1024 };
166
   
166
   
167
 
167
 
168
    /*
168
    /*
169
     * Find MP Floating Pointer Structure
169
     * Find MP Floating Pointer Structure
170
     * 1a. search first 1K of EBDA
170
     * 1a. search first 1K of EBDA
171
     * 1b. if EBDA is undefined, search last 1K of base memory
171
     * 1b. if EBDA is undefined, search last 1K of base memory
172
     *  2. search 64K starting at 0xf0000
172
     *  2. search 64K starting at 0xf0000
173
     */
173
     */
174
 
174
 
175
    addr[0] = (__u8 *) (ebda ? ebda : 639 * 1024);
175
    addr[0] = (__u8 *) PA2KA(ebda ? ebda : 639 * 1024);
176
    for (i = 0; i < 2; i++) {
176
    for (i = 0; i < 2; i++) {
177
        for (j = 0; j < length[i]; j += 16) {
177
        for (j = 0; j < length[i]; j += 16) {
178
            if (*((__u32 *) &addr[i][j]) == FS_SIGNATURE && mps_fs_check(&addr[i][j])) {
178
            if (*((__u32 *) &addr[i][j]) == FS_SIGNATURE && mps_fs_check(&addr[i][j])) {
179
                fs = (struct mps_fs *) &addr[i][j];
179
                fs = (struct mps_fs *) &addr[i][j];
180
                goto fs_found;
180
                goto fs_found;
Line 193... Line 193...
193
        if (fs->mpfib2 >> 7) {
193
        if (fs->mpfib2 >> 7) {
194
            printf("%s: PIC mode not supported\n", __FUNCTION__);
194
            printf("%s: PIC mode not supported\n", __FUNCTION__);
195
            return;
195
            return;
196
        }
196
        }
197
 
197
 
198
        ct = fs->configuration_table;
198
        ct = (struct mps_ct *)PA2KA((__address)fs->configuration_table);
199
        frame_not_free((__address) ct);
199
        frame_not_free((__address) ct);
200
        config.cpu_count = configure_via_ct();
200
        config.cpu_count = configure_via_ct();
201
    }
201
    }
202
    else
202
    else
203
        config.cpu_count = configure_via_default(fs->config_type);
203
        config.cpu_count = configure_via_default(fs->config_type);
Line 221... Line 221...
221
    if (ct->oem_table) {
221
    if (ct->oem_table) {
222
        printf("%s: ct->oem_table not supported\n", __FUNCTION__);
222
        printf("%s: ct->oem_table not supported\n", __FUNCTION__);
223
        return 1;
223
        return 1;
224
    }
224
    }
225
   
225
   
226
    l_apic = ct->l_apic;
226
    l_apic = (__u32 *)PA2KA((__address)ct->l_apic);
227
 
227
 
228
    cnt = 0;
228
    cnt = 0;
229
    cur = &ct->base_table[0];
229
    cur = &ct->base_table[0];
230
    for (i=0; i < ct->entry_count; i++) {
230
    for (i=0; i < ct->entry_count; i++) {
231
        switch (*cur) {
231
        switch (*cur) {
Line 331... Line 331...
331
         * Multiple IO APIC's are currently not supported.
331
         * Multiple IO APIC's are currently not supported.
332
         */
332
         */
333
        return;
333
        return;
334
    }
334
    }
335
   
335
   
336
    io_apic = ioa->io_apic;
336
    io_apic = (__u32 *)PA2KA((__address)ioa->io_apic);
337
}
337
}
338
 
338
 
339
//#define MPSCT_VERBOSE
339
//#define MPSCT_VERBOSE
340
void ct_io_intr_entry(struct __io_intr_entry *iointr)
340
void ct_io_intr_entry(struct __io_intr_entry *iointr)
341
{
341
{