Changeset dba84ff in mainline


Ignore:
Timestamp:
2005-04-26T10:02:47Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
434f700
Parents:
85bfdcc8
Message:

Separate EBDA detection from MP Specification code. EBDA address will be needed during ACPI initialization.

Location:
arch/ia32
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/Makefile.inc

    r85bfdcc8 rdba84ff  
    2525        arch/proc/scheduler.c \
    2626        arch/acpi/acpi.c \
     27        arch/bios/bios.c \
    2728        arch/smp/ap.S \
    2829        arch/smp/apic.c \
  • arch/ia32/src/ia32.c

    r85bfdcc8 rdba84ff  
    6868
    6969        if (config.cpu_active == 1) {
     70                bios_init();
    7071                i8042_init();   /* a20 bit */
    7172                i8259_init();   /* PIC */
  • arch/ia32/src/smp/mp.c

    r85bfdcc8 rdba84ff  
    4747#include <arch/i8259.h>
    4848#include <arch/asm.h>
     49#include <arch/bios/bios.h>
    4950#include <arch/acpi/madt.h>
    5051
     
    133134
    134135        /*
    135          * First place to search the MP Floating Pointer Structure is the Extended
    136          * BIOS Data Area. We have to read EBDA segment address from the BIOS Data
    137          * Area. Unfortunatelly, this memory is in page 0, which has intentionally no
    138          * mapping.
    139          */
    140         frame = frame_alloc(FRAME_KA);
    141         map_page_to_frame(frame,0,PAGE_CACHEABLE,0);
    142         addr = *((__u16 *) (frame + 0x40e)) * 16;
    143         map_page_to_frame(frame,frame,PAGE_CACHEABLE,0);
    144         frame_free(frame);     
    145 
    146         /*
    147136         * EBDA can be undefined. In that case addr would be 0.
    148137         */
    149         if (addr >= 0x1000) {
     138        addr = ebda;
     139        if (addr) {
    150140                cnt = 1024;
    151141                while (addr = __u32_search(addr,cnt,FS_SIGNATURE)) {
     
    156146                }
    157147        }
    158        
    159         /*
    160          * Second place where the MP Floating Pointer Structure may live is the last
    161          * kilobyte of base memory.
    162          */
    163         addr = 639*1024;
    164         cnt = 1024;
    165         while (addr = __u32_search(addr,cnt,FS_SIGNATURE)) {
    166                 if (mp_fs_check((__u8 *) addr))
    167                         goto fs_found;
    168                 addr++;
    169                 cnt--;
     148        else {
     149                /*
     150                 * Second place where the MP Floating Pointer Structure may live is the last
     151                 * kilobyte of base memory.
     152                 */
     153                addr = 639*1024;
     154                cnt = 1024;
     155                while (addr = __u32_search(addr,cnt,FS_SIGNATURE)) {
     156                        if (mp_fs_check((__u8 *) addr))
     157                                goto fs_found;
     158                        addr++;
     159                        cnt--;
     160                }
    170161        }
    171162
Note: See TracChangeset for help on using the changeset viewer.