All of lore.kernel.org
 help / color / mirror / Atom feed
* incorrect setting of MT_DEVICE_ mem_types TEX bits on ARMv7?
@ 2020-12-01 11:44 Henry Gomersall
  2020-12-01 11:56 ` Ard Biesheuvel
  0 siblings, 1 reply; 3+ messages in thread
From: Henry Gomersall @ 2020-12-01 11:44 UTC (permalink / raw)
  To: linux-arm-kernel


[-- Attachment #1.1.1: Type: text/plain, Size: 631 bytes --]

Looking at the configuration of the TEX bits for mem_types[MT_DEVICE]
and  mem_types[MT_DEVICE_NONSHARED] in mmu.c, they seem to be
inconsistent with the technical reference manual.

Relevant lines:
https://github.com/torvalds/linux/blob/master/arch/arm/mm/mmu.c#L498

The ARM architecture reference manual ARMv7-A and ARMv7-R, table B3-10
in section B3.8.2 describes the strongly-ordered TEX bits as 00 or 10
for shared and unshared respectively.

MT_DEVICE_WC is set as I'd expect (the buffering-on case).

It's more than possible I'm missing something, in which case I'd
appreciate knowing!

Cheers,

Henry


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: incorrect setting of MT_DEVICE_ mem_types TEX bits on ARMv7?
  2020-12-01 11:44 incorrect setting of MT_DEVICE_ mem_types TEX bits on ARMv7? Henry Gomersall
@ 2020-12-01 11:56 ` Ard Biesheuvel
  2020-12-01 12:57   ` Henry Gomersall
  0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2020-12-01 11:56 UTC (permalink / raw)
  To: Henry Gomersall; +Cc: Linux ARM

On Tue, 1 Dec 2020 at 12:45, Henry Gomersall
<henry.gomersall@smartacoustics.co.uk> wrote:
>
> Looking at the configuration of the TEX bits for mem_types[MT_DEVICE]
> and  mem_types[MT_DEVICE_NONSHARED] in mmu.c, they seem to be
> inconsistent with the technical reference manual.
>
> Relevant lines:
> https://github.com/torvalds/linux/blob/master/arch/arm/mm/mmu.c#L498
>
> The ARM architecture reference manual ARMv7-A and ARMv7-R, table B3-10
> in section B3.8.2 describes the strongly-ordered TEX bits as 00 or 10
> for shared and unshared respectively.
>
> MT_DEVICE_WC is set as I'd expect (the buffering-on case).
>
> It's more than possible I'm missing something, in which case I'd
> appreciate knowing!
>

Are you referring to

B3.8.2
Short-descriptor format memory region attributes, without TEX remap

?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: incorrect setting of MT_DEVICE_ mem_types TEX bits on ARMv7?
  2020-12-01 11:56 ` Ard Biesheuvel
@ 2020-12-01 12:57   ` Henry Gomersall
  0 siblings, 0 replies; 3+ messages in thread
From: Henry Gomersall @ 2020-12-01 12:57 UTC (permalink / raw)
  To: linux-arm-kernel


[-- Attachment #1.1.1: Type: text/plain, Size: 1335 bytes --]

On 01/12/2020 11:56, Ard Biesheuvel wrote:
> On Tue, 1 Dec 2020 at 12:45, Henry Gomersall
> <henry.gomersall@smartacoustics.co.uk> wrote:
>> Looking at the configuration of the TEX bits for mem_types[MT_DEVICE]
>> and  mem_types[MT_DEVICE_NONSHARED] in mmu.c, they seem to be
>> inconsistent with the technical reference manual.
>>
>> Relevant lines:
>> https://github.com/torvalds/linux/blob/master/arch/arm/mm/mmu.c#L498
>>
>> The ARM architecture reference manual ARMv7-A and ARMv7-R, table B3-10
>> in section B3.8.2 describes the strongly-ordered TEX bits as 00 or 10
>> for shared and unshared respectively.
>>
>> MT_DEVICE_WC is set as I'd expect (the buffering-on case).
>>
>> It's more than possible I'm missing something, in which case I'd
>> appreciate knowing!
>>
> Are you referring to
> 
> B3.8.2
> Short-descriptor format memory region attributes, without TEX remap

Whoops, yes, it makes more sense now, apologies. Following through the
remap branch it's all consistent.

The implication from this is that the MT_DEVICE_WC case is non-cacheable
normal memory. What's the purpose of the MT_DEVICE_WC case? Is it just
intended to be an non-cacheable?

Finally, there seems to be no memory type for the unbuffered, strongly
ordered. Is there some rationale for that?

Thanks,

Henry


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-12-01 12:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 11:44 incorrect setting of MT_DEVICE_ mem_types TEX bits on ARMv7? Henry Gomersall
2020-12-01 11:56 ` Ard Biesheuvel
2020-12-01 12:57   ` Henry Gomersall

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.