2
*-----------------------------------------------------------------------------
3
* Filename: instr_common.h
5
*-----------------------------------------------------------------------------
6
* Copyright © 2002-2010, Intel Corporation.
8
* This program is free software; you can redistribute it and/or modify it
9
* under the terms and conditions of the GNU General Public License,
10
* version 2, as published by the Free Software Foundation.
12
* This program is distributed in the hope it will be useful, but WITHOUT
13
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17
* You should have received a copy of the GNU General Public License along with
18
* this program; if not, write to the Free Software Foundation, Inc.,
19
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21
*-----------------------------------------------------------------------------
23
* Common tools for hardware that uses instruction engines.
24
*-----------------------------------------------------------------------------
27
#ifndef _IGD_INSTR_COMMON_H
28
#define _IGD_INSTR_COMMON_H
30
/* Write instructions macro. */
31
#ifdef DEBUG_BUILD_TYPE
32
#define INSTR_WRITE(data, addr) \
33
if(igd_debug->hal.instr) { \
34
EMGD_DEBUG_S(" addr:%p data:0x%8.8x", ((void *)(addr)), \
35
(unsigned int)(data)); \
37
EMGD_WRITE32 (data, (addr)); \
40
#define IGD_PRINT_INSTR(name) \
41
if(igd_debug->hal.instr) { \
42
EMGD_DEBUG_S("GMCH Instruction: %s", name); \
45
#define INSTR_WRITE(data, addr) EMGD_WRITE32(data, (addr)++);
46
#define IGD_PRINT_INSTR(name)