Changeset d47f0e1 in mainline for arch/ia32/src/smp


Ignore:
Timestamp:
2005-06-05T15:18:24Z (21 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e3f41b6
Parents:
d1a184f
Message:

SMP recovery patch #1. (SMP still broken)
Move ap_boot() to K_TEXT_START_2 section.
Change ap_boot() to cope with mapping of kernel address space.
Change some addresses in mps.c from kernel to physical.

MIPS.
Move msim dprinter device to 0xB0000000.
This address is from kseg1 (unmapped, uncached) segment.

Location:
arch/ia32/src/smp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/smp/ap.S

    rd1a184f rd47f0e1  
    3131#
    3232
    33 .text
     33.section K_TEXT_START_2
    3434
    3535#ifdef __SMP__
     
    4848.code16
    4949        cli
    50 
    5150        xorw %ax,%ax
    5251        movw %ax,%ds
     
    5655        orl $1,%eax
    5756        movl %eax,%cr0
     57        jmp 0f
     580:
    5859        ljmp $KTEXT,$jump_to_kernel
    5960
     
    6566        movw %ax,%es
    6667        movw %ax,%ss
    67         movl $ctx,%eax
     68        movl $(ctx-0x80000000),%eax     # KA2PA((__address) &ctx)
    6869        movl (%eax),%esp
    6970
    7071        lidt idtr
    7172
     73        call map_kernel
     74
    7275        ljmp $KTEXT,$main_ap
    7376
  • arch/ia32/src/smp/apic.c

    rd1a184f rd47f0e1  
    209209                        lo = l_apic[ICRlo] & ICRloClear;
    210210                        lo |= ((__address) ap_boot) / 4096; /* calculate the reset vector */
    211                         l_apic[ICRlo] = lo | DLVRMODE_STUP | DESTMODE_PHYS | LEVEL_ASSERT | SHORTHAND_DEST |  TRGRMODE_LEVEL;
     211                        l_apic[ICRlo] = lo | DLVRMODE_STUP | DESTMODE_PHYS | LEVEL_ASSERT | SHORTHAND_DEST | TRGRMODE_LEVEL;
    212212                        delay(200);
    213213                }
  • arch/ia32/src/smp/mps.c

    rd1a184f rd47f0e1  
    159159        if (fs->config_type == 0 && fs->configuration_table) {
    160160                if (fs->mpfib2 >> 7) {
    161                         printf("mps_init: PIC mode not supported\n");
     161                        printf("%s: PIC mode not supported\n", __FUNCTION__);
    162162                        return;
    163163                }
     
    189189               
    190190        if (ct->signature != CT_SIGNATURE) {
    191                 printf("configure_via_ct: bad ct->signature\n");
     191                printf("%s: bad ct->signature\n", __FUNCTION__);
    192192                return 1;
    193193        }
    194194        if (!mps_ct_check()) {
    195                 printf("configure_via_ct: bad ct checksum\n");
     195                printf("%s: bad ct checksum\n", __FUNCTION__);
    196196                return 1;
    197197        }
    198198        if (ct->oem_table) {
    199                 printf("configure_via_ct: ct->oem_table not supported\n");
     199                printf("%s: ct->oem_table not supported\n", __FUNCTION__);
    200200                return 1;
    201201        }
     
    252252                                 */
    253253                                 
    254                                 printf("configure_via_ct: ct badness\n");
     254                                printf("%s: ct badness\n", __FUNCTION__);
    255255                                return 1;
    256256                }
     
    269269         * Not yet implemented.
    270270         */
    271         printf("configure_via_default: not supported\n");
     271        printf("%s: not supported\n", __FUNCTION__);
    272272        return 1;
    273273}
     
    426426         */
    427427        *((__u16 *) (frame + 0x467+0)) =  ((__address) ap_boot) >> 4;   /* segment */
    428         *((__u16 *) (frame + 0x467+2)) =  0x0;  /* offset */
    429        
    430         /*
    431          * Give back the borrowed frame and restore identity mapping for it.
    432          */
    433         map_page_to_frame(frame,frame,PAGE_CACHEABLE,0);
     428        *((__u16 *) (frame + 0x467+2)) =  0;                            /* offset */
     429       
     430        /*
     431         * Give back and unmap the borrowed frame.
     432         */
     433        map_page_to_frame(frame,0,PAGE_NOT_PRESENT,0);
    434434        frame_free(frame);
    435435
     
    473473
    474474                memcopy(gdt, gdt_new, GDT_ITEMS*sizeof(struct descriptor));
    475                 gdtr.base = (__address) gdt_new;
    476 
     475                gdtr.base = KA2PA((__address) gdt_new);
     476               
    477477                if (l_apic_send_init_ipi(pr[i].l_apic_id)) {
    478478                        /*
Note: See TracChangeset for help on using the changeset viewer.