Re: accessing device memory
- From: Tim Roberts <spamtrap@xxxxxxxxxx>
- Date: Sun, 25 Sep 2005 03:47:42 +0000 (UTC)
spamtrap@xxxxxxxxxx wrote:
>
>So how would one go about accessing PCI devices?
See, that's not the right question to ask. PCI is the tiniest part of
talking to a device. The typical driver has perhaps 20 or 25 lines of
PCI-specific code. The guts are in the specific device classes and the
specific devices. You might ask, "how would one go about talking to a
network device, specifically the XYZ Model 9999 NIC?"
>is it simpilist with
>ASM (or more allow more possibiltys should i say) or would it be more
>advisable to use some API?
It doesn't matter. The driver initialization process will get your a
pointer to the device's registers. Once you have a pointer, it's just as
easy to use either C or assembler, or FPC Pascal, if that shakes your tree.
>Im more interested in where someone would start on this type of
>exploration?
I'd start by looking at drivers in Linux. That way, you get real source
code for real drivers for real devices, although the comments are a bit
sparse.
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.
- References:
- accessing device memory
- From: spamtrap
- Re: accessing device memory
- From: Tim Roberts
- Re: accessing device memory
- From: spamtrap
- accessing device memory
- Prev by Date: Re: Clever ways to hide a compare
- Next by Date: Re: Clever ways to hide a compare
- Previous by thread: Re: accessing device memory
- Next by thread: Disassembling a DOS COM file
- Index(es):
Relevant Pages
|