[lkml]   [2012]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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
> ( 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.


H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

 \ /
  Last update: 2012-04-19 19:03    [W:0.096 / U:0.640 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site