All of lore.kernel.org
 help / color / mirror / Atom feed
* A question about TTBRs
@ 2017-02-24  9:55 Raz
  2017-02-24 10:22 ` Christoffer Dall
  0 siblings, 1 reply; 3+ messages in thread
From: Raz @ 2017-02-24  9:55 UTC (permalink / raw)
  To: kvmarm


[-- Attachment #1.1: Type: text/plain, Size: 553 bytes --]

Hello
I am reading the arm8a book. According to the documentation the output
address of each level 3 entry in TTBRx_EL1points to an address in the
physical memory.
By looking in the mmu tab in the DS5 studio I can see the TTBRs tables.

What I do not understand is why while I have 2GB of RAM in the FVP (
/proc/meminfo ) some page entries ( level 3 ) of the ttbr points to memory
above 4GB; for instance:

Output address NP:0xF794D000

Doesn't the physical memory starts at address zero ? if not, where its
starting point is configured?

Thank you
Raz

[-- Attachment #1.2: Type: text/html, Size: 663 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

* Re: A question about TTBRs
  2017-02-24  9:55 A question about TTBRs Raz
@ 2017-02-24 10:22 ` Christoffer Dall
  2017-02-24 12:10   ` Mark Rutland
  0 siblings, 1 reply; 3+ messages in thread
From: Christoffer Dall @ 2017-02-24 10:22 UTC (permalink / raw)
  To: Raz; +Cc: kvmarm

On Fri, Feb 24, 2017 at 09:55:09AM +0000, Raz wrote:
> Hello
> I am reading the arm8a book. According to the documentation the output
> address of each level 3 entry in TTBRx_EL1points to an address in the
> physical memory.
> By looking in the mmu tab in the DS5 studio I can see the TTBRs tables.
> 
> What I do not understand is why while I have 2GB of RAM in the FVP (
> /proc/meminfo ) some page entries ( level 3 ) of the ttbr points to memory
> above 4GB; for instance:
> 
> Output address NP:0xF794D000
> 
> Doesn't the physical memory starts at address zero ? if not, where its
> starting point is configured?

It depends on your particular system where RAM starts, and it does not
necessarily start at zero.  You'd have to check the documentation of
your model or hardware or look at the device tree you use, for example.

-Christoffer

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

* Re: A question about TTBRs
  2017-02-24 10:22 ` Christoffer Dall
@ 2017-02-24 12:10   ` Mark Rutland
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Rutland @ 2017-02-24 12:10 UTC (permalink / raw)
  To: Christoffer Dall, Raz; +Cc: kvmarm

On Fri, Feb 24, 2017 at 11:22:40AM +0100, Christoffer Dall wrote:
> On Fri, Feb 24, 2017 at 09:55:09AM +0000, Raz wrote:
> > Hello
> > I am reading the arm8a book. According to the documentation the output
> > address of each level 3 entry in TTBRx_EL1points to an address in the
> > physical memory.
> > By looking in the mmu tab in the DS5 studio I can see the TTBRs tables.
> > 
> > What I do not understand is why while I have 2GB of RAM in the FVP (
> > /proc/meminfo ) some page entries ( level 3 ) of the ttbr points to memory
> > above 4GB; for instance:
> > 
> > Output address NP:0xF794D000
> > 
> > Doesn't the physical memory starts at address zero ? if not, where its
> > starting point is configured?
> 
> It depends on your particular system where RAM starts, and it does not
> necessarily start at zero.  You'd have to check the documentation of
> your model or hardware or look at the device tree you use, for example.

It's also worth bearing in mind that memory is not necessarily
physically contiguous. There may be several banks with gaps in the
middle, as is the case on ARM Juno systems [1]:

	memory@80000000 {
		device_type = "memory";
		/* last 16MB of the first memory area is reserved for secure world use by firmware */
		reg = <0x00000000 0x80000000 0x0 0x7f000000>,
		      <0x00000008 0x80000000 0x1 0x80000000>;
	};

It may also be the case that MMIO devices fall within these gaps.

Thanks,
Mark.

[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/arm/juno-base.dtsi?h=v4.10&id=c470abd4fde40ea6a0846a2beab642a578c0b8cd

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

end of thread, other threads:[~2017-02-24 12:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-24  9:55 A question about TTBRs Raz
2017-02-24 10:22 ` Christoffer Dall
2017-02-24 12:10   ` Mark Rutland

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.