linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: hychon <hychon@genetel.co.kr>
To: linuxppc-embedded@lists.linuxppc.org
Subject: memory access
Date: Tue, 10 Jul 2001 17:06:54 +0900	[thread overview]
Message-ID: <3B4AB798.687AF994@genetel.co.kr> (raw)


Hi!

I want to make a HDLC driver based on the MPC860T target board

To use  SCC2  as hdlc , I was access immr area by following

 ------------------------------------------------------------------------

 if((mem_hdlc = open("/dev/mem", O_RDWR)) < 0){

         perror("mem open error\n");
         exit(2);
  }

  mem_addr_hdlc = mmap(0,(64*1024),(PROT_READ|PROT_WRITE),MAP_SHARED,
mem_hdlc,0xFF000000 );

  if((int)mem_addr_hdlc < 0 ) {
   TRACE("mem_addr_hdlc mmap error\n");
   exit(2);
   }

   IMMR = (immap_t *) mem_addr_hdlc;
-----------------------------------------------------------------------------

I used some rest area of dpmem except buffer descriptor area,

then , system was down.

 I want to a way of use some user spaec(memory)  for  Buffer ( receving
and transmitting data).

 how to memory access  " from virtual memory to physical memory and from
physical memory to virutal memory " ?

can you hlep me  with some example ???


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

             reply	other threads:[~2001-07-10  8:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-10  8:06 hychon [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-07-10 17:51 memory access Marti, Felix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B4AB798.687AF994@genetel.co.kr \
    --to=hychon@genetel.co.kr \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).