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



    \
     
     \ /
      Last update: 2012-04-19 19:03    [W:0.024 / U:1.344 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site