1/// @file 2/// IPF specific Debug Breakpoint Registers accessing functions 3/// 4/// Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> 5/// This program and the accompanying materials 6/// are licensed and made available under the terms and conditions of the BSD License 7/// which accompanies this distribution. The full text of the license may be found at 8/// http://opensource.org/licenses/bsd-license.php. 9/// 10/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12/// 13/// Module Name: AccessDbr.s 14/// 15/// 16 17//--------------------------------------------------------------------------------- 18//++ 19// AsmReadDbr 20// 21// This routine is used to Reads the current value of Data Breakpoint Register (DBR). 22// 23// Arguments : 24// 25// On Entry : The 8-bit DBR index to read. 26// 27// Return Value: The current value of DBR by Index. 28// 29//-- 30//---------------------------------------------------------------------------------- 31.text 32.type AsmReadDbr, @function 33.proc AsmReadDbr 34.regstk 1, 0, 0, 0 35 36AsmReadDbr:: 37 mov r8 = dbr[in0];; 38 br.ret.dpnt b0;; 39.endp AsmReadDbr 40 41//--------------------------------------------------------------------------------- 42//++ 43// AsmWriteDbr 44// 45// This routine is used to write the current value to Data Breakpoint Register (DBR). 46// 47// Arguments : 48// 49// On Entry : The 8-bit DBR index to read. 50// The value should be written to DBR 51// 52// Return Value: The value written to DBR. 53// 54//-- 55//---------------------------------------------------------------------------------- 56.text 57.type AsmWriteDbr, @function 58.proc AsmWriteDbr 59.regstk 2, 0, 0, 0 60 61AsmWriteDbr:: 62 mov dbr[in0] = in1 63 mov r8 = in1;; 64 srlz.d;; 65 br.ret.dpnt b0;; 66.endp AsmWriteDbr 67 68 69//--------------------------------------------------------------------------------- 70//++ 71// AsmReadIbr 72// 73// This routine is used to Reads the current value of Instruction Breakpoint Register (IBR). 74// 75// Arguments : 76// 77// On Entry : The 8-bit IBR index. 78// 79// Return Value: The current value of IBR by Index. 80// 81//-- 82//---------------------------------------------------------------------------------- 83.text 84.type AsmReadIbr, @function 85.proc AsmReadIbr 86.regstk 1, 0, 0, 0 87 88AsmReadIbr:: 89 mov r8 = ibr[in0];; 90 br.ret.dpnt b0;; 91.endp AsmReadIbr 92 93//--------------------------------------------------------------------------------- 94//++ 95// AsmWriteIbr 96// 97// This routine is used to write the current value to Instruction Breakpoint Register (IBR). 98// 99// Arguments : 100// 101// On Entry : The 8-bit IBR index. 102// The value should be written to IBR 103// 104// Return Value: The value written to IBR. 105// 106//-- 107//---------------------------------------------------------------------------------- 108.text 109.type AsmWriteIbr, @function 110.proc AsmWriteIbr 111.regstk 2, 0, 0, 0 112 113AsmWriteIbr:: 114 mov ibr[in0] = in1 115 mov r8 = in1;; 116 srlz.i;; 117 br.ret.dpnt b0;; 118.endp AsmWriteIbr 119