From: hychon <hychon@genetel.co.kr>
To: linuxppc-embedded@lists.linuxppc.org
Subject: how to get a physical address from the mmaped address area?
Date: Sat, 21 Jul 2001 16:25:56 +0900 [thread overview]
Message-ID: <3B592E7F.17F170F8@genetel.co.kr> (raw)
I want to "how to get a physical address from the mmaped address area !
"
Hi !!
I am working a HDLC program (not device driver) as Embedded Linux
system , that used SCC2 on the MPC860T target board .
I worked initialzed SCC2 and allocat memory buffer with the
kernel-2.2.13 based on PowerPC arch .
In my program, I allocated the BD (Buffer Descriptor) in a temporary
place of DPMEM.
RxTxBD = (BDRINGS *)(&IMMR->udata_bd[0x600]);
IMMR->PRAM[PAGE2].pg.scc.h.rbase = (UHWORD)&RxTxBD->RxBD[0]; /*
1 */
IMMR->PRAM[PAGE2].pg.scc.h.rbase =
(UHWORD)0x2E00; /* 2 */
case 1 : BD state not change and down .the system
case 2 : BD state are change
I think that the RBASE and TBASE in SCC PARAM is a physical address of
Buffer Descriptor
I want to get a place of BD in DPMEM itself and retun as physical
address. (as if , CPM get a BD pointer in commproc.c file )
Question1) How to get a place(pointer) of BD in DPMEM and give RBASE
(TBASE) the physical address ?
And Buffer are allocated in a virtual area , by following
mem_addr_buf1 = mmap(0,1024,(PROT_READ|PROT_WRITE),MAP_SHARED,
mem_buf1,0x100000);
buf = (unsigned char *)mem_addr_buf1;
when I write buf as Buffer addr of BD, that do not change Buffer
(BD) state
I think that don't find the buffer address
and the Buffer pointer of BD structure was recognized as physical
address of the Buffer (buf) .
Question2) How to get a buffer address pointer of BD struct (a place of
Buffer) from kernel (virtual address) as physical address?
Help me !
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
reply other threads:[~2001-07-21 7:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3B592E7F.17F170F8@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).