login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
26
Re: [PATCH] x86: Fix boot protocol KEEP_SEGMENTS check.
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Jeremy Fitzhardinge
Subject:
Re: [PATCH] x86: Fix boot protocol KEEP_SEGMENTS check.
Date: Friday, October 26, 2007 - 11:52 am
Eric W. Biederman wrote:
quoted text
> The kernel only ever supports 1 version of the boot protocol > so there is no need to check the boot protocol revision to > see if a feature is supported. > > Both x86 and x86_64 support the same boot protocol so we need > to implement the KEEP_SEGMENTS on x86_64 as well. It isn't > just paravirt bootloaders that could use this functionality. >
Ack. I was planning on sending this patch out today... J
quoted text
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> > Cc: Jeremy Fitzhardinge <jeremy@xensource.com> > Cc: Rusty Russell <rusty@rustcorp.com.au> > Cc: H. Peter Anvin <hpa@zytor.com> > Cc: Vivek Goyal <vgoyal@in.ibm.com> > Cc: James Bottomley <James.Bottomley@HansenPartnership.com> > Cc: Zachary Amsden <zach@vmware.com> > Cc: Andi Kleen <ak@suse.de> > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Ingo Molnar <mingo@elte.hu> > --- > arch/x86/boot/compressed/head_32.S | 12 ++++-------- > arch/x86/boot/compressed/head_64.S | 7 +++++++ > arch/x86/kernel/asm-offsets_64.c | 10 ++++++++++ > 3 files changed, 21 insertions(+), 8 deletions(-) > > diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S > index a0ae2e7..036e635 100644 > --- a/arch/x86/boot/compressed/head_32.S > +++ b/arch/x86/boot/compressed/head_32.S > @@ -33,24 +33,20 @@ > .globl startup_32 > > startup_32: > - /* check to see if KEEP_SEGMENTS flag is meaningful */ > - cmpw __PLACEHOLDER__1_x207, BP_version(%esi) > - jb 1f > - > + cld > /* test KEEP_SEGMENTS flag to see if the bootloader is asking > * us to not reload segments */ > testb $(1<<6), BP_loadflags(%esi) > - jnz 2f > + jnz 1f > > -1: cli > + cli > movl $(__BOOT_DS),%eax > movl %eax,%ds > movl %eax,%es > movl %eax,%fs > movl %eax,%gs > movl %eax,%ss > - > -2: cld > +1: > > /* Calculate the delta between where we were compiled to run > * at and where we were actually loaded at. This can only be done > diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S > index 4946764..1ccb38a 100644 > --- a/arch/x86/boot/compressed/head_64.S > +++ b/arch/x86/boot/compressed/head_64.S > @@ -29,6 +29,7 @@ > #include <asm/pgtable.h> > #include <asm/page.h> > #include <asm/msr.h> > +#include <asm/asm-offsets.h> > > .section ".text.head" > .code32 > @@ -36,11 +37,17 @@ > > startup_32: > cld > + /* test KEEP_SEGMENTS flag to see if the bootloader is asking > + * us to not reload segments */ > + testb $(1<<6), BP_loadflags(%esi) > + jnz 1f > + > cli > movl $(__KERNEL_DS), %eax > movl %eax, %ds > movl %eax, %es > movl %eax, %ss > +1: > > /* Calculate the delta between where we were compiled to run > * at and where we were actually loaded at. This can only be done > diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c > index 7e50bda..d1b6ed9 100644 > --- a/arch/x86/kernel/asm-offsets_64.c > +++ b/arch/x86/kernel/asm-offsets_64.c > @@ -15,12 +15,16 @@ > #include <asm/segment.h> > #include <asm/thread_info.h> > #include <asm/ia32.h> > +#include <asm/bootparam.h> > > #define DEFINE(sym, val) \ > asm volatile("\n->" #sym " %0 " #val : : "i" (val)) > > #define BLANK() asm volatile("\n->" : : ) > > +#define OFFSET(sym, str, mem) \ > + DEFINE(sym, offsetof(struct str, mem)) > + > #define __NO_STUBS 1 > #undef __SYSCALL > #undef _ASM_X86_64_UNISTD_H_ > @@ -109,5 +113,11 @@ int main(void) > DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); > BLANK(); > DEFINE(__NR_syscall_max, sizeof(syscalls) - 1); > + > + BLANK(); > + OFFSET(BP_scratch, boot_params, scratch); > + OFFSET(BP_loadflags, boot_params, hdr.loadflags); > + OFFSET(BP_hardware_subarch, boot_params, hdr.hardware_subarch); > + OFFSET(BP_version, boot_params, hdr.version); > return 0; > } >
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] x86: Fix boot protocol KEEP_SEGMENTS check.
, Eric W. Biederman
, (Fri Oct 26, 10:29 am)
Re: [PATCH] x86: Fix boot protocol KEEP_SEGMENTS check.
, H. Peter Anvin
, (Fri Oct 26, 10:59 am)
Re: [PATCH] x86: Fix boot protocol KEEP_SEGMENTS check.
, Eric W. Biederman
, (Fri Oct 26, 11:22 am)
Re: [PATCH] x86: Fix boot protocol KEEP_SEGMENTS check.
, Jeremy Fitzhardinge
, (Fri Oct 26, 11:52 am)
Re: [PATCH] x86: Fix boot protocol KEEP_SEGMENTS check.
, H. Peter Anvin
, (Fri Oct 26, 12:40 pm)
Re: [PATCH] x86: Fix boot protocol KEEP_SEGMENTS check.
, Rusty Russell
, (Tue Oct 30, 5:49 pm)
Re: [PATCH] x86: Fix boot protocol KEEP_SEGMENTS check.
, Jeremy Fitzhardinge
, (Tue Oct 30, 6:10 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Fortier,Vincent [Montreal]
2.6.21.5 june 30th to july 1st date hang?
Jeff Dike
[ PATCH 2/6 ] UML - Formatting fixes around os_{read_write}_file callers
Liam Girdwood
[PATCH 07/13] regulator: regulator test harness
Oleg Nesterov
Re: Getting the new RxRPC patches upstream
Stefan Seyfried
Re: 2.6.19-rc5: grub is much slower resuming from suspend-to-disk than in 2.6.18
linux-netdev
:
Arnaud Ebalard
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0
Jan Engelhardt
Re: [PATCH iptables] extension: add xt_cpu match
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Sebastian Andrzej Siewior
[PATCH 8/8] net/emergency: remove locking from reycling pool if emergncy pools are...
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
git
:
Jakub Narebski
Re: git on MacOSX and files with decomposed utf-8 file names
Brandon Casey
Re: Thunderbird and patches (was Re: [PATCH v2] Enable setting attach as the def...
Christian Couder
[PATCH 1/3] rev-parse: add test script for "--verify"
Ramkumar Ramachandra
Re: [GSoC update] git-remote-svn: The final one
Junio C Hamano
Re: git-rm isn't the inverse action of git-add
openbsd-misc
:
Joachim Schipper
Re: UVC Webcams
Florin Andrei
SOLVED [was: firewall is very slow, something's wrong]
Todd Alan Smith
Re: Microsoft gets the Most Secure Operating Systems award
Neal Hogan
Re: Need Advice: Thinkpad T60 or T61?
Sam Fourman Jr.
Re: Real men don't attack straw men
git-commits-head
:
Linux Kernel Mailing List
ACPI: Disable ARB_DISABLE on platforms where it is not needed
Linux Kernel Mailing List
m68knommu: add read_barrier_depends() and irqs_disabled_flags()
Linux Kernel Mailing List
[MTD] Add mtd panic_write function pointer
Linux Kernel Mailing List
[ARM] pxa: remove duplicate select statements from Kconfig
Linux Kernel Mailing List
mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
Colocation donated by:
Syndicate