All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH envytools] nva: Clean up nva tools doc
       [not found] ` <1408993096-18883-1-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-08-25 18:58   ` Christian Costa
       [not found]     ` <1408993096-18883-3-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Costa @ 2014-08-25 18:58 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

- Sort commands by name for easier update
- Make more readable
- Remove no more existing commands
---
 nva/README | 83 +++++++++++++++++++++++++++++++++-----------------------------
 1 file changed, 44 insertions(+), 39 deletions(-)

diff --git a/nva/README b/nva/README
index 625ea7c..d4347c5 100644
--- a/nva/README
+++ b/nva/README
@@ -3,7 +3,7 @@ registers.
 
 WARNING: these tools *can* and *will* hang your machine if you don't know
 what you're doing. Hardware destruction is likely also possible, although
-no incidents are known to have happened yet. In most cases it's also not
+no incident are known to have happened yet. In most cases it's also not
 recommended to use these tools while a driver is active for a given card.
 
 All programs except nvalist take an optional -c <card number> parameter.
@@ -13,43 +13,48 @@ by the nvalist program.
 
 The programs are:
 
-nvalist: prints a list of cards
-
-nvapeek <address> [<byte count>]: reads 32-bit MMIO register at <address>.
-If byte count is also given, reads all registers in range [address, address
-+ byte count).
-
-nvapeek8 <address> [<byte count>]: like nvapeek, but does 8-bit MMIO accesses
-
-nvapoke <address> <value>: writes a 32-bit <value> to the MMIO register at
-<address>.
-
-nvapoke8 <address> <value>: like nvapoke, but does 8-bit MMIO access
-
-nvawatch [-t] <address>: reads MMIO register at <address> in a loop, prints
-the value every time it changes. If -t is specified, prints a timestamp
-and diff from the previous timestamp before the value. Never quits, needs
-to be manually aborted.
-
-nvahammer <address> <value>: like nvapoke, but repeats the write in
-an infinite loop. Needs to be manually aborted.
-
-nvagetbios [-s <extraction method>]: extracts the card's VBIOS using the
-method given as parameter and writes it to stdout. Method can be PROM or
-PRAMIN. If method is not given, defaults to something sensible.
-
-nvafuzz <address> [<byte count>]: writes random values to a register or
-a register range in an infinite loop. Needs to be manually aborted.
-
-nvascan [-as] <address> [<byte count>]: for each register in a range:
-read it, write 0xffffffff, read it, write 0, read it, write back the
-original value. Helpful to see the valid values for registers. If -s option
-is passed, does a slow scan - waits and reads PMC.ID register between scans
-to recover from errors caused by invalid register accesses. If -a option
-is passed, does a cross-test on all registers in the range to detect aliased
-addresses [not particularly reliable].
-
-nvatiming: attempts to measure what frequency various units of the card are
-running at by using misc tricks.
+nvafuzz <address> [<byte count>]
+    Writes random values to a register or
+    a register range in an infinite loop. Needs to be manually aborted.
+
+nvagetbios [-s <extraction method>]
+    Extracts the card's VBIOS using the
+    method given as parameter and writes it to stdout. Method can be PROM or
+    PRAMIN. If method is not given, defaults to something sensible.
+
+nvahammer <address> <value>
+    Like nvapoke, but repeats the write in
+    an infinite loop. Needs to be manually aborted.
+
+nvalist
+    Prints a list of cards
+
+nvapeek <address> [<byte count>]
+    Reads 32-bit MMIO register at <address>.
+    If byte count is also given, reads all registers in range [address, address
+    + byte count).
+
+nvapoke <address> <value>
+    Writes a 32-bit <value> to the MMIO register at
+    <address>.
+
+nvascan [-as] <address> [<byte count>]
+    For each register in a range:
+    read it, write 0xffffffff, read it, write 0, read it, write back the
+    original value. Helpful to see the valid values for registers. If -s option
+    is passed, does a slow scan - waits and reads PMC.ID register between scans
+    to recover from errors caused by invalid register accesses. If -a option
+    is passed, does a cross-test on all registers in the range to detect aliased
+    addresses [not particularly reliable].
+
+nvatiming
+    Attempts to measure what frequency various units of the card are
+    running at by using misc tricks.
+
+nvawatch [-t] <address>
+    Reads MMIO register at <address> in a loop, prints
+    the value every time it changes. If -t is specified, prints a timestamp
+    and diff from the previous timestamp before the value. Never quits, needs
+    to be manually aborted.
 
 [XXX: document the remaining tools]
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH envytools] nva: Clean up nva tools doc
       [not found]     ` <1408993096-18883-3-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-08-25 22:35       ` Martin Peres
       [not found]         ` <53FBBA3F.50405-GANU6spQydw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Martin Peres @ 2014-08-25 22:35 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On 25/08/2014 20:58, Christian Costa wrote:
