Changeset 74df77d in mainline for arch/ia32/src/smp


Ignore:
Timestamp:
2005-06-10T16:18:43Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
87cd61f
Parents:
18e0a6c
Message:

Add map_structure() to automate mapping of memory structures that can span multiple pages and/or cross page boundaries.
Change ACPI map_sdt() to use map_structure().

Small changes in MPS code.
The extra frame allocation for accessing frame 0 is unnecessary as it is possible to access frame 0 from kernel address space.
Zero TSS descriptor in the newly prepared GDT.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/smp/mps.c

    r18e0a6c r74df77d  
    405405        struct __processor_entry *pr;
    406406        __address src, dst;
    407         __address frame;
    408407        int i;
    409408
     
    417416        /*
    418417         * We need to access data in frame 0.
    419          */
    420         frame = frame_alloc(0);
    421         map_page_to_frame(frame,0,PAGE_CACHEABLE,0);
     418         * We boldly make use of kernel address space mapping.
     419         */
    422420
    423421        /*
    424422         * Set the warm-reset vector to the real-mode address of 4K-aligned ap_boot()
    425423         */
    426         *((__u16 *) (frame + 0x467+0)) =  ((__address) ap_boot) >> 4;   /* segment */
    427         *((__u16 *) (frame + 0x467+2)) =  0;                            /* offset */
    428        
    429         /*
    430          * Give back and unmap the borrowed frame.
    431          */
    432         map_page_to_frame(frame,0,PAGE_NOT_PRESENT,0);
    433         frame_free(frame);
    434 
     424        *((__u16 *) (PA2KA(0x467+0))) =  ((__address) ap_boot) >> 4;    /* segment */
     425        *((__u16 *) (PA2KA(0x467+2))) =  0;                             /* offset */
     426       
    435427        /*
    436428         * Save 0xa to address 0xf of the CMOS RAM.
     
    472464
    473465                memcopy(gdt, gdt_new, GDT_ITEMS*sizeof(struct descriptor));
     466                memsetb(&gdt_new[TSS_DES], sizeof(struct descriptor), 0);
    474467                gdtr.base = KA2PA((__address) gdt_new);
    475468
Note: See TracChangeset for help on using the changeset viewer.