AsmFuncs.S revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock#------------------------------------------------------------------------------
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# are licensed and made available under the terms and conditions of the BSD License
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# which accompanies this distribution. The full text of the license may be found at
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock#------------------------------------------------------------------------------
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrockASM_PFX(ExceptionStubHeaderSize): .word ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock#---------------------------------------;
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock#---------------------------------------;
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# The follow algorithm is used for the common interrupt routine.
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# +---------------------+ <-- 16-byte aligned ensured by processor
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# +---------------------+
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# +---------------------+
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# +---------------------+
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# +---------------------+
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# +---------------------+
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# +---------------------+
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# +---------------------+
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock# We need to determine if any extra data was pushed by the exception
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock # All interrupt handlers are invoked through interrupt gates, so
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock # Since here the stack pointer is 16-byte aligned, so
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock## UINT64 Gs, Fs, Es, Ds, Cs, Ss; insure high 16 bits of each is zero
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock # Per X64 calling convention, allocate maximum parameter stack space
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock## skip restore of dr6. We cleared dr6 during the context save.
275c9da86e89f8abf71135cf63d9fc23671b2e60eschrock## Best not let anyone mess with these particular registers...