RE: [Etherboot-developers] virtual / physical address translation
Brought to you by:
marty_connor,
stefanhajnoczi
From: Timothy L. <tim...@al...> - 2005-09-16 12:02:43
|
> I want to access a PCI device through its memory space. I=20 > have the physical addresses from the device's BARs. How can I=20 > post memory write commands to the device? > How do I convert from physical to virtual addresses and the=20 > virtual to physical addresses? > Thanks Take a look at any of the recent pci drivers that use the pci BAR to obtain the device address such as: e1000.c forcedeth.c ns83820.c r8169.c tg3.c The device address reported by the device is the physical and in read and writes you can use that address as the io address. The only place converting from physical to virtual addresses come in is in attempting to assign a memory addess to cars capable to DMA. In that case you can also revied the drivers above specifically in the init_rings buffers addresses are assigned to the card. TIm ********************************************************************** This E-mail message (including attachments, if any) is intended for the use= of the individual or entity to which it is addressed and may contain infor= mation that is privileged, proprietary, confidential and exempt fromdisclos= ure. If you are not the intended recipient, you are notified thatany dissem= ination, distribution or copying of this communication is strictly prohibit= ed. If you have received this communication in error, please notify the sen= der and erase this E-mail message immediately.=20 Le present message electronique (y compris les pieces qui y sont annexees, = le cas echeant) s'addresse au destinataire indique et peut contenir des ren= seignements de caractere prive ou confidentiel. Si vous n'etes pas le desti= nataire de ce document, nous vous signalons qu'il est strictement interdit = de le diffuser, de le distribuer ou de le reproduire. Si ce message vous a = ete transmis par erreur, veuillez en informer l'expediteur et le supprimer= immediatement. |