/kernel/trunk/kernel.config |
---|
50,6 → 50,9 |
# Improved support for hyperthreading |
! [(ARCH=ia32|ARCH=amd64)&CONFIG_SMP=y] CONFIG_HT (y/n) |
# Simics BIOS AP boot fix |
! [(ARCH=ia32|ARCH=amd64)&CONFIG_SMP=y] CONFIG_SIMICS_FIX (y/n) |
# Lazy FPU context switching |
! [(ARCH=mips32&MIPS_MACHINE!=msim&MIPS_MACHINE!=simics)|ARCH=amd64|ARCH=ia32] CONFIG_FPU_LAZY (y/n) |
/kernel/trunk/genarch/src/acpi/matd.c |
---|
144,7 → 144,7 |
} |
/* create madt apic entries index array */ |
madt_entries_index = (struct madt_apic_header * *) malloc(madt_entries_index_cnt * sizeof(struct madt_apic_header * *)); |
madt_entries_index = (struct madt_apic_header * *) early_malloc(madt_entries_index_cnt * sizeof(struct madt_apic_header * *)); |
__u32 index = 0; |
/kernel/trunk/generic/include/mm/frame.h |
---|
59,7 → 59,7 |
#define IS_BUDDY_LEFT_BLOCK_ABS(zone, frame) (((FRAME_INDEX_ABS((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 0) |
#define IS_BUDDY_RIGHT_BLOCK_ABS(zone, frame) (((FRAME_INDEX_ABS((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 1) |
#define ZONE_BLACKLIST_SIZE 4 |
#define ZONE_BLACKLIST_SIZE 8 |
struct zone { |
link_t link; /**< link to previous and next zone */ |
/kernel/trunk/generic/include/mm/as.h |
---|
48,7 → 48,8 |
#define USTACK_ADDRESS USTACK_ADDRESS_ARCH |
#define UDATA_ADDRESS UDATA_ADDRESS_ARCH |
#define FLAG_AS_KERNEL (1<<0) /**< Kernel address space. */ |
#define FLAG_AS_KERNEL (1 << 0) /**< Kernel address space. */ |
#define FLAG_AS_EARLYMALLOC (1 << 1) /**< Use early malloc */ |
enum as_area_type { |
AS_AREA_TEXT = 1, AS_AREA_DATA, AS_AREA_STACK |
/kernel/trunk/generic/src/mm/slab.c |
---|
756,6 → 756,10 |
spinlock_unlock(&slab_cache_lock); |
} |
#ifdef CONFIG_DEBUG |
static int _slab_initialized = 0; |
#endif |
void slab_cache_init(void) |
{ |
int i, size; |
788,6 → 792,9 |
size, 0, |
NULL,NULL,0); |
} |
#ifdef CONFIG_DEBUG |
_slab_initialized = 1; |
#endif |
} |
/**************************************/ |
795,7 → 802,8 |
void * kalloc(unsigned int size, int flags) |
{ |
int idx; |
ASSERT(_slab_initialized); |
ASSERT( size && size <= (1 << SLAB_MAX_MALLOC_W)); |
if (size < (1 << SLAB_MIN_MALLOC_W)) |
/kernel/trunk/generic/src/mm/as.c |
---|
65,7 → 65,7 |
void as_init(void) |
{ |
as_arch_init(); |
AS_KERNEL = as_create(FLAG_AS_KERNEL); |
AS_KERNEL = as_create(FLAG_AS_KERNEL | FLAG_AS_EARLYMALLOC); |
if (!AS_KERNEL) |
panic("can't create kernel address space\n"); |
} |
78,7 → 78,10 |
{ |
as_t *as; |
as = (as_t *) early_malloc(sizeof(as_t)); |
if (flags & FLAG_AS_EARLYMALLOC) |
as = (as_t *) early_malloc(sizeof(as_t)); |
else |
as = (as_t *) malloc(sizeof(as_t)); |
if (as) { |
list_initialize(&as->as_with_asid_link); |
spinlock_initialize(&as->lock, "as_lock"); |
/kernel/trunk/arch/amd64/Makefile.inc |
---|
73,6 → 73,10 |
DEFS += -DCONFIG_HT |
endif |
ifeq ($(CONFIG_SIMICS_FIX),y) |
DEFS += -DCONFIG_SIMICS_FIX |
endif |
ARCH_SOURCES = \ |
arch/$(ARCH)/src/dummy.s \ |
arch/$(ARCH)/src/fpu_context.c \ |
/kernel/trunk/arch/ia32/Makefile.inc |
---|
91,6 → 91,9 |
ifeq ($(CONFIG_HT),y) |
DEFS += -DCONFIG_HT |
endif |
ifeq ($(CONFIG_SIMICS_FIX),y) |
DEFS += -DCONFIG_SIMICS_FIX |
endif |
ARCH_SOURCES = \ |
arch/$(ARCH)/src/context.s \ |
/kernel/trunk/arch/ia32/src/mm/frame.c |
---|
53,7 → 53,14 |
#ifdef CONFIG_SMP |
/* Reserve AP real mode bootstrap memory */ |
frame_region_not_free(AP_BOOT_OFFSET, hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size); |
#ifdef CONFIG_SIMICS_FIX |
/* Don't know why, but this addresses help */ |
frame_region_not_free(0xf000,FRAME_SIZE); |
frame_region_not_free(0xe000,FRAME_SIZE); |
frame_region_not_free(0xd000,FRAME_SIZE); |
#endif |
#endif |
for (i = 0; i < e820counter; i++) { |
if (e820table[i].type == MEMMAP_MEMORY_AVAILABLE) { |