> - Sort commands by name for easier update
> - Make more readable
> - Remove no more existing commands
> ---
>   nva/README | 83 +++++++++++++++++++++++++++++++++-----------------------------
>   1 file changed, 44 insertions(+), 39 deletions(-)
>
> diff --git a/nva/README b/nva/README
> index 625ea7c..d4347c5 100644
> --- a/nva/README
> +++ b/nva/README
> @@ -3,7 +3,7 @@ registers.
>   
>   WARNING: these tools *can* and *will* hang your machine if you don't know
>   what you're doing. Hardware destruction is likely also possible, although
> -no incidents are known to have happened yet. In most cases it's also not
> +no incident are known to have happened yet. In most cases it's also not
IIRC, "0" is considered plural in English. I'm sure Ilia or Ben could 
give us
a more definitive answer on this :)
>   recommended to use these tools while a driver is active for a given card.
>   
>   All programs except nvalist take an optional -c <card number> parameter.
> @@ -13,43 +13,48 @@ by the nvalist program.
>   
>   The programs are:
>   
> -nvalist: prints a list of cards
> -
> -nvapeek <address> [<byte count>]: reads 32-bit MMIO register at <address>.
> -If byte count is also given, reads all registers in range [address, address
> -+ byte count).
> -
> -nvapeek8 <address> [<byte count>]: like nvapeek, but does 8-bit MMIO accesses
> -
> -nvapoke <address> <value>: writes a 32-bit <value> to the MMIO register at
> -<address>.
> -
> -nvapoke8 <address> <value>: like nvapoke, but does 8-bit MMIO access
> -
> -nvawatch [-t] <address>: reads MMIO register at <address> in a loop, prints
> -the value every time it changes. If -t is specified, prints a timestamp
> -and diff from the previous timestamp before the value. Never quits, needs
> -to be manually aborted.
> -
> -nvahammer <address> <value>: like nvapoke, but repeats the write in
> -an infinite loop. Needs to be manually aborted.
> -
> -nvagetbios [-s <extraction method>]: extracts the card's VBIOS using the
> -method given as parameter and writes it to stdout. Method can be PROM or
> -PRAMIN. If method is not given, defaults to something sensible.
> -
> -nvafuzz <address> [<byte count>]: writes random values to a register or
> -a register range in an infinite loop. Needs to be manually aborted.
> -
> -nvascan [-as] <address> [<byte count>]: for each register in a range:
> -read it, write 0xffffffff, read it, write 0, read it, write back the
> -original value. Helpful to see the valid values for registers. If -s option
> -is passed, does a slow scan - waits and reads PMC.ID register between scans
> -to recover from errors caused by invalid register accesses. If -a option
> -is passed, does a cross-test on all registers in the range to detect aliased
> -addresses [not particularly reliable].
> -
> -nvatiming: attempts to measure what frequency various units of the card are
> -running at by using misc tricks.
> +nvafuzz <address> [<byte count>]
> +    Writes random values to a register or
> +    a register range in an infinite loop. Needs to be manually aborted.
> +
> +nvagetbios [-s <extraction method>]
> +    Extracts the card's VBIOS using the
> +    method given as parameter and writes it to stdout. Method can be PROM or
> +    PRAMIN. If method is not given, defaults to something sensible.
> +
> +nvahammer <address> <value>
> +    Like nvapoke, but repeats the write in
> +    an infinite loop. Needs to be manually aborted.
> +
> +nvalist
> +    Prints a list of cards
> +
> +nvapeek <address> [<byte count>]
> +    Reads 32-bit MMIO register at <address>.
> +    If byte count is also given, reads all registers in range [address, address
> +    + byte count).
> +
> +nvapoke <address> <value>
> +    Writes a 32-bit <value> to the MMIO register at
> +    <address>.
> +
> +nvascan [-as] <address> [<byte count>]
> +    For each register in a range:
> +    read it, write 0xffffffff, read it, write 0, read it, write back the
> +    original value. Helpful to see the valid values for registers. If -s option
> +    is passed, does a slow scan - waits and reads PMC.ID register between scans
> +    to recover from errors caused by invalid register accesses. If -a option
> +    is passed, does a cross-test on all registers in the range to detect aliased
> +    addresses [not particularly reliable].
> +
> +nvatiming
> +    Attempts to measure what frequency various units of the card are
> +    running at by using misc tricks.
> +
> +nvawatch [-t] <address>
> +    Reads MMIO register at <address> in a loop, prints
> +    the value every time it changes. If -t is specified, prints a timestamp
> +    and diff from the previous timestamp before the value. Never quits, needs
> +    to be manually aborted.
>   
>   [XXX: document the remaining tools]
Did you fix some spelling mistakes in while changing the order? I 
already suck at
comparing lines that are one on top of the other, so I don't even want 
to try checking!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH envytools] nva: Clean up nva tools doc
       [not found]         ` <53FBBA3F.50405-GANU6spQydw@public.gmane.org>
@ 2014-08-25 22:55           ` Ilia Mirkin
       [not found]             ` <CAKb7Uvj4=vM0kSQB3npNyeMT3=AjMy6mTE5-iFu-ZqHpOCCq+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2014-08-26  2:20           ` Christian Costa
  1 sibling, 1 reply; 8+ messages in thread
