1//------------------------------------------------------------------------------ 2// <copyright file="regdump.h" company="Atheros"> 3// Copyright (c) 2004-2010 Atheros Corporation. All rights reserved. 4// 5// 6// Permission to use, copy, modify, and/or distribute this software for any 7// purpose with or without fee is hereby granted, provided that the above 8// copyright notice and this permission notice appear in all copies. 9// 10// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17// 18// 19//------------------------------------------------------------------------------ 20//============================================================================== 21// Author(s): ="Atheros" 22//============================================================================== 23 24#ifndef __REGDUMP_H__ 25#define __REGDUMP_H__ 26 27#ifndef ATH_TARGET 28#include "athstartpack.h" 29#endif 30 31#if defined(AR6001) 32#include "AR6001/AR6001_regdump.h" 33#endif 34#if defined(AR6002) 35#include "AR6002/AR6002_regdump.h" 36#endif 37 38#if !defined(__ASSEMBLER__) 39/* 40 * Target CPU state at the time of failure is reflected 41 * in a register dump, which the Host can fetch through 42 * the diagnostic window. 43 */ 44PREPACK struct register_dump_s { 45 u32 target_id; /* Target ID */ 46 u32 assline; /* Line number (if assertion failure) */ 47 u32 pc; /* Program Counter at time of exception */ 48 u32 badvaddr; /* Virtual address causing exception */ 49 CPU_exception_frame_t exc_frame; /* CPU-specific exception info */ 50 51 /* Could copy top of stack here, too.... */ 52} POSTPACK; 53#endif /* __ASSEMBLER__ */ 54 55#ifndef ATH_TARGET 56#include "athendpack.h" 57#endif 58 59#endif /* __REGDUMP_H__ */ 60