* How to change PCI Configuration space?
@ 2005-08-30 4:47 Rajat Jain
2005-08-30 13:11 ` [Pcihpd-discuss] " Matthew Wilcox
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Rajat Jain @ 2005-08-30 4:47 UTC (permalink / raw)
To: pcihpd-discuss, linux-newbie, kenux-kernel
Cc: dkumar, Sanjay Kumar, Noida, rajat.noida.india
Hi List,
I want to change the PCI Configuration space of a particular device in
my system. I am trying to use the "pcitweak" utility to do so, but am
not suceeding. I would appreciate if some body could provide me any
pointers in how to do so.
In this case, I want to change the value at offset 64:
$ pcitweak -r 5:9:1 64
0x01000001 //original value
$ pcitweak -w 5:9:1 64 0x02000002 //new value
$ pcitweak -r 5:9:1 64
0x01000001 //no change?
TIA,
Rajat Jain
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Pcihpd-discuss] How to change PCI Configuration space? 2005-08-30 4:47 How to change PCI Configuration space? Rajat Jain @ 2005-08-30 13:11 ` Matthew Wilcox 2005-08-30 16:22 ` chuck gelm 2005-08-31 2:47 ` chuck gelm 2 siblings, 0 replies; 6+ messages in thread From: Matthew Wilcox @ 2005-08-30 13:11 UTC (permalink / raw) To: Rajat Jain Cc: pcihpd-discuss, linux-newbie, kenux-kernel, dkumar, Sanjay Kumar, Noida On Tue, Aug 30, 2005 at 01:47:12PM +0900, Rajat Jain wrote: > I want to change the PCI Configuration space of a particular device in > my system. I am trying to use the "pcitweak" utility to do so, but am > not suceeding. I would appreciate if some body could provide me any > pointers in how to do so. Don't use pcitweak. Use setpci instead. -- "Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to change PCI Configuration space? 2005-08-30 4:47 How to change PCI Configuration space? Rajat Jain 2005-08-30 13:11 ` [Pcihpd-discuss] " Matthew Wilcox @ 2005-08-30 16:22 ` chuck gelm 2005-08-31 1:05 ` Rajat Jain 2005-08-31 2:47 ` chuck gelm 2 siblings, 1 reply; 6+ messages in thread From: chuck gelm @ 2005-08-30 16:22 UTC (permalink / raw) To: linux-newbie; +Cc: Rajat Jain Rajat Jain wrote: > Hi List, > > I want to change the PCI Configuration space of a particular device in > my system. I am trying to use the "pcitweak" utility to do so, but am > not suceeding. I would appreciate if some body could provide me any > pointers in how to do so. > > In this case, I want to change the value at offset 64: > > $ pcitweak -r 5:9:1 64 > 0x01000001 //original value > > $ pcitweak -w 5:9:1 64 0x02000002 //new value > > $ pcitweak -r 5:9:1 64 > 0x01000001 //no change? > > TIA, > > Rajat Jain Dear Rajat Jain: 'man pcitweak' indicates that it requires root privileges. the '$' prompt in your console indicates 'user' privileges. My 'root' prompt is a '#'. I suggest that you do not have 'root' privileges when executing a '-w' (write) command. HTH, Chuck "Pcitweak is a utility that can be used to examine or change registers in the PCI configuration space. On most platfoms pcitweak can only be run by the root user." - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to change PCI Configuration space? 2005-08-30 16:22 ` chuck gelm @ 2005-08-31 1:05 ` Rajat Jain 2005-08-31 2:30 ` chuck gelm 0 siblings, 1 reply; 6+ messages in thread From: Rajat Jain @ 2005-08-31 1:05 UTC (permalink / raw) To: chuck; +Cc: linux-newbie On 8/31/05, chuck gelm <chuck@gelm.net> wrote: > Rajat Jain wrote: > > Hi List, > > > > I want to change the PCI Configuration space of a particular device in > > my system. I am trying to use the "pcitweak" utility to do so, but am > > not suceeding. I would appreciate if some body could provide me any > > pointers in how to do so. > > > > In this case, I want to change the value at offset 64: > > > > $ pcitweak -r 5:9:1 64 > > 0x01000001 //original value > > > > $ pcitweak -w 5:9:1 64 0x02000002 //new value > > > > $ pcitweak -r 5:9:1 64 > > 0x01000001 //no change? > > > > TIA, > > > > Rajat Jain > > Dear Rajat Jain: > > 'man pcitweak' indicates that it requires root privileges. > the '$' prompt in your console indicates 'user' privileges. > My 'root' prompt is a '#'. > I suggest that you do not have 'root' privileges when > executing a '-w' (write) command. > > HTH, Chuck > > "Pcitweak is a utility that can be used to examine or > change registers in the PCI configuration space. On most > platfoms pcitweak can only be run by the root user." > Un ... I'm sorry ... I put that "$" prompt manually here in this mail. I AM the root and working on the "#" prompt. I would appreciate if somebody can tell me any other commands than "pcitweak" and "setpci" to change PCI configuration space. Thanks & Regards, Rajat Jain - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to change PCI Configuration space? 2005-08-31 1:05 ` Rajat Jain @ 2005-08-31 2:30 ` chuck gelm 0 siblings, 0 replies; 6+ messages in thread From: chuck gelm @ 2005-08-31 2:30 UTC (permalink / raw) To: linux-newbie; +Cc: Rajat Jain Rajat Jain wrote: > On 8/31/05, chuck gelm <chuck@gelm.net> wrote: > >>Rajat Jain wrote: >> >>>Hi List, >>> >>>I want to change the PCI Configuration space of a particular device in >>>my system. I am trying to use the "pcitweak" utility to do so, but am >>>not suceeding. I would appreciate if some body could provide me any >>>pointers in how to do so. >>> >>>In this case, I want to change the value at offset 64: >>> >>>$ pcitweak -r 5:9:1 64 >>>0x01000001 //original value >>> >>>$ pcitweak -w 5:9:1 64 0x02000002 //new value >>> >>>$ pcitweak -r 5:9:1 64 >>>0x01000001 //no change? >>> >>>TIA, >>> >>>Rajat Jain >> >>Dear Rajat Jain: >> >> 'man pcitweak' indicates that it requires root privileges. >>the '$' prompt in your console indicates 'user' privileges. >>My 'root' prompt is a '#'. >>I suggest that you do not have 'root' privileges when >>executing a '-w' (write) command. >> >>HTH, Chuck >> >>"Pcitweak is a utility that can be used to examine or >> change registers in the PCI configuration space. On most >> platfoms pcitweak can only be run by the root user." >> > > > > Un ... I'm sorry ... I put that "$" prompt manually here in this mail. > I AM the root and working on the "#" prompt. I would appreciate if > somebody can tell me any other commands than "pcitweak" and "setpci" > to change PCI configuration space. > > Thanks & Regards, > > Rajat Jain Hi, Rajat Jain: Sorry, I cannot help. Just for fun, I used pcitweak, scanpci, lspci, and 'cat /proc/pci' and looked at my two rtl8139 ethernet cards. I think I found that they have 256 bytes of memory; one card uses memory 0x3e014000 - 0x3e140ff or 0x100 bytes. (cat /proc/pci |grep -A 1 -B 4 ealtek) pcitweak read 32 bits (4 bytes) so pcitweak 0:9:0 -r 0 would show bytes offset 0, 1, 2, & 3. pcitweak 0:9:0 -r[-w] 64 [value] would read[write] bytes offset 64, 65, 66, 67 or 0x100, 0x101, 0x102, 0x103 which is undefined. There might be no RAM memory at byte offset 64. I also used pcitweak 0:9:0 -r 4096, which I assume is outside the configuration space of my pci device, but pcitweak dutifully displayed output. :-| Hopefully you are not writing to ROM. :-| Good luck, Chuck - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to change PCI Configuration space? 2005-08-30 4:47 How to change PCI Configuration space? Rajat Jain 2005-08-30 13:11 ` [Pcihpd-discuss] " Matthew Wilcox 2005-08-30 16:22 ` chuck gelm @ 2005-08-31 2:47 ` chuck gelm 2 siblings, 0 replies; 6+ messages in thread From: chuck gelm @ 2005-08-31 2:47 UTC (permalink / raw) To: linux-newbie; +Cc: Rajat Jain Rajat Jain wrote: > Hi List, > > I want to change the PCI Configuration space of a particular device in > my system. I am trying to use the "pcitweak" utility to do so, but am > not suceeding. I would appreciate if some body could provide me any > pointers in how to do so. > > In this case, I want to change the value at offset 64: > > $ pcitweak -r 5:9:1 64 > 0x01000001 //original value > > $ pcitweak -w 5:9:1 64 0x02000002 //new value > > $ pcitweak -r 5:9:1 64 > 0x01000001 //no change? > > TIA, > > Rajat Jain (This response is limited to linux-newbie, although there should be a better list-server for this depth of a problem.) Hi, Rajat Jain: Sorry, I cannot help. Just for fun, I used pcitweak, scanpci, lspci, and 'cat /proc/pci' and looked at my two rtl8139 ethernet cards. I think I found that they have 256 bytes of memory; one card uses memory 0x3e014000 - 0x3e140ff or 0x100 bytes. (cat /proc/pci |grep -A 1 -B 4 ealtek) pcitweak read 32 bits (4 bytes) so pcitweak 0:9:0 -r 0 would show bytes offset 0, 1, 2, & 3. pcitweak 0:9:0 -r[-w] 64 [value] would read[write] bytes offset 64, 65, 66, 67 or 0x100, 0x101, 0x102, 0x103 which is undefined. There might be no memory at byte offset 64. I also used pcitweak 0:9:0 -r 4096, which I assume is outside the configuration space of my pci device, but pcitweak dutifully displayed output. :-| Hopefully you are not writing to ROM. :-| Good luck, Chuck - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-08-31 2:47 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-08-30 4:47 How to change PCI Configuration space? Rajat Jain 2005-08-30 13:11 ` [Pcihpd-discuss] " Matthew Wilcox 2005-08-30 16:22 ` chuck gelm 2005-08-31 1:05 ` Rajat Jain 2005-08-31 2:30 ` chuck gelm 2005-08-31 2:47 ` chuck gelm
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox