[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F90445B.9050106@zytor.com>
Date: Thu, 19 Apr 2012 09:59:07 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Borislav Petkov <bp@...64.org>
CC: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 4/5] x86-64: Handle exception table entries during early
boot
On 04/19/2012 06:02 AM, Borislav Petkov wrote:>> + # 56(%rsp) %rflags
>> + # 48(%rsp) %cs
>> + # 40(%rsp) %rip
>> + # 32(%rsp) error code
>
> Just a question about understanding this: I was strugging with the
> exact interrupt-handler stack layout, so how do you know the exact
> offsets of rflags, cs et all? I've been staring at our APM v2, p. 144
> (http://support.amd.com/us/Processor_TechDocs/24593_APM_v2.pdf) which
> shows the interrupt stack with error code but it has different offsets
> than those above:
>
> [Return SS] 40(%rsp)
> [Return RSP] 32(%rsp)
> [rFLAGS] 24(%rsp)
> [CS] 16(%rsp)
> [RIP] 8(%rsp)
> [ErrorCode] 0(%rsp)
>
> but I see below that we have room for %rax, %rcx and %rdx on the stack.
>
> Are we doing something different in Linux, or what am I missing?
The offsets in my code refer to offsets after we push the vector number,
%rax, %rcx and %rdx onto the stack manually; that is 4*8 = 32 bytes,
hence the offset.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists