Re: [Gems-users] Using Magic Instruction on sparc64-linux


Date: Mon, 20 Mar 2006 15:48:05 -0700
From: "Liqun Cheng" <liqun.cheng@xxxxxxxxx>
Subject: Re: [Gems-users] Using Magic Instruction on sparc64-linux
Gene,

We used magic instruction on bagle sucessfully. The problem is magic-breakpoint-enable (on linux?) will only be triggered when the value of g0 is 0x40000.

So you need either use "sethi 0x40000, %g0", or write a handler by yourself. Here is my python script, you can use it as a reference.

Cheers
Legion

@def call_back_1(cpu):
   pr("call back triggered\n")

@def hap_callback(user_arg, cpu, arg):
   eax = cpu.eax
   if eax == 1:
      call_back_1(cpu)
   else:
      print "Unknown callback"

@SIM_hap_add_callback("Core_Magic_Instruction", hap_callback, None)
[← Prev in Thread] Current Thread [Next in Thread→]
  • Re: [Gems-users] Using Magic Instruction on sparc64-linux, Liqun Cheng <=