All of lore.kernel.org
 help / color / mirror / Atom feed
* how to mapping device memory in head.S
@ 2015-04-12 12:23 yoma sophian
  2015-04-12 19:14 ` Russell King - ARM Linux
  0 siblings, 1 reply; 3+ messages in thread
From: yoma sophian @ 2015-04-12 12:23 UTC (permalink / raw)
  To: linux-arm-kernel

hi all:
I need to map peripheral address in head.S for early usage.
And I found in arm/kernel/head.S, there is  CONFIG_DEBUG_LL for
mapping low level uart.
My questions are:
1. CONFIG_DEBUG_LL is  using short-descriptor 1st-level section
descriptor formats. Is it possible to use short-descriptor 2nd-level
small page descriptor in head.S?
2. The peripheral mapping virtual address created in head.S is need to
access even after paging_init. Is it possible to put the mapping in
the persistent mapping in head.S?

appreciate your kind help in advance,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* how to mapping device memory in head.S
  2015-04-12 12:23 how to mapping device memory in head.S yoma sophian
@ 2015-04-12 19:14 ` Russell King - ARM Linux
  2015-04-13  1:30   ` yoma sophian
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2015-04-12 19:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 12, 2015 at 08:23:59PM +0800, yoma sophian wrote:
> hi all:
> I need to map peripheral address in head.S for early usage.

Basically, you do not.

Please explain in detail what you're trying to do.

> 1. CONFIG_DEBUG_LL is  using short-descriptor 1st-level section
> descriptor formats. Is it possible to use short-descriptor 2nd-level
> small page descriptor in head.S?

Definitely not, there is no memory management at that stage to allocate
a 2nd level descriptor table.

> 2. The peripheral mapping virtual address created in head.S is need to
> access even after paging_init. Is it possible to put the mapping in
> the persistent mapping in head.S?

No, we don't support that.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* how to mapping device memory in head.S
  2015-04-12 19:14 ` Russell King - ARM Linux
@ 2015-04-13  1:30   ` yoma sophian
  0 siblings, 0 replies; 3+ messages in thread
From: yoma sophian @ 2015-04-13  1:30 UTC (permalink / raw)
  To: linux-arm-kernel

hi Russell

2015-04-13 3:14 GMT+08:00 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> On Sun, Apr 12, 2015 at 08:23:59PM +0800, yoma sophian wrote:
>> hi all:
>> I need to map peripheral address in head.S for early usage.
>
> Basically, you do not.
>
> Please explain in detail what you're trying to do.
We try to calculate and record the booting time from head.S,
start_kernel to rest_init.
so we need to mapping the memory for getting count of counter quite early.
it seems quite waist memory mapping if we use short-descriptor
1st-level section descriptor formats.
And we want to get fix mapping such that the va of counter will be the
same and the va of get counter API doesn't need to change.

>
>> 1. CONFIG_DEBUG_LL is  using short-descriptor 1st-level section
>> descriptor formats. Is it possible to use short-descriptor 2nd-level
>> small page descriptor in head.S?
>
> Definitely not, there is no memory management at that stage to allocate
> a 2nd level descriptor table.
>
>> 2. The peripheral mapping virtual address created in head.S is need to
>> access even after paging_init. Is it possible to put the mapping in
>> the persistent mapping in head.S?
>
> No, we don't support that.
>
Appreciate your kind help,

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-13  1:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-12 12:23 how to mapping device memory in head.S yoma sophian
2015-04-12 19:14 ` Russell King - ARM Linux
2015-04-13  1:30   ` yoma sophian

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.