x86: introduce kernel/head32.c
PATCH 1/1 x86: introduce kernel/head32.c
Quoted 1 line
From
7143f15993be4709e59c43fb65b086a8402e589bMon Sep 17 00:00:00 2001
From: [email protected] (Eric W. Biederman)
Date: Sat, 23 Feb 2008 09:58:20 +0100
Subject: [PATCH] x86: introduce kernel/head32.c
Copy x86_64 and add a head32.c so we can start moving early architecture initialization out of assembly.
---
Based on original submission from Eric:
http://lkml.org/lkml/2007/4/30/337
I just updated it to x86
Only build tested on 64bit x86 but looks trivially correct.
Sam
arch/x86/Makefile | 6 +++--- arch/x86/kernel/Makefile | 3 +-- arch/x86/kernel/head32.c | 14 ++++++++++++++ arch/x86/kernel/head_32.S | 2 +- 4 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 arch/x86/kernel/head32.c
arch/x86/Makefile +3 -3
@@ -159,9 +159,9 @@ KBUILD_AFLAGS += $(mflags-y) ### # Kernel objects -head-y := arch/x86/kernel/head_$(BITS).o -head-$(CONFIG_X86_64) += arch/x86/kernel/head64.o -head-y += arch/x86/kernel/init_task.o +head-y := arch/x86/kernel/head_$(BITS).o +head-y += arch/x86/kernel/head$(BITS).o +head-y += arch/x86/kernel/init_task.o libs-y += arch/x86/lib/
arch/x86/kernel/Makefile +1 -2
@@ -2,8 +2,7 @@ # Makefile for the linux kernel. # -extra-y := head_$(BITS).o init_task.o vmlinux.lds -extra-$(CONFIG_X86_64) += head64.o +extra-y := head_$(BITS).o head$(BITS).o init_task.o vmlinux.lds CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
arch/x86/kernel/head32.c new file +14 -0
@@ -0,0 +1,14 @@ +/* +* linux/arch/i386/kernel/head32.c -- prepare to run common code +* +* Copyright (C) 2000 Andrea Arcangeli <[email protected]> SuSE +* Copyright (C) 2007 Eric Biederman <[email protected]> +*/ + +#include <linux/init.h> +#include <linux/start_kernel.h> + +void __init i386_start_kernel (void ) +{ +start_kernel (); +}
arch/x86/kernel/head_32.S +1 -1
@@ -450,7 +450,7 @@ is386: movl $2,%ecx # set MP jmp initialize_secondary # all other CPUs call initialize_secondary 1: #endif /* CONFIG_SMP */ - jmp start_kernel + jmp i386_start_kernel /* * We depend on ET to be correct. This checks for 287/387.
Signature · 1 line
1.5.4.rc3.14.g44397
Ingo Molnar
AppliedQuoted 7 lines · Sam Ravnborg
Quoted 1 line
From
7143f15993be4709e59c43fb65b086a8402e589bMon Sep 17 00:00:00 2001From: [email protected] (Eric W. Biederman)
Date: Sat, 23 Feb 2008 09:58:20 +0100
Subject: [PATCH] x86: introducekernel/head32.cCopy
x86_64and add ahead32.cso we can start moving early architecture initialization out of assembly.
thanks, applied.
Ingo