ArchDebugSupport.c revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/** @file
Public include file for Debug Port Library.
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "DebugAgent.h"
/**
Read the offset of FP / MMX / XMM registers by register index.
@param[in] Index Register index.
@param[out] Width Register width returned.
@return Offset in register address range.
**/
)
{
if (Index < SOFT_DEBUGGER_REGISTER_ST0) {
switch (Index) {
}
}
if (Index < SOFT_DEBUGGER_REGISTER_XMM0) {
*Width = 10;
} else if (Index < SOFT_DEBUGGER_REGISTER_MM0 ) {
*Width = 16;
} else {
*Width = 8;
}
return (UINT16)(OFFSET_OF(DEBUG_DATA_IA32_FX_SAVE_STATE, St0Mm0) + (Index - SOFT_DEBUGGER_REGISTER_ST0) * 16);
}
/**
Write specified register into save CPU context.
@param[in] CpuContext Pointer to saved CPU context.
@param[in] Index Register index value.
@param[in] Offset Offset in register address range.
@param[in] Width Data width to read.
@param[in] RegisterBuffer Pointer to input buffer with data.
**/
)
{
if (Index < SOFT_DEBUGGER_REGISTER_FP_BASE) {
} else {
//
// If it is MMX register, adjust its index position
//
if (Index >= SOFT_DEBUGGER_REGISTER_MM0) {
}
//
//
}
}
/**
Read register value from saved CPU context.
@param[in] CpuContext Pointer to saved CPU context.
@param[in] Index Register index value.
@param[in] Offset Offset in register address range
@param[in] Width Data width to read.
@return The address of register value.
**/
UINT8 *
)
{
if (Index < SOFT_DEBUGGER_REGISTER_FP_BASE) {
if (*Width == 0) {
}
} else {
//
//
}
return Buffer;
}
/**
Read group register of common registers.
@param[in] CpuContext Pointer to saved CPU context.
@param[in] RegisterGroup Pointer to Group registers.
**/
)
{
}
/**
Initialize IDT entries to support source level debug.
**/
)
{
//
// Use current CS as the segment selector of interrupt gate in IDT
//
CodeSegment = AsmReadCs ();
//
// If the exception is masked to be reserved, skip it
//
continue;
}
}
}