From: Martin_Czamai AT peak-service DOT com (Martin Czamai) Newsgroups: comp.os.msdos.djgpp Subject: Accessing memory above an adress of 1MB Date: Mon, 09 Aug 1999 11:10:10 GMT Message-ID: <37aeb1ba.11535499@NotesXNT> X-Newsreader: Forte Free Agent 1.11/32.235 NNTP-Posting-Host: board-81.darmstadt.netsurf.de X-Original-NNTP-Posting-Host: board-81.darmstadt.netsurf.de X-Trace: 9 Aug 1999 13:11:50 +0200, board-81.darmstadt.netsurf.de Organization: OMNILINK -- your link to the Net Lines: 24 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello! I want to access the memory space given from a BAR (base adress register) of a PCI controller. (the adress is dynamic allocated by the system) Therefore I wrote a function that returns the (absolute) adress that has to be accessed. Usually it is around 0xFFFFF000 . I used __djgpp_map_physical_memory (mappedBAR, NoBytes, BaseAdr) for mapping the device to a created memory block named 'mappedBAR'; the number of bytes to map (NoBytes) is a multiple of a mem-page found with __dpmi_get_page_size(&NoBytes) (4096 bytes) and the base adress (BaseAdr) is equal the absolute address of the BAR. My problem is, that the __djgpp_map_physical_memory (mappedBAR, NoBytes, BaseAdr) returns EACCES as errno, wich is a rejection of the request to the DPMI server. What does this message exactly mean? Who could help me getting started to access this memory? I am using RHIDE 1.4. Please send your reply to Martin_Czamai AT peak-service DOT com . Thank you!