Path: utzoo!attcan!uunet!husc6!mailrus!ames!ubvax!lll-winken!lll-crg.llnl.gov!bowles From: bowles@lll-crg.llnl.gov (Jeff Bowles) Newsgroups: comp.unix.microport Subject: Re: Physical Memory allocation Keywords: allocation of memory at a particular place. Message-ID: <8866@lll-winken.llnl.gov> Date: 20 Jun 88 16:01:18 GMT References: <4490@killer.UUCP> Sender: usenet@lll-winken.llnl.gov Reply-To: bowles@lll-crg.llnl.gov.UUCP (Jeff Bowles) Organization: Lawrence Livermore National Laboratory Lines: 38 In article <4490@killer.UUCP> egs@killer.UUCP (Eric Schnoebelen) writes: > I need to allocate a particular piece of memory for a driver. The >card has an onboard buffer in ROM space on the PC that the driver needs to >be able to read and write.... #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include { char *p = (struct cmm_regs *)sptalloc( btoc(WORKSIZE), PG_RW | PG_P , pfnum(BOARDADDR), 0); ********************************** For me, this worked on the Bell Tech Unix SVR3; I believe it's consistent with all things ported from the 3B2 - BOARDADDR in this case was something like 0xE00000 and WORKSIZE was something like 8192, but I don't remember. You can guess the arguments - "I need a workspace of size in clicks to be mapped into kernel space with permissions RW (read/write) and P (present). The address is page frame number . I don't know about the last arg." Jeff Bowles