From: Ilia Mirkin @ 2014-08-25 22:55 UTC (permalink / raw)
  To: Martin Peres; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org

On Mon, Aug 25, 2014 at 6:35 PM, Martin Peres <martin.peres-GANU6spQydw@public.gmane.org> wrote:
> On 25/08/2014 20:58, Christian Costa wrote:
>>
>> - Sort commands by name for easier update
>> - Make more readable
>> - Remove no more existing commands
>> ---
>>   nva/README | 83
>> +++++++++++++++++++++++++++++++++-----------------------------
>>   1 file changed, 44 insertions(+), 39 deletions(-)
>>
>> diff --git a/nva/README b/nva/README
>> index 625ea7c..d4347c5 100644
>> --- a/nva/README
>> +++ b/nva/README
>> @@ -3,7 +3,7 @@ registers.
>>     WARNING: these tools *can* and *will* hang your machine if you don't
>> know
>>   what you're doing. Hardware destruction is likely also possible,
>> although
>> -no incidents are known to have happened yet. In most cases it's also not
>> +no incident are known to have happened yet. In most cases it's also not
>
> IIRC, "0" is considered plural in English. I'm sure Ilia or Ben could give
> us
> a more definitive answer on this :)

Without being definitive, I believe the old way was fine. The new way,
however, is not. You could, alternatively say, "although no incident
is known to have happened yet" -- pretty sure that'd be correct too.

>
>>   recommended to use these tools while a driver is active for a given
>> card.
>>     All programs except nvalist take an optional -c <card number>
>> parameter.
>> @@ -13,43 +13,48 @@ by the nvalist program.
>>     The programs are:
>>   -nvalist: prints a list of cards
>> -
>> -nvapeek <address> [<byte count>]: reads 32-bit MMIO register at
>> <address>.
>> -If byte count is also given, reads all registers in range [address,
>> address
>> -+ byte count).
>> -
>> -nvapeek8 <address> [<byte count>]: like nvapeek, but does 8-bit MMIO
>> accesses
>> -
>> -nvapoke <address> <value>: writes a 32-bit <value> to the MMIO register
>> at
>> -<address>.
>> -
>> -nvapoke8 <address> <value>: like nvapoke, but does 8-bit MMIO access
>> -
>> -nvawatch [-t] <address>: reads MMIO register at <address> in a loop,
>> prints
>> -the value every time it changes. If -t is specified, prints a timestamp
>> -and diff from the previous timestamp before the value. Never quits, needs
>> -to be manually aborted.
>> -
>> -nvahammer <address> <value>: like nvapoke, but repeats the write in
>> -an infinite loop. Needs to be manually aborted.
>> -
>> -nvagetbios [-s <extraction method>]: extracts the card's VBIOS using the
>> -method given as parameter and writes it to stdout. Method can be PROM or
>> -PRAMIN. If method is not given, defaults to something sensible.
>> -
>> -nvafuzz <address> [<byte count>]: writes random values to a register or
>> -a register range in an infinite loop. Needs to be manually aborted.
>> -
>> -nvascan [-as] <address> [<byte count>]: for each register in a range:
>> -read it, write 0xffffffff, read it, write 0, read it, write back the
>> -original value. Helpful to see the valid values for registers. If -s
>> option
>> -is passed, does a slow scan - waits and reads PMC.ID register between
>> scans
>> -to recover from errors caused by invalid register accesses. If -a option
>> -is passed, does a cross-test on all registers in the range to detect
>> aliased
>> -addresses [not particularly reliable].
>> -
>> -nvatiming: attempts to measure what frequency various units of the card
>> are
>> -running at by using misc tricks.
>> +nvafuzz <address> [<byte count>]
>> +    Writes random values to a register or
>> +    a register range in an infinite loop. Needs to be manually aborted.
>> +
>> +nvagetbios [-s <extraction method>]
>> +    Extracts the card's VBIOS using the
>> +    method given as parameter and writes it to stdout. Method can be PROM
>> or
>> +    PRAMIN. If method is not given, defaults to something sensible.
>> +
>> +nvahammer <address> <value>
>> +    Like nvapoke, but repeats the write in
>> +    an infinite loop. Needs to be manually aborted.
>> +
>> +nvalist
>> +    Prints a list of cards
>> +
>> +nvapeek <address> [<byte count>]
>> +    Reads 32-bit MMIO register at <address>.
>> +    If byte count is also given, reads all registers in range [address,
>> address
>> +    + byte count).
>> +
>> +nvapoke <address> <value>
>> +    Writes a 32-bit <value> to the MMIO register at
>> +    <address>.
>> +
>> +nvascan [-as] <address> [<byte count>]
>> +    For each register in a range:
>> +    read it, write 0xffffffff, read it, write 0, read it, write back the
>> +    original value. Helpful to see the valid values for registers. If -s
>> option
>> +    is passed, does a slow scan - waits and reads PMC.ID register between
>> scans
>> +    to recover from errors caused by invalid register accesses. If -a
>> option
>> +    is passed, does a cross-test on all registers in the range to detect
>> aliased
>> +    addresses [not particularly reliable].
>> +
>> +nvatiming
>> +    Attempts to measure what frequency various units of the card are
>> +    running at by using misc tricks.
>> +
>> +nvawatch [-t] <address>
>> +    Reads MMIO register at <address> in a loop, prints
>> +    the value every time it changes. If -t is specified, prints a
>> timestamp
>> +    and diff from the previous timestamp before the value. Never quits,
>> needs
>> +    to be manually aborted.
>>     [XXX: document the remaining tools]
>
> Did you fix some spelling mistakes in while changing the order? I already
> suck at
> comparing lines that are one on top of the other, so I don't even want to
> try checking!
>
> _______________________________________________
> Nouveau mailing list
> Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH envytools] nva: Clean up nva tools doc
       [not found]         ` <53FBBA3F.50405-GANU6spQydw@public.gmane.org>
  2014-08-25 22:55           ` Ilia Mirkin
@ 2014-08-26  2:20           ` Christian Costa
  1 sibling, 0 replies; 8+ messages in thread
From: Christian Costa @ 2014-08-26  2:20 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Le 26/08/2014 00:35, Martin Peres a écrit :
> On 25/08/2014 20:58, Christian Costa wrote:
>> - Sort commands by name for easier update
>> - Make more readable
>> - Remove no more existing commands
>> ---
>>   nva/README | 83 
>> +++++++++++++++++++++++++++++++++-----------------------------
>>   1 file changed, 44 insertions(+), 39 deletions(-)
>>
>> diff --git a/nva/README b/nva/README
>> index 625ea7c..d4347c5 100644
>> --- a/nva/README
>> +++ b/nva/README
>> @@ -3,7 +3,7 @@ registers.
>>     WARNING: these tools *can* and *will* hang your machine if you 
>> don't know
>>   what you're doing. Hardware destruction is likely also possible, 
>> although
>> -no incidents are known to have happened yet. In most cases it's also 
>> not
>> +no incident are known to have happened yet. In most cases it's also not
> IIRC, "0" is considered plural in English. I'm sure Ilia or Ben could 
> give us
> a more definitive answer on this :)
Ok. I'll resend a patch after confirmation if needed.
>>   recommended to use these tools while a driver is active for a given 
>> card.
>>     All programs except nvalist take an optional -c <card number> 
>> parameter.
>> @@ -13,43 +13,48 @@ by the nvalist program.
>>     The programs are:
>>   -nvalist: prints a list of cards
>> -
>> -nvapeek <address> [<byte count>]: reads 32-bit MMIO register at 
>> <address>.
>> -If byte count is also given, reads all registers in range [address, 
>> address
>> -+ byte count).
>> -
>> -nvapeek8 <address> [<byte count>]: like nvapeek, but does 8-bit MMIO 
>> accesses
>> -
>> -nvapoke <address> <value>: writes a 32-bit <value> to the MMIO 
>> register at
>> -<address>.
>> -
>> -nvapoke8 <address> <value>: like nvapoke, but does 8-bit MMIO access
>> -
>> -nvawatch [-t] <address>: reads MMIO register at <address> in a loop, 
>> prints
>> -the value every time it changes. If -t is specified, prints a timestamp
>> -and diff from the previous timestamp before the value. Never quits, 
>> needs
>> -to be manually aborted.
>> -
>> -nvahammer <address> <value>: like nvapoke, but repeats the write in
>> -an infinite loop. Needs to be manually aborted.
>> -
>> -nvagetbios [-s <extraction method>]: extracts the card's VBIOS using 
>> the
>> -method given as parameter and writes it to stdout. Method can be 
>> PROM or
>> -PRAMIN. If method is not given, defaults to something sensible.
>> -
>> -nvafuzz <address> [<byte count>]: writes random values to a register or
>> -a register range in an infinite loop. Needs to be manually aborted.
>> -
>> -nvascan [-as] <address> [<byte count>]: for each register in a range:
>> -read it, write 0xffffffff, read it, write 0, read it, write back the
>> -original value. Helpful to see the valid values for registers. If -s 
>> option
>> -is passed, does a slow scan - waits and reads PMC.ID register 
>> between scans
>> -to recover from errors caused by invalid register accesses. If -a 
>> option
>> -is passed, does a cross-test on all registers in the range to detect 
>> aliased
>> -addresses [not particularly reliable].
>> -
>> -nvatiming: attempts to measure what frequency various units of the 
>> card are
>> -running at by using misc tricks.
>> +nvafuzz <address> [<byte count>]
>> +    Writes random values to a register or
>> +    a register range in an infinite loop. Needs to be manually aborted.
>> +
>> +nvagetbios [-s <extraction method>]
>> +    Extracts the card's VBIOS using the
>> +    method given as parameter and writes it to stdout. Method can be 
>> PROM or
>> +    PRAMIN. If method is not given, defaults to something sensible.
>> +
>> +nvahammer <address> <value>
>> +    Like nvapoke, but repeats the write in
>> +    an infinite loop. Needs to be manually aborted.
>> +
>> +nvalist
>> +    Prints a list of cards
>> +
>> +nvapeek <address> [<byte count>]
>> +    Reads 32-bit MMIO register at <address>.
>> +    If byte count is also given, reads all registers in range 
>> [address, address
>> +    + byte count).
>> +
>> +nvapoke <address> <value>
>> +    Writes a 32-bit <value> to the MMIO register at
>> +    <address>.
>> +
>> +nvascan [-as] <address> [<byte count>]
>> +    For each register in a range:
>> +    read it, write 0xffffffff, read it, write 0, read it, write back 
>> the
>> +    original value. Helpful to see the valid values for registers. 
>> If -s option
>> +    is passed, does a slow scan - waits and reads PMC.ID register 
>> between scans
>> +    to recover from errors caused by invalid register accesses. If 
>> -a option
>> +    is passed, does a cross-test on all registers in the range to 
>> detect aliased
>> +    addresses [not particularly reliable].
>> +
>> +nvatiming
>> +    Attempts to measure what frequency various units of the card are
>> +    running at by using misc tricks.
>> +
>> +nvawatch [-t] <address>
>> +    Reads MMIO register at <address> in a loop, prints
>> +    the value every time it changes. If -t is specified, prints a 
>> timestamp o
>> +    and diff from the previous timestamp before the value. Never 
>> quits, needs
>> +    to be manually aborted.
>>     [XXX: document the remaining tools]
> Did you fix some spelling mistakes in while changing the order? I 
> already suck at
> comparing lines that are one on top of the other, so I don't even want 
> to try checking!
No. Only "incidents" in this patch.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH envytools] nva: Clean up nva tools doc
       [not found]             ` <CAKb7Uvj4=vM0kSQB3npNyeMT3=AjMy6mTE5-iFu-ZqHpOCCq+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-08-26  2:30               ` Christian Costa
  0 siblings, 0 replies; 8+ messages in thread
From: Christian Costa @ 2014-08-26  2:30 UTC (permalink / raw)
  To: Ilia Mirkin; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Le 26/08/2014 00:55, Ilia Mirkin a écrit :
> On Mon, Aug 25, 2014 at 6:35 PM, Martin Peres <martin.peres-GANU6spQydw@public.gmane.org> wrote:
>> On 25/08/2014 20:58, Christian Costa wrote:
>>> - Sort commands by name for easier update
>>> - Make more readable
>>> - Remove no more existing commands
>>> ---
>>>    nva/README | 83
>>> +++++++++++++++++++++++++++++++++-----------------------------
>>>    1 file changed, 44 insertions(+), 39 deletions(-)
>>>
>>> diff --git a/nva/README b/nva/README
>>> index 625ea7c..d4347c5 100644
>>> --- a/nva/README
>>> +++ b/nva/README
>>> @@ -3,7 +3,7 @@ registers.
>>>      WARNING: these tools *can* and *will* hang your machine if you don't
>>> know
>>>    what you're doing. Hardware destruction is likely also possible,
>>> although
>>> -no incidents are known to have happened yet. In most cases it's also not
>>> +no incident are known to have happened yet. In most cases it's also not
>> IIRC, "0" is considered plural in English. I'm sure Ilia or Ben could give
>> us
>> a more definitive answer on this :)
> Without being definitive, I believe the old way was fine. The new way,
> however, is not. You could, alternatively say, "although no incident
> is known to have happened yet" -- pretty sure that'd be correct too.
Oh. I intended to write "no incident is known" but forgot to change "are".
I'Il resend a patch with old way. Now, you're pointing out, I remember 
this is correct.
>
>>>    recommended to use these tools while a driver is active for a given
>>> card.
>>>      All programs except nvalist take an optional -c <card number>
>>> parameter.
>>> @@ -13,43 +13,48 @@ by the nvalist program.
>>>      The programs are:
>>>    -nvalist: prints a list of cards
>>> -
>>> -nvapeek <address> [<byte count>]: reads 32-bit MMIO register at
>>> <address>.
>>> -If byte count is also given, reads all registers in range [address,
>>> address
>>> -+ byte count).
>>> -
>>> -nvapeek8 <address> [<byte count>]: like nvapeek, but does 8-bit MMIO
>>> accesses
>>> -
>>> -nvapoke <address> <value>: writes a 32-bit <value> to the MMIO register
>>> at
>>> -<address>.
>>> -
>>> -nvapoke8 <address> <value>: like nvapoke, but does 8-bit MMIO access
>>> -
>>> -nvawatch [-t] <address>: reads MMIO register at <address> in a loop,
>>> prints
>>> -the value every time it changes. If -t is specified, prints a timestamp
>>> -and diff from the previous timestamp before the value. Never quits, needs
>>> -to be manually aborted.
>>> -
>>> -nvahammer <address> <value>: like nvapoke, but repeats the write in
>>> -an infinite loop. Needs to be manually aborted.
>>> -
>>> -nvagetbios [-s <extraction method>]: extracts the card's VBIOS using the
>>> -method given as parameter and writes it to stdout. Method can be PROM or
>>> -PRAMIN. If method is not given, defaults to something sensible.
>>> -
>>> -nvafuzz <address> [<byte count>]: writes random values to a register or
>>> -a register range in an infinite loop. Needs to be manually aborted.
>>> -
>>> -nvascan [-as] <address> [<byte count>]: for each register in a range:
>>> -read it, write 0xffffffff, read it, write 0, read it, write back the
>>> -original value. Helpful to see the valid values for registers. If -s
>>> option
>>> -is passed, does a slow scan - waits and reads PMC.ID register between
>>> scans
>>> -to recover from errors caused by invalid register accesses. If -a option
>>> -is passed, does a cross-test on all registers in the range to detect
>>> aliased
>>> -addresses [not particularly reliable].
>>> -
>>> -nvatiming: attempts to measure what frequency various units of the card
>>> are
>>> -running at by using misc tricks.
>>> +nvafuzz <address> [<byte count>]
>>> +    Writes random values to a register or
>>> +    a register range in an infinite loop. Needs to be manually aborted.
>>> +
>>> +nvagetbios [-s <extraction method>]
>>> +    Extracts the card's VBIOS using the
>>> +    method given as parameter and writes it to stdout. Method can be PROM
>>> or
>>> +    PRAMIN. If method is not given, defaults to something sensible.
>>> +
>>> +nvahammer <address> <value>
>>> +    Like nvapoke, but repeats the write in
>>> +    an infinite loop. Needs to be manually aborted.
>>> +
>>> +nvalist
>>> +    Prints a list of cards
>>> +
>>> +nvapeek <address> [<byte count>]
>>> +    Reads 32-bit MMIO register at <address>.
>>> +    If byte count is also given, reads all registers in range [address,
>>> address
>>> +    + byte count).
>>> +
>>> +nvapoke <address> <value>
>>> +    Writes a 32-bit <value> to the MMIO register at
>>> +    <address>.
>>> +
>>> +nvascan [-as] <address> [<byte count>]
>>> +    For each register in a range:
>>> +    read it, write 0xffffffff, read it, write 0, read it, write back the
>>> +    original value. Helpful to see the valid values for registers. If -s
>>> option
>>> +    is passed, does a slow scan - waits and reads PMC.ID register between
>>> scans
>>> +    to recover from errors caused by invalid register accesses. If -a
>>> option
>>> +    is passed, does a cross-test on all registers in the range to detect
>>> aliased
>>> +    addresses [not particularly reliable].
>>> +
>>> +nvatiming
>>> +    Attempts to measure what frequency various units of the card are
>>> +    running at by using misc tricks.
>>> +
>>> +nvawatch [-t] <address>
>>> +    Reads MMIO register at <address> in a loop, prints
>>> +    the value every time it changes. If -t is specified, prints a
>>> timestamp
>>> +    and diff from the previous timestamp before the value. Never quits,
>>> needs
>>> +    to be manually aborted.
>>>      [XXX: document the remaining tools]
>> Did you fix some spelling mistakes in while changing the order? I already
>> suck at
>> comparing lines that are one on top of the other, so I don't even want to
>> try checking!
>>
>> _______________________________________________
>> Nouveau mailing list
>> Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>> http://lists.freedesktop.org/mailman/listinfo/nouveau
> _______________________________________________
> Nouveau mailing list
> Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH envytools] nva: Clean up nva tools doc
@ 2014-08-27  6:24 Christian Costa
       [not found] ` <1409120662-6412-1-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Costa @ 2014-08-27  6:24 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

- Sort commands by name for easier update
- Make more readable
- Remove no more existing commands
---
 nva/README | 81 +++++++++++++++++++++++++++++++++-----------------------------
 1 file changed, 43 insertions(+), 38 deletions(-)

diff --git a/nva/README b/nva/README
index 625ea7c..cbe6ae3 100644
--- a/nva/README
+++ b/nva/README
@@ -13,43 +13,48 @@ by the nvalist program.
 
 The programs are:
 
-nvalist: prints a list of cards
-
-nvapeek <address> [<byte count>]: reads 32-bit MMIO register at <address>.
-If byte count is also given, reads all registers in range [address, address
-+ byte count).
-
-nvapeek8 <address> [<byte count>]: like nvapeek, but does 8-bit MMIO accesses
-
-nvapoke <address> <value>: writes a 32-bit <value> to the MMIO register at
-<address>.
-
-nvapoke8 <address> <value>: like nvapoke, but does 8-bit MMIO access
-
-nvawatch [-t] <address>: reads MMIO register at <address> in a loop, prints
-the value every time it changes. If -t is specified, prints a timestamp
-and diff from the previous timestamp before the value. Never quits, needs
-to be manually aborted.
-
-nvahammer <address> <value>: like nvapoke, but repeats the write in
-an infinite loop. Needs to be manually aborted.
-
-nvagetbios [-s <extraction method>]: extracts the card's VBIOS using the
-method given as parameter and writes it to stdout. Method can be PROM or
-PRAMIN. If method is not given, defaults to something sensible.
-
-nvafuzz <address> [<byte count>]: writes random values to a register or
-a register range in an infinite loop. Needs to be manually aborted.
-
-nvascan [-as] <address> [<byte count>]: for each register in a range:
-read it, write 0xffffffff, read it, write 0, read it, write back the
-original value. Helpful to see the valid values for registers. If -s option
-is passed, does a slow scan - waits and reads PMC.ID register between scans
-to recover from errors caused by invalid register accesses. If -a option
-is passed, does a cross-test on all registers in the range to detect aliased
-addresses [not particularly reliable].
-
-nvatiming: attempts to measure what frequency various units of the card are
-running at by using misc tricks.
+nvafuzz <address> [<byte count>]
+    Writes random values to a register or
+    a register range in an infinite loop. Needs to be manually aborted.
+
+nvagetbios [-s <extraction method>]
+    Extracts the card's VBIOS using the
+    method given as parameter and writes it to stdout. Method can be PROM or
+    PRAMIN. If method is not given, defaults to something sensible.
+
+nvahammer <address> <value>
+    Like nvapoke, but repeats the write in
+    an infinite loop. Needs to be manually aborted.
+
+nvalist
+    Prints a list of cards
+
+nvapeek <address> [<byte count>]
+    Reads 32-bit MMIO register at <address>.
+    If byte count is also given, reads all registers in range [address, address
+    + byte count).
+
+nvapoke <address> <value>
+    Writes a 32-bit <value> to the MMIO register at
+    <address>.
+
+nvascan [-as] <address> [<byte count>]
+    For each register in a range:
+    read it, write 0xffffffff, read it, write 0, read it, write back the
+    original value. Helpful to see the valid values for registers. If -s option
+    is passed, does a slow scan - waits and reads PMC.ID register between scans
+    to recover from errors caused by invalid register accesses. If -a option
+    is passed, does a cross-test on all registers in the range to detect aliased
+    addresses [not particularly reliable].
+
+nvatiming
+    Attempts to measure what frequency various units of the card are
+    running at by using misc tricks.
+
+nvawatch [-t] <address>
+    Reads MMIO register at <address> in a loop, prints
+    the value every time it changes. If -t is specified, prints a timestamp
+    and diff from the previous timestamp before the value. Never quits, needs
+    to be manually aborted.
 
 [XXX: document the remaining tools]
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH envytools] Don't try to use bios->parts if NULL (parse_pcir function has probably failed).
       [not found] ` <1409120662-6412-1-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-08-27  6:24   ` Christian Costa
  2014-08-27 22:48   ` [PATCH envytools] nva: Clean up nva tools doc Martin Peres
  1 sibling, 0 replies; 8+ messages in thread
From: Christian Costa @ 2014-08-27  6:24 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

---
 nvbios/info.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nvbios/info.c b/nvbios/info.c
index 87a33d8..acc40d8 100644
--- a/nvbios/info.c
+++ b/nvbios/info.c
@@ -119,6 +119,10 @@ int envy_bios_parse_bit_i (struct envy_bios *bios, struct envy_bios_bit_entry *b
 			bios->chipset_name = "G72";
 			break;
 		case 0x0573:
+			if (!bios->parts) {
+				ENVY_BIOS_ERR("Failed to detect board (bios->parts is NULL, parse_pcir function has probably failed)\n");
+				break;
+			}
 			/* yeah, ain't this one hilarious... */
 			if ((bios->parts[0].pcir_device & 0xfff0) == 0x7e0) {
 				bios->chipset = 0x63;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH envytools] nva: Clean up nva tools doc
       [not found] ` <1409120662-6412-1-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2014-08-27  6:24   ` [PATCH envytools] Don't try to use bios->parts if NULL (parse_pcir function has probably failed) Christian Costa
@ 2014-08-27 22:48   ` Martin Peres
  1 sibling, 0 replies; 8+ messages in thread
From: Martin Peres @ 2014-08-27 22:48 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Whole serie applied (all 7 patches). Thank you again :)

Looking at the patches, it would seem like you were fixing
potential bugs. Remember that envytools is meant for
developers and we like stuff to break in catastrophic ways
when the vbios (for instance) does not follow our expectations.

Of course, crashing or corruption is not acceptable, but I'm all
for a good-old assert or at least big fat warnings. Just don't
waste too much time sanitizing nvbios since it clearly isn't meant
for production.

Thanks again and congrats for actually reading the code and
documentation before contributing! I wish you good luck in
generating the nvc0 memory timings :)

Martin

PS: Sorry it took me so long...

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-08-27 22:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-27  6:24 [PATCH envytools] nva: Clean up nva tools doc Christian Costa
     [not found] ` <1409120662-6412-1-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-27  6:24   ` [PATCH envytools] Don't try to use bios->parts if NULL (parse_pcir function has probably failed) Christian Costa
2014-08-27 22:48   ` [PATCH envytools] nva: Clean up nva tools doc Martin Peres
  -- strict thread matches above, loose matches on Subject: below --
2014-08-25 18:58 [PATCH envytools] demmio: Add decoding of some MEM_TIMINGS registers for NVC0 Christian Costa
     [not found] ` <1408993096-18883-1-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-25 18:58   ` [PATCH envytools] nva: Clean up nva tools doc Christian Costa
     [not found]     ` <1408993096-18883-3-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-25 22:35       ` Martin Peres
     [not found]         ` <53FBBA3F.50405-GANU6spQydw@public.gmane.org>
2014-08-25 22:55           ` Ilia Mirkin
     [not found]             ` <CAKb7Uvj4=vM0kSQB3npNyeMT3=AjMy6mTE5-iFu-ZqHpOCCq+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-26  2:30               ` Christian Costa
2014-08-26  2:20           ` Christian Costa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.