1

I have been reading through some ARM code in order to try and understand what exactly the cpu_domain field inside the struct thread_info represents. In an attempt to understand how it is used, I looked through the places where the variable is referenced. I am trying to understand the following :-

  • Why is the field present in thread_info? I can see that when a context switch happens, the value is set / read, but why? What purpose does the field serve?

I had a look at the function modify_domain that seems to retrieve the domain value and set it in coprocessor CP15, c3. But where is this used? Any system call that takes in addresses verifies it against addr_limit, and page tables have the supervisor bit to check if reads/writes are allowed from userspace. So where do ARM domains come into the picture?

learnlearnlearn
  • 946
  • 1
  • 8
  • 16
  • 1
    Take a look at these questions. [Multi-core and mmu tables](https://stackoverflow.com/questions/9929755/do-multi-core-cpus-share-the-mmu-and-page-tables/33239191#33239191) and [ARM domains](https://stackoverflow.com/questions/36613000/domain-in-arm-architecture-means-what). – artless noise Feb 16 '18 at 03:48

0 Answers0