Changeset 04225a7 in mainline


Ignore:
Timestamp:
2006-02-04T19:06:07Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3260ada
Parents:
55ab0f1
Message:

Fixed boot process not to call malloc when slab not initialized.
Added simics workaround.

Files:
9 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/Makefile.inc

    r55ab0f1 r04225a7  
    7474endif
    7575
     76ifeq ($(CONFIG_SIMICS_FIX),y)
     77        DEFS += -DCONFIG_SIMICS_FIX
     78endif
     79
    7680ARCH_SOURCES = \
    7781        arch/$(ARCH)/src/dummy.s \
  • arch/ia32/Makefile.inc

    r55ab0f1 r04225a7  
    9292        DEFS += -DCONFIG_HT
    9393endif
     94ifeq ($(CONFIG_SIMICS_FIX),y)
     95        DEFS += -DCONFIG_SIMICS_FIX
     96endif
    9497
    9598ARCH_SOURCES = \
  • arch/ia32/src/mm/frame.c

    r55ab0f1 r04225a7  
    5454                /* Reserve AP real mode bootstrap memory */
    5555                frame_region_not_free(AP_BOOT_OFFSET, hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size);
     56               
     57#ifdef CONFIG_SIMICS_FIX
     58                /* Don't know why, but this addresses help */
     59                frame_region_not_free(0xf000,FRAME_SIZE);
     60                frame_region_not_free(0xe000,FRAME_SIZE);
     61                frame_region_not_free(0xd000,FRAME_SIZE);
     62#endif
    5663#endif
    5764               
  • genarch/src/acpi/matd.c

    r55ab0f1 r04225a7  
    145145
    146146        /* create madt apic entries index array */
    147         madt_entries_index = (struct madt_apic_header * *) malloc(madt_entries_index_cnt * sizeof(struct madt_apic_header * *));
     147        madt_entries_index = (struct madt_apic_header * *) early_malloc(madt_entries_index_cnt * sizeof(struct madt_apic_header * *));
    148148
    149149        __u32 index = 0;
  • generic/include/mm/as.h

    r55ab0f1 r04225a7  
    4949#define UDATA_ADDRESS   UDATA_ADDRESS_ARCH
    5050
    51 #define FLAG_AS_KERNEL  (1<<0)          /**< Kernel address space. */
     51#define FLAG_AS_KERNEL      (1 << 0)    /**< Kernel address space. */
     52#define FLAG_AS_EARLYMALLOC (1 << 1)    /**< Use early malloc */
    5253
    5354enum as_area_type {
  • generic/include/mm/frame.h

    r55ab0f1 r04225a7  
    6060#define IS_BUDDY_RIGHT_BLOCK_ABS(zone, frame)   (((FRAME_INDEX_ABS((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 1)
    6161
    62 #define ZONE_BLACKLIST_SIZE     4
     62#define ZONE_BLACKLIST_SIZE     8
    6363
    6464struct zone {
  • generic/src/mm/as.c

    r55ab0f1 r04225a7  
    6666{
    6767        as_arch_init();
    68         AS_KERNEL = as_create(FLAG_AS_KERNEL);
     68        AS_KERNEL = as_create(FLAG_AS_KERNEL | FLAG_AS_EARLYMALLOC);
    6969        if (!AS_KERNEL)
    7070                panic("can't create kernel address space\n");
     
    7979        as_t *as;
    8080
    81         as = (as_t *) early_malloc(sizeof(as_t));
     81        if (flags & FLAG_AS_EARLYMALLOC)
     82                as = (as_t *) early_malloc(sizeof(as_t));
     83        else
     84                as = (as_t *) malloc(sizeof(as_t));
    8285        if (as) {
    8386                list_initialize(&as->as_with_asid_link);
  • generic/src/mm/slab.c

    r55ab0f1 r04225a7  
    756756        spinlock_unlock(&slab_cache_lock);
    757757}
     758
     759#ifdef CONFIG_DEBUG
     760static int _slab_initialized = 0;
     761#endif
    758762
    759763void slab_cache_init(void)
     
    789793                                                     NULL,NULL,0);
    790794        }
     795#ifdef CONFIG_DEBUG       
     796        _slab_initialized = 1;
     797#endif
    791798}
    792799
     
    796803{
    797804        int idx;
    798        
     805
     806        ASSERT(_slab_initialized);
    799807        ASSERT( size && size <= (1 << SLAB_MAX_MALLOC_W));
    800808       
  • kernel.config

    r55ab0f1 r04225a7  
    5151! [(ARCH=ia32|ARCH=amd64)&CONFIG_SMP=y] CONFIG_HT (y/n)
    5252
     53# Simics BIOS AP boot fix
     54! [(ARCH=ia32|ARCH=amd64)&CONFIG_SMP=y] CONFIG_SIMICS_FIX (y/n)
     55
    5356# Lazy FPU context switching
    5457! [(ARCH=mips32&MIPS_MACHINE!=msim&MIPS_MACHINE!=simics)|ARCH=amd64|ARCH=ia32] CONFIG_FPU_LAZY (y/n)
Note: See TracChangeset for help on using the changeset viewer.