Mailinglist Archive: radeonhd (64 mails)

< Previous Next >
Re: [radeonhd] Re: Understanding ATI assembler and AtomDis
  • From: Luc Verhaegen <libv@xxxxxxxxx>
  • Date: Sun, 31 Jan 2010 01:16:46 +0100
  • Message-id: <20100131001645.GA13819@xxxxxxxxx>
On Sun, Jan 31, 2010 at 12:44:16AM +0100, Rafał Miłecki wrote:
W dniu 31 stycznia 2010 00:38 użytkownik Rafał Miłecki
<zajec5@xxxxxxxxx> napisał:
W dniu 31 stycznia 2010 00:14 użytkownik Rafał Miłecki
<zajec5@xxxxxxxxx> napisał:
I have one more question about AtomBIOS commands. Could you explain
paramspace, please?

I dumped SetEngineClock operation from my AtomBIOS and it uses:
param[00]
param[01]
param[02]

AFAIU each param is 4 dwords, so 32bit. But it seems we pass only one
ULONG as argument (param):


/****************************************************************************/
// Structures used by SetEngineClockTable
/****************************************************************************/
typedef struct _SET_ENGINE_CLOCK_PARAMETERS
{
 ULONG ulTargetEngineClock;          //In 10Khz unit
}SET_ENGINE_CLOCK_PARAMETERS;

typedef struct _SET_ENGINE_CLOCK_PS_ALLOCATION
{
 ULONG ulTargetEngineClock;          //In 10Khz unit
 COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved;
}SET_ENGINE_CLOCK_PS_ALLOCATION;


does it mean param[01] and param[02] are there just like workspace
variables?

Ahh, it reads only param[00] from but computes other params that are
used in subcalls like:
 000e: 523c              CALL_TABLE  3c  (ComputeMemoryEnginePLL)
:)

Hopefully final (real) question:

SetEngineClock takes only one param which is param[00] I believe.
Following are 3 first lines of SetEngineClock:
0006: 02010100 MOVE param[01] [XXXX] <- param[00] [XXXX]
000a: 02250202 MOVE param[02] [...X] <- 02
000e: 523c CALL_TABLE 3c (ComputeMemoryEnginePLL)

ComputeMemoryEnginePLL takes 2 params. In this case, how
ComputeMemoryEnginePLL is called from SetEngineClock? Is that:
ComputeMemoryEnginePLL(param[00], param[01])
? or maybe:
ComputeMemoryEnginePLL(param[01], param[02])
?

The second, iirc. Iirc, the disassembled code for ComputeMemoryEnginePLL
will be using param[00] and param[01] from its point of view. This POV is
the param pointer of its caller, plus the number of arguments its caller
had.

Atombios bytecode is not always very obvious (i'm sure you know about
this one glaring/huge logic inversion error), but it beats having to
read x86 :)

Luc Verhaegen.
--
To unsubscribe, e-mail: radeonhd+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: radeonhd+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups