Skip to contentSkip to conversation

questions regarding support for new command (getspr/setspr)

U-Boot-Users Kumar Gala 2 participants 2 messages Jan 28, 2004

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

I was wondering if it was considered useful to extend the CFG_CMD_SETGETDCR done by Erik Theisen for DCR registers on the 4xx family to all PowerPC products for SPRs (CFG_CMD_SETGETSPR).

This is rather simple but can be a useful command.

If, so I had a few questions:

1. Is it ok that the command does not do any checking on the SPR number. This is quick difficult and would have to be done per processor since what SPRs exists is implementation specific. If the user gives the commands an SPR that does not exist the result is going to be some exception (is this ok)
2. What numerical format should the spr number for the command be taken in? My think is decimal
3. For setspr what numerical format should the spr value be taken in? My thinking is hex
4. For getspr what numerical format should the spr be printed in? My thinking is hex

If so, I will fixup my working patch and submit it once I get answers to the questions.

thanks

- kumar

#1 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

I was wondering if it was considered useful to extend the CFG_CMD_SETGETDCR done by Erik Theisen for DCR registers on the 4xx family to all PowerPC products for SPRs (CFG_CMD_SETGETSPR).

That would be useful.

Quoted 5 lines

1. Is it ok that the command does not do any checking on the SPR number. This is quick difficult and would have to be done per processor since what SPRs exists is implementation specific. If the user gives the commands an SPR that does not exist the result is going to be some exception (is this ok)

IMHO only valid SPRs should be accepted. Yes, this requires processor specific code.

Quoted 2 lines

2. What numerical format should the spr number for the command be taken in? My think is decimal

The format should be string (i. e. register NAME). For SPRs without a name and/or alternatively a decimal number is ok. Without a register name/number the "get" command should print all known SPR's on that processor.

Quoted 2 lines

3. For setspr what numerical format should the spr value be taken in? My thinking is hex

Hex like all standard input data in U-Boot.

Quoted 2 lines

4. For getspr what numerical format should the spr be printed in? My thinking is hex

The register name should be string plus decimal number; the value should be hex.

Quoted 2 lines

If so, I will fixup my working patch and submit it once I get answers to the questions.

Thanks in advance.

Best regards,

Wolfgang Denk

Signature · 4 lines
See us @ Embedded World, Nuremberg, Feb 17 - 19,  Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Ernest asks Frank how long he has been working for the company.
        "Ever since they threatened to fire me."