From 22e9d2ef23698864cb200981429b528c1fb2cd35 Mon Sep 17 00:00:00 2001 From: NicJA Date: Thu, 1 Jan 2015 20:34:12 +0000 Subject: [PATCH] enable tlsf on pc-x86_64 git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@49884 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- arch/x86_64-pc/kernel/kernel_startup.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86_64-pc/kernel/kernel_startup.c b/arch/x86_64-pc/kernel/kernel_startup.c index 2cf1bf50f6..404b4d27fb 100644 --- a/arch/x86_64-pc/kernel/kernel_startup.c +++ b/arch/x86_64-pc/kernel/kernel_startup.c @@ -63,6 +63,8 @@ static const struct MemRegion PC_Memory[] = {0 , 0 , NULL , 0, 0 } }; +static ULONG allocator = ALLOCATOR_TLSF; + /* * Boot-time global variables. * __KernBootPrivate needs to survive accross warm reboots, so it's put into .data. @@ -155,7 +157,6 @@ void kernel_cstart(const struct TagItem *start_msg) struct TagItem *tag; UBYTE _APICID; UWORD *ranges[] = {NULL, NULL, (UWORD *)-1}; - /* Enable fxsave/fxrstor */ wrcr(cr4, rdcr(cr4) | _CR4_OSFXSR | _CR4_OSXMMEXCPT); @@ -277,6 +278,9 @@ void kernel_cstart(const struct TagItem *start_msg) __KernBootPrivate->debug_y_resolution = vmode->y_resolution; __KernBootPrivate->debug_framebuffer = (void *)(unsigned long)vmode->phys_base + vmode->y_resolution * vmode->bytes_per_scanline; } + + if (cmdline && strstr(cmdline, "notlsf")) + allocator = ALLOCATOR_STD; } /* Prepare GDT */ @@ -368,7 +372,7 @@ void kernel_cstart(const struct TagItem *start_msg) * We reserve one page (PAGE_SIZE) at zero address. We will protect it. */ NEWLIST(&memList); - mmap_InitMemory(mmap, mmap_len, &memList, klo, kick_highest, PAGE_SIZE, PC_Memory, ALLOCATOR_STD); + mmap_InitMemory(mmap, mmap_len, &memList, klo, kick_highest, PAGE_SIZE, PC_Memory, allocator); D(bug("[Kernel] kernel_cstart: Booting exec.library...\n")); -- 2.11.4.GIT