Changeset da68871a in mainline for kernel/arch/ia32/src


Ignore:
Timestamp:
2012-08-08T08:46:22Z (13 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
30c0826
Parents:
bc216a0 (diff), 1d01cca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged changes from mainline.

Location:
kernel/arch/ia32/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/boot/multiboot.S

    rbc216a0 rda68871a  
    7373
    7474multiboot_image_start:
     75        cli
    7576        cld
    7677       
     
    7879        movl $START_STACK, %esp
    7980       
    80         /* Initialize Global Descriptor Table register */
     81        /*
     82         * Initialize Global Descriptor Table and
     83         * Interrupt Descriptor Table registers
     84         */
    8185        lgdtl bootstrap_gdtr
     86        lidtl bootstrap_idtr
    8287       
    8388        /* Kernel data + stack */
     
    701706page_directory:
    702707        .space 4096, 0
     708
     709.global bootstrap_idtr
     710bootstrap_idtr:
     711        .word 0
     712        .long 0
    703713
    704714.global bootstrap_gdtr
  • kernel/arch/ia32/src/boot/multiboot2.S

    rbc216a0 rda68871a  
    114114
    115115multiboot2_image_start:
     116        cli
    116117        cld
    117118       
     
    119120        movl $START_STACK, %esp
    120121       
    121         /* Initialize Global Descriptor Table register */
     122        /*
     123         * Initialize Global Descriptor Table and
     124         * Interrupt Descriptor Table registers
     125         */
    122126        lgdtl bootstrap_gdtr
     127        lidtl bootstrap_idtr
    123128       
    124129        /* Kernel data + stack */
  • kernel/arch/ia32/src/boot/vesa_prot.inc

    rbc216a0 rda68871a  
    8888                /* Returned back to protected mode */
    8989               
     90                /*
     91                 * Initialize Global Descriptor Table and
     92                 * Interrupt Descriptor Table registers
     93                 */
     94                lgdtl bootstrap_gdtr
     95                lidtl bootstrap_idtr
     96               
    9097                movzx %ax, %ecx
    9198                mov %ecx, KA2PA(bfb_scanline)
  • kernel/arch/ia32/src/boot/vesa_real.inc

    rbc216a0 rda68871a  
    3030.code32
    3131vesa_init:
     32        lidtl vesa_idtr
    3233        jmp $GDT_SELECTOR(VESA_INIT_DES), $vesa_init_real - vesa_init
     34
     35vesa_idtr:
     36        .word 0x3ff
     37        .long 0
    3338
    3439.code16
  • kernel/arch/ia32/src/boot/vesa_ret.inc

    rbc216a0 rda68871a  
    11.code32
    22vesa_init_protected:
     3        cli
    34        cld
    45       
  • kernel/arch/ia32/src/mm/page.c

    rbc216a0 rda68871a  
    7171        for (cur = 0; cur < min(config.identity_size, config.physmem_end);
    7272            cur += FRAME_SIZE) {
    73                 flags = PAGE_CACHEABLE | PAGE_WRITE;
    74                 if ((PA2KA(cur) >= config.base) &&
    75                     (PA2KA(cur) < config.base + config.kernel_size))
    76                         flags |= PAGE_GLOBAL;
     73                flags = PAGE_GLOBAL | PAGE_CACHEABLE | PAGE_WRITE | PAGE_READ;
    7774                page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
    7875        }
  • kernel/arch/ia32/src/smp/apic.c

    rbc216a0 rda68871a  
    259259}
    260260
    261 static void ipi_wait_for_idle(void)
     261/* Waits for the destination cpu to accept the previous ipi. */
     262static void l_apic_wait_for_delivery(void)
    262263{
    263264        icr_t icr;
    264265       
    265         /* Wait for the destination cpu to accept the previous ipi. */
    266266        do {
    267267                icr.lo = l_apic[ICRlo];
     
    281281
    282282        /* Wait for a destination cpu to accept our previous ipi. */
    283         ipi_wait_for_idle();
     283        l_apic_wait_for_delivery();
    284284       
    285285        icr.lo = l_apic[ICRlo];
     
    298298        l_apic[ICRlo] = icr.lo;
    299299       
    300 #ifdef CONFIG_DEBUG
    301         icr.lo = l_apic[ICRlo];
    302         if (icr.delivs == DELIVS_PENDING) {
    303                 printf("IPI is pending.\n");
    304         }
    305 #endif
    306        
    307300        return apic_poll_errors();
    308301}
     
    320313
    321314        /* Wait for a destination cpu to accept our previous ipi. */
    322         ipi_wait_for_idle();
     315        l_apic_wait_for_delivery();
    323316       
    324317        icr.lo = l_apic[ICRlo];
     
    332325        l_apic[ICRlo] = icr.lo;
    333326       
    334         icr.lo = l_apic[ICRlo];
    335         if (icr.delivs == DELIVS_PENDING) {
    336 #ifdef CONFIG_DEBUG
    337                 printf("IPI is pending.\n");
    338 #endif
    339         }
    340        
    341327        return apic_poll_errors();
    342328}
     
    379365                return 0;
    380366       
     367        l_apic_wait_for_delivery();
     368
    381369        icr.lo = l_apic[ICRlo];
    382         if (icr.delivs == DELIVS_PENDING) {
    383 #ifdef CONFIG_DEBUG
    384                 printf("IPI is pending.\n");
    385 #endif
    386         }
    387        
    388370        icr.delmod = DELMOD_INIT;
    389371        icr.destmod = DESTMOD_PHYS;
     
    518500        dfr.model = MODEL_FLAT;
    519501        l_apic[DFR] = dfr.value;
    520        
    521         if (CPU->arch.id != l_apic_id()) {
    522 #ifdef CONFIG_DEBUG
    523                 printf("lapic error: LAPIC ID (%" PRIu8 ") and hw ID assigned by BSP"
    524                         " (%u) differ. Correcting to LAPIC ID.\n", l_apic_id(),
    525                         CPU->arch.id);
    526 #endif
    527                 CPU->arch.id = l_apic_id();
    528         }
    529        
    530502}
    531503
Note: See TracChangeset for help on using the changeset viewer.