TW202435076A - Determining whether to reject a memory access request issued by a requester device - Google Patents
Determining whether to reject a memory access request issued by a requester device Download PDFInfo
- Publication number
- TW202435076A TW202435076A TW113105174A TW113105174A TW202435076A TW 202435076 A TW202435076 A TW 202435076A TW 113105174 A TW113105174 A TW 113105174A TW 113105174 A TW113105174 A TW 113105174A TW 202435076 A TW202435076 A TW 202435076A
- Authority
- TW
- Taiwan
- Prior art keywords
- pas
- memory
- access request
- memory access
- domain
- Prior art date
Links
- 230000004044 response Effects 0.000 claims abstract description 27
- 238000013519 translation Methods 0.000 claims description 93
- 238000012545 processing Methods 0.000 claims description 84
- 238000000034 method Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 15
- 238000004519 manufacturing process Methods 0.000 claims description 8
- 238000011144 upstream manufacturing Methods 0.000 claims description 5
- 230000014616 translation Effects 0.000 description 91
- 238000005516 engineering process Methods 0.000 description 20
- 239000008187 granular material Substances 0.000 description 18
- 238000002955 isolation Methods 0.000 description 13
- 238000013507 mapping Methods 0.000 description 11
- 230000007246 mechanism Effects 0.000 description 11
- 239000002245 particle Substances 0.000 description 11
- 238000009482 thermal adhesion granulation Methods 0.000 description 11
- FCCMYBKAZCDQGX-LZYBPNLTSA-N (e)-2-cyano-n-(1-hydroxy-2-methylpropan-2-yl)-3-[3-(3,4,5-trimethoxyphenyl)-1h-indazol-5-yl]prop-2-enamide Chemical compound COC1=C(OC)C(OC)=CC(C=2C3=CC(\C=C(/C#N)C(=O)NC(C)(C)CO)=CC=C3NN=2)=C1 FCCMYBKAZCDQGX-LZYBPNLTSA-N 0.000 description 7
- 238000012544 monitoring process Methods 0.000 description 7
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 6
- 238000001914 filtration Methods 0.000 description 6
- 230000002093 peripheral effect Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 229910052710 silicon Inorganic materials 0.000 description 6
- 239000010703 silicon Substances 0.000 description 6
- 238000000638 solvent extraction Methods 0.000 description 5
- 238000013461 design Methods 0.000 description 4
- 239000004065 semiconductor Substances 0.000 description 4
- 238000004088 simulation Methods 0.000 description 4
- 238000012546 transfer Methods 0.000 description 4
- 230000001960 triggered effect Effects 0.000 description 4
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 3
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 3
- 238000013459 approach Methods 0.000 description 3
- 238000013475 authorization Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 239000004744 fabric Substances 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 2
- 230000001427 coherent effect Effects 0.000 description 2
- 230000001010 compromised effect Effects 0.000 description 2
- 238000012938 design process Methods 0.000 description 2
- 230000001815 facial effect Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000005055 memory storage Effects 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 230000001537 neural effect Effects 0.000 description 2
- 238000005192 partition Methods 0.000 description 2
- 238000003786 synthesis reaction Methods 0.000 description 2
- 230000001052 transient effect Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 230000003542 behavioural effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000010076 replication Effects 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 239000000523 sample Substances 0.000 description 1
- 230000008685 targeting Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/0284—Multiple user address space allocation, e.g. using different base addresses
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/14—Protection against unauthorised use of memory or access to memory
- G06F12/1458—Protection against unauthorised use of memory or access to memory by checking the subject access rights
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/14—Protection against unauthorised use of memory or access to memory
- G06F12/1416—Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights
- G06F12/1425—Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights the protection being physical, e.g. cell, word, block
- G06F12/1433—Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights the protection being physical, e.g. cell, word, block for a module or a part of a module
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/14—Protection against unauthorised use of memory or access to memory
- G06F12/1458—Protection against unauthorised use of memory or access to memory by checking the subject access rights
- G06F12/1466—Key-lock mechanism
- G06F12/1475—Key-lock mechanism in a virtual system, e.g. with translation means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/14—Protection against unauthorised use of memory or access to memory
- G06F12/1458—Protection against unauthorised use of memory or access to memory by checking the subject access rights
- G06F12/1491—Protection against unauthorised use of memory or access to memory by checking the subject access rights in a hierarchical protection system, e.g. privilege levels, memory rings
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/71—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
- G06F21/74—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information operating in dual or compartmented mode, i.e. at least one secure mode
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Storage Device Security (AREA)
Abstract
Description
本技術係關於資料處理領域。This technology is related to the field of data processing.
資料處理系統可具有位址轉譯電路系統以將由記憶體存取請求識別的位址(例如,此可係虛擬位址)轉譯成對應於待於記憶體系統中存取之位置的實體位址。A data processing system may have address translation circuitry to translate an address identified by a memory access request (which may be a virtual address, for example) into a physical address corresponding to a location to be accessed in the memory system.
鑑於本技術之第一實例,提供一種設備,其包含: PAS選擇電路系統,其回應於由一請求者裝置發布的一記憶體存取請求而基於請求者裝置的一目前操作域選擇複數個實體位址空間(PAS)之待與該記憶體存取請求關聯之一者,該記憶體存取請求指定識別一記憶體位置的一記憶體位址;及 存取控制電路系統,其回應於該記憶體存取請求而基於經選擇之該PAS判定是否拒絕該記憶體存取請求, 其中該存取控制電路系統包含: PAS檢查電路系統,其回應於針對經識別之該記憶體位置定義的位址空間權限資訊指示與經選擇之該PAS關聯的記憶體存取請求經禁止存取經識別之該記憶體位置而拒絕該記憶體存取請求;及 裝置權限檢查電路系統,其回應於針對該請求者裝置定義的裝置權限資訊指示由該請求者裝置發布的記憶體存取請求經禁止存取經選擇之該PAS而拒絕該記憶體存取請求。 In view of the first example of the present technology, a device is provided, comprising: A PAS selection circuit system, which responds to a memory access request issued by a requester device and selects one of a plurality of physical address spaces (PAS) to be associated with the memory access request based on a current operating domain of the requester device, the memory access request specifying a memory address identifying a memory location; and An access control circuit system, which responds to the memory access request and determines whether to deny the memory access request based on the selected PAS, wherein the access control circuit system comprises: A PAS checking circuit system, which responds to the address space permission information defined for the identified memory location indicating that the memory access request associated with the selected PAS is prohibited from accessing the identified memory location and denies the memory access request; and A device permission checking circuit system, which responds to the device permission information defined for the requester device indicating that the memory access request issued by the requester device is prohibited from accessing the selected PAS and denies the memory access request.
鑑於本技術的第二實例,提供一種方法,其包含: 回應於由一請求者裝置發布的一記憶體存取請求,該記憶體存取請求指定識別一記憶體位置的一記憶體位址: 基於該請求者裝置的一目前操作域選擇複數個實體位址空間(PAS)之待與該記憶體存取請求關聯之一者; 基於經選擇之該PAS判定是否拒絕該記憶體存取請求, 其中該判定包含: 回應於針對經識別之該記憶體位置定義的位址空間權限資訊指示與經選擇之該PAS關聯的記憶體存取請求經禁止存取經識別之該記憶體位置而拒絕該記憶體存取請求;及 回應於針對該請求者裝置定義的裝置權限資訊指示由該請求者裝置發布的記憶體存取請求經禁止存取經選擇之該PAS而拒絕該記憶體存取請求。 In view of a second example of the present technology, a method is provided, comprising: In response to a memory access request issued by a requestor device, the memory access request specifying a memory address identifying a memory location: Selecting one of a plurality of physical address spaces (PAS) to be associated with the memory access request based on a current operating domain of the requestor device; Determining whether to deny the memory access request based on the selected PAS, wherein the determination comprises: In response to address space permission information defined for the identified memory location indicating that the memory access request associated with the selected PAS is prohibited from accessing the identified memory location, denying the memory access request; and In response to device permission information defined for the requester device indicating that a memory access request issued by the requester device is prohibited from accessing the selected PAS, the memory access request is denied.
鑑於本技術的第三實例,提供一種包含指令的電腦程式,當該等指令由一主機資料處理設備執行時,控制該主機資料處理設備提供用於執行目標程式碼的一指令執行環境,該電腦程式包含: PAS選擇程式邏輯,其回應於由一請求者發布的一記憶體存取請求而基於該請求者的一目前操作域選擇複數個實體位址空間(PAS)之待與該記憶體存取請求關聯之一者,該記憶體存取請求指定識別一記憶體位置的一記憶體位址;及 存取控制程式邏輯,其回應於該記憶體存取請求而基於經選擇之該PAS判定是否拒絕該記憶體存取請求, 其中該存取控制程式邏輯包含: PAS檢查程式邏輯,其回應於針對經識別之該記憶體位置定義的位址空間權限資訊指示與經選擇之該PAS關聯的記憶體存取請求經禁止存取經識別之該記憶體位置而拒絕該記憶體存取請求;及 裝置權限檢查程式邏輯,其回應於針對該請求者定義的裝置權限資訊指示由該請求者發布的記憶體存取請求經禁止存取經選擇之該PAS而拒絕該記憶體存取請求。 In view of the third example of the present technology, a computer program including instructions is provided, which, when executed by a host data processing device, controls the host data processing device to provide an instruction execution environment for executing a target program code, the computer program including: PAS selection program logic, which responds to a memory access request issued by a requester and selects one of a plurality of physical address spaces (PAS) to be associated with the memory access request based on a current operating domain of the requester, the memory access request specifies a memory address identifying a memory location; and Access control program logic, which responds to the memory access request and determines whether to deny the memory access request based on the selected PAS, wherein the access control program logic includes: PAS check program logic, which responds to the address space permission information defined for the identified memory location indicating that the memory access request associated with the selected PAS is prohibited from accessing the identified memory location and denies the memory access request; and Device permission checker logic that denies a memory access request issued by the requester in response to device permission information defined by the requester indicating that access to the selected PAS is prohibited.
鑑於本技術的第三實例,提供一種電腦可讀儲存媒體,其用以儲存上述電腦程式。該電腦可讀儲存媒體可係非暫時性的暫時性。In view of the third embodiment of the present technology, a computer-readable storage medium is provided for storing the above-mentioned computer program. The computer-readable storage medium can be non-temporary and temporary.
在參照隨附圖式討論實例實施方案之前,提供以下實例實施方案及關聯優點的描述。Before discussing example implementations with reference to the accompanying drawings, the following description of example implementations and associated advantages is provided.
資料處理系統可支援虛擬記憶體的使用,其中提供位址轉譯電路系統以將由記憶體存取請求指定的虛擬位址轉譯成與記憶體系統中之待存取的位置關聯的實體位址。虛擬位址與實體位址之間的映射可定義在一或多個頁表結構中。頁表結構內的頁表項亦可定義可控制是否允許在處理電路系統上執行的給定軟體程序存取特定虛擬位址的一些存取權限資訊。A data processing system may support the use of virtual memory, wherein address translation circuitry is provided to translate a virtual address specified by a memory access request into a physical address associated with a location in the memory system to be accessed. The mapping between virtual addresses and physical addresses may be defined in one or more page table structures. Page table entries within the page table structures may also define some access permission information that controls whether a given software program executing on the processing circuitry is allowed to access a particular virtual address.
在一些處理系統中,所有虛擬位址皆可藉由位址轉譯電路系統映射至由記憶體系統使用以識別記憶體中之待存取之位置的單一實體位址空間上。在此一系統中,在特定軟體程序是否可存取特定位址上的控制僅基於用以提供虛擬至實體位址轉譯映射的頁表結構提供。然而,此類頁表結構一般可由作業系統及/或超管理器定義。若作業系統或超管理器受損害,則此可導致可使敏感資訊變為可由攻擊者存取的安全性漏洞。In some processing systems, all virtual addresses may be mapped by address translation circuitry to a single physical address space used by the memory system to identify locations in memory to be accessed. In such a system, control over whether a particular software program can access a particular address is based solely on page table structures that provide virtual-to-physical address translation mappings. However, such page table structures may generally be defined by the operating system and/or hypervisor. If the operating system or hypervisor is compromised, this may result in security vulnerabilities that may make sensitive information accessible to an attacker.
因此,對於有某些程序與其他程序隔離以安全地執行之需求的一些系統,該系統可支援在若干個域中的操作且可支援若干個相異實體位址空間,其中對於記憶體系統的至少一些組件,將其虛擬位址經轉譯成不同實體位址空間中的實體位址的記憶體存取請求視為彷彿其等正在存取記憶體中完全分開的位址,即使各別實體位址空間中的實體位址實際上對應於記憶體中的相同位置。藉由將來自處理電路系統的不同操作域的存取隔離至如一些記憶體系統組件所見的各別的相異實體位址空間中,此可提供不依賴由作業系統或超管理器所設定之頁表權限資訊的更強的安全保證。Thus, for some systems that have a requirement that certain programs be isolated from other programs for secure execution, the system may support operation in several domains and may support several different physical address spaces, wherein memory access requests whose virtual addresses are translated into physical addresses in different physical address spaces are treated by at least some components of the memory system as if they were accessing completely separate addresses in memory, even though the physical addresses in the respective physical address spaces actually correspond to the same location in memory. By isolating accesses from different operating domains of the processing circuitry into separate distinct physical address spaces as seen by some memory system components, this provides stronger security that is independent of page table permission information set by the operating system or hypervisor.
應注意,在本技術中,提供虛擬至實體位址轉譯並非必需的。然而,應注意到在提供此虛擬至實體位址轉譯的情況下,多個不同的實體位址空間與可提供的多個虛擬位址空間不同。It should be noted that in the present technology, it is not necessary to provide virtual to physical address translation. However, it should be noted that in the case of providing such virtual to physical address translation, the multiple different physical address spaces are different from the multiple virtual address spaces that can be provided.
根據本技術,提供一種設備,其中PAS選擇電路系統回應於由一請求者裝置發布的一記憶體存取請求而基於該請求者裝置的一目前操作域選擇複數個實體位址空間(physical address space, PAS)之待與該記憶體存取請求關聯之一者,該記憶體存取請求指定識別一記憶體位置的一記憶體位址。According to the present technology, an apparatus is provided in which PAS selection circuitry selects one of a plurality of physical address spaces (PAS) to be associated with a memory access request issued by a requestor device based on a current operating domain of the requestor device, the memory access request specifying a memory address identifying a memory location.
例如,由記憶體存取請求指定的記憶體位址可係輸入位址空間中的記憶體位址(例如,虛擬位址空間中的虛擬位址,或在將虛擬位址轉譯成實體位址中表示中間階段的中間位址),且因此記憶體位置可藉由將記憶體位址轉譯成實體位址而識別。替代地,記憶體位址可係系統實體位址空間中的實體位址(例如,設備可提供單一「系統」實體位址空間,其中各記憶體位置映射至單一記憶體系統資源–此系統PAS接著映射至上述的複數個PAS上)。For example, a memory address specified by a memory access request may be a memory address in an input address space (e.g., a virtual address in a virtual address space, or an intermediate address representing an intermediate stage in translating a virtual address into a physical address), and thus the memory location may be identified by translating the memory address into a physical address. Alternatively, the memory address may be a physical address in a system physical address space (e.g., a device may provide a single "system" physical address space, in which each memory location is mapped to a single memory system resource - this system PAS is then mapped onto the plurality of PASs described above).
本技術的設備支援多個PAS的使用–例如,請求者裝置可在若干個操作域的任一者中操作(例如,執行指令及/或執行資料處理),且可針對操作域之各者定義單獨的PAS。由請求者裝置(其可係形成設備之部分的內部處理元件,或外部/周邊裝置)發布的記憶體存取請求可因此取決於請求者裝置的目前操作域(例如,請求者裝置在記憶體存取請求發布時的操作域)而指派給特定PAS。PAS選擇電路系統負責選擇待與給定記憶體存取請求關聯的PAS。如上文討論的,提供多個相異PAS可在來自不同操作域的記憶體存取之間提供隔離。Apparatus of the present technology supports the use of multiple PASs - for example, a requestor device may operate in any of a number of operating domains (e.g., executing instructions and/or performing data processing), and a separate PAS may be defined for each of the operating domains. Memory access requests issued by a requestor device (which may be an internal processing element forming part of the apparatus, or an external/peripheral device) may therefore be assigned to a particular PAS depending on the current operating domain of the requestor device (e.g., the operating domain of the requestor device at the time the memory access request was issued). PAS selection circuitry is responsible for selecting the PAS to be associated with a given memory access request. As discussed above, providing multiple distinct PASs may provide isolation between memory accesses from different operating domains.
本技術的該設備亦包括存取控制電路系統,其回應於該記憶體存取請求而基於經選擇之該PAS判定是否拒絕該記憶體存取請求。存取控制電路系統可執行任何數目的檢查以判定記憶體存取請求是否應拒絕(例如,與傳遞至存取控制電路系統下游的另一組件(例如,邏輯上更接近記憶體系統)相反)。在本技術中,存取控制電路系統至少執行基於經識別記憶體位置及經選擇PAS的PAS檢查,及基於請求者裝置及PAS的裝置檢查。然而,應理解亦可執行進一步檢查,且因此通過此等檢查二者的記憶體存取請求若未通過另一檢查,其仍可由存取控制電路系統拒絕。The apparatus of the present technology also includes access control circuitry that determines, in response to the memory access request, whether to deny the memory access request based on the selected PAS. The access control circuitry may perform any number of checks to determine whether the memory access request should be denied (e.g., as opposed to being passed to another component downstream of the access control circuitry (e.g., logically closer to the memory system)). In the present technology, the access control circuitry performs at least a PAS check based on the identified memory location and the selected PAS, and a device check based on the requester device and the PAS. However, it should be understood that further checks may also be performed, and thus a memory access request that passes both of these checks may still be rejected by the access control circuitry if it fails the other check.
在本技術中,存取控制電路系統包含:PAS檢查電路系統,其用以基於經選擇PAS及經識別記憶體位置執行檢查;及裝置權限檢查電路系統,其用以基於經選擇PAS及請求者裝置執行檢查。具體而言,該PAS檢查電路系統回應於針對經識別之該記憶體位置定義的位址空間權限資訊指示與經選擇之該PAS關聯的記憶體存取請求經禁止存取經識別之該記憶體位置而拒絕該記憶體存取請求。因此,PAS檢查電路系統(其亦可稱為「PAS過濾器」)強制實施判定允許哪些PAS存取哪些記憶體資源的位址空間權限資訊。應注意,在一些實例中,位址空間權限資訊可包含「顆粒保護資訊」(granule protection information, GPI)。In the present technology, the access control circuit system includes: a PAS check circuit system, which is used to perform a check based on a selected PAS and an identified memory location; and a device permission check circuit system, which is used to perform a check based on the selected PAS and a requester device. Specifically, the PAS check circuit system responds to the address space permission information defined for the identified memory location indicating that a memory access request associated with the selected PAS is prohibited from accessing the identified memory location and rejects the memory access request. Therefore, the PAS check circuit system (which may also be referred to as a "PAS filter") enforces the address space permission information that determines which PASs are allowed to access which memory resources. It should be noted that in some instances, the address space permission information may include granule protection information (GPI).
該裝置權限檢查電路系統回應於針對該請求者裝置定義的裝置權限資訊指示由該請求者裝置發布的記憶體存取請求經禁止存取經選擇之該PAS而拒絕該記憶體存取請求。因此,裝置權限檢查電路系統負責強制實施判定允許哪些裝置存取哪些PAS的裝置權限資訊。因此,由裝置權限檢查電路系統執行的檢查可取決於裝置的身分以及取決於經選擇PAS。裝置的身分可以若干種方式的任一者判定,其可取決於請求者裝置的類型及/或取決於裝置權限檢查電路系統如何組態。例如,若裝置權限檢查電路系統與特定請求者裝置關聯(例如,若請求者裝置以互連與記憶體系統分開,裝置權限檢查電路系統可提供在互連的請求者側上(例如,記憶體存取請求可在傳遞至互連之前由裝置權限檢查電路系統過濾)),請求者裝置的身分可係隱含的。另一方面,若裝置權限檢查電路系統與多個請求者裝置關聯,可基於與記憶體存取請求關聯的裝置識別符(例如,若請求者裝置係外部裝置)或基於保持在暫存器或其他儲存電路系統中的請求者識別資訊判定請求者裝置的身分。The device permission checking circuitry denies a memory access request issued by the requestor device in response to device permission information defined for the requestor device indicating that access to the selected PAS is prohibited. Thus, the device permission checking circuitry is responsible for enforcing the device permission information that determines which devices are allowed to access which PAS. Thus, the checks performed by the device permission checking circuitry may depend on the identity of the device and on the selected PAS. The identity of the device may be determined in any of a number of ways, which may depend on the type of requestor device and/or on how the device permission checking circuitry is configured. For example, if the device permission checking circuitry is associated with a particular requestor device (e.g., if the requestor device is separated from the memory system by an interconnect, the device permission checking circuitry may be provided on the requestor side of the interconnect (e.g., memory access requests may be filtered by the device permission checking circuitry before being passed to the interconnect)), the identity of the requestor device may be implicit. On the other hand, if the device permission checking circuitry is associated with multiple requestor devices, the identity of the requestor device may be determined based on a device identifier associated with the memory access request (e.g., if the requestor device is an external device) or based on requestor identification information maintained in a register or other storage circuitry.
因此,裝置權限檢查電路系統將額外的安全層提供在由PAS檢查電路系統提供的安全層之上,且使記憶體區域與特定裝置隔離變得可行。此在,例如,包含負責執行特定高安全性程序的安全處理元件或安全裝置的系統中可係特別有用的–例如,此可包括臉部解鎖或生物測量認證程序。本技術的裝置權限檢查電路系統藉由使與此類程序關聯的資料與其他裝置隔離變得可行而改善設備的安全性,即使該等裝置能夠產生具有相同經選擇PAS的請求。Thus, the device permission check circuitry provides an additional layer of security over and above that provided by the PAS check circuitry and makes it possible to isolate areas of memory from specific devices. This may be particularly useful, for example, in systems that include secure processing elements or secure devices responsible for executing specific high-security programs—for example, this may include facial unlocking or biometric authentication programs. The device permission check circuitry of the present technology improves the security of the device by making it possible to isolate data associated with such programs from other devices, even if such devices are capable of generating requests with the same selected PAS.
如上文建議的,PAS檢查電路系統及裝置權限檢查電路系統不一定需要提供在相同的實體位置中。此外,由PAS檢查電路系統及裝置權限檢查電路系統執行的檢查可相繼地執行(可選地在二個檢查之間具有一些時間,在該時間期間可執行其他操作(諸如其他檢查)),或其等可並行地執行。額外地,若記憶體存取請求由於一個檢查而被拒絕,其他檢查可不執行(例如,記憶體存取請求可回應於未通過檢查的任一者而被拒絕,其可意謂著其他檢查不執行)。As suggested above, the PAS check circuitry and the device permission check circuitry do not necessarily need to be provided in the same physical location. Furthermore, the checks performed by the PAS check circuitry and the device permission check circuitry may be performed sequentially (optionally with some time between the two checks during which other operations (such as other checks) may be performed), or they may be performed in parallel. Additionally, if a memory access request is denied due to one check, the other check may not be performed (e.g., a memory access request may be denied in response to failing any of the checks, which may mean that the other check is not performed).
在一些實例中,回應於由該請求者裝置發布的一第一記憶體存取請求及由另外的請求者裝置發布的一第二記憶體存取請求而允許該裝置權限檢查電路系統取決於該裝置權限資訊而拒絕該第一記憶體存取請求而不拒絕該第二記憶體存取請求,其中該第一記憶體存取請求及該第二記憶體存取請求與相同的經選擇PAS關聯且識別相同的記憶體位置。In some examples, in response to a first memory access request issued by the requestor device and a second memory access request issued by another requestor device, the device permission checking circuitry is allowed to deny the first memory access request without denying the second memory access request depending on the device permission information, wherein the first memory access request and the second memory access request are associated with the same selected PAS and identify the same memory location.
若記憶體存取請求通過由PAS檢查電路系統執行的檢查,此並不意謂著其必然會通過由裝置權限檢查電路系統執行的檢查。實際上–如在此實例中–即使二個記憶體存取請求皆識別相同的記憶體位置且與相同的PAS關聯,裝置權限檢查電路系統拒絕記憶體存取請求之一者而不拒絕另一記憶體存取請求係可能的(例如,即使二者皆通過由PAS檢查電路系統執行的檢查)。例如,第一及第二記憶體存取請求可已(分別)由第一及第二請求者裝置(其等彼此不同)發布,其中允許第一請求者裝置存取經選擇PAS而禁止第二請求者裝置存取經選擇PAS。If a memory access request passes the check performed by the PAS checking circuitry, this does not mean that it will necessarily pass the check performed by the device permission checking circuitry. In fact—as in this example—even if two memory access requests both identify the same memory location and are associated with the same PAS, it is possible for the device permission checking circuitry to deny one of the memory access requests without denying the other memory access request (e.g., even if both pass the check performed by the PAS checking circuitry). For example, a first and second memory access request may have been issued (respectively) by first and second requestor devices (which are different from each other), with the first requestor device being allowed to access a selected PAS while the second requestor device being prohibited from accessing the selected PAS.
在一些實例中,該裝置權限檢查電路系統經組態以取決於該裝置權限檢查電路系統可存取的至少一個資料結構的內容而識別該裝置權限資訊。In some examples, the device permission check circuitry is configured to identify the device permission information based on the contents of at least one data structure accessible to the device permission check circuitry.
例如,裝置權限檢查電路系統可回應於記憶體存取請求而讀取至少一個資料結構的內容(例如,針對各請求者裝置可有至少一個資料結構,或單一資料結構具有對應於複數個請求者裝置之各者的至少一個項或欄位)以判定裝置權限資訊。For example, the device permission checking circuitry may read the contents of at least one data structure (e.g., there may be at least one data structure for each requestor device, or a single data structure may have at least one entry or field corresponding to each of a plurality of requestor devices) in response to a memory access request to determine device permission information.
在一些實例中,該至少一個資料結構經組態以針對一給定PAS保持指示該請求者裝置是否經禁止存取該給定PAS的一值。In some examples, the at least one data structure is configured to maintain, for a given PAS, a value indicating whether the requester device is prohibited from accessing the given PAS.
以此方式,保持在至少一個資料結構中的單一值可經設定以防止請求者裝置能夠存取給定PAS;從請求者裝置的觀點,該值因此有效地停用PAS–因此,可將該值尊崇為「PAS停用」(PAS disable, PASD)值。例如,至少一個資料結構可保持對應於各可用PAS的一值–例如,可係針對各PAS提供的單獨欄位或項。然而,應注意到可能不必然存在針對每個可用的PAS保持的一值–例如,在可用PAS包括根PAS(例如,負責管理不同操作域之間的切換的碼可存取的PAS)的特定實例中,可能沒有保持在該至少一個資料結構中之對應於根PAS的任何值。此可由於根PAS一般已經僅可由最受信任的程序所存取,所以由PASD值提供的額外保護可能係非必要的。In this way, a single value maintained in at least one data structure may be set to prevent a requestor device from being able to access a given PAS; from the requestor device's perspective, the value thus effectively disables the PAS - hence, the value may be referred to as a "PAS disable" (PASD) value. For example, at least one data structure may maintain a value corresponding to each available PAS - e.g., there may be a separate field or entry provided for each PAS. However, it should be noted that there may not necessarily be a value maintained for each available PAS - e.g., in a particular instance where the available PASs include a root PAS (e.g., a code-accessible PAS responsible for managing switching between different operating domains), there may not be any value maintained in the at least one data structure corresponding to the root PAS. This may be because the root PAS is generally already accessible only by the most trusted programs, so the additional protection provided by the PASD value may not be necessary.
在一些實例中,回應於在比一臨限例外等級更低特權的一例外等級執行的指令而禁止該設備將資料寫入至該至少一個資料結構。In some examples, the device is prohibited from writing data to the at least one data structure in response to instructions executed at an exception level of less privilege than a threshold exception level.
此可確保記錄在該至少一個資料結構中的裝置權限資訊不能由不受信任軟體所修改(例如,在比臨限例外等級更低特權的例外等級操作的軟體)。此進一步改善系統的安全性。This ensures that the device permission information recorded in the at least one data structure cannot be modified by untrusted software (e.g., software operating at an exception level with lower privileges than the critical exception level). This further improves the security of the system.
在一些實例中,該臨限例外等級包含一最高特權例外等級。In some examples, the threshold exception level includes a maximum privilege exception level.
因此,在此實例中,僅允許最受信任程序(例如,允許在最高特權例外等級操作的彼等)修改保持在該至少一個資料結構中的裝置權限資訊。此甚至進一步改善系統的安全性。Thus, in this example, only the most trusted programs (e.g., those allowed to operate at the highest privilege exception level) are allowed to modify the device permission information maintained in the at least one data structure. This even further improves the security of the system.
在一些實例中,該至少一個資料結構可包括至少一個系統暫存器,但其亦可(或替代地)包括另一類型的資料結構。作為一特定實例,若請求者裝置係外部裝置且裝置權限檢查電路系統位於系統記憶體管理單元(system memory management unit, SMMU)中,各裝置的裝置權限資訊狀態可來自串流表項(Stream Table Entry, STE)。例如,通過SMMU的各資料流可稱為串流,且單一串流可由多於一個裝置共用及/或單一裝置可具有多個串流。因此,裝置權限資訊可表達在STE內。In some examples, the at least one data structure may include at least one system register, but it may also (or alternatively) include another type of data structure. As a specific example, if the requestor device is an external device and the device permission checking circuitry is located in a system memory management unit (SMMU), the device permission information state of each device may come from a stream table entry (STE). For example, each data flow through the SMMU may be referred to as a stream, and a single stream may be shared by more than one device and/or a single device may have multiple streams. Therefore, the device permission information may be expressed in the STE.
此外,串流表可能非唯一描述各裝置之裝置組態或存取權限(包括本文描述的裝置權限資訊)的表。其他資料結構–諸如裝置權限表(Device Permission Table, DPT)–亦可保持應與SMMU相同的資訊,其可由在不同組態中的裝置使用。因此,此等其他資料結構亦可充當該至少一個資料結構。Additionally, the stream table may not be the only table that describes the device configuration or access permissions (including the device permission information described herein) of each device. Other data structures—such as the Device Permission Table (DPT)—may also hold information that should be the same as the SMMU, which can be used by devices in different configurations. Therefore, these other data structures may also serve as the at least one data structure.
在一些實例中,該至少一個資料結構包含一系統暫存器,且回應於一暫存器封鎖值保持在至少一個控制暫存器中,而禁止該設備回應於該暫存器封鎖值經設定而將資料寫入至該系統暫存器的至少一部分。In some examples, the at least one data structure includes a system register, and in response to a register lock value being maintained in at least one control register, the device is prohibited from writing data to at least a portion of the system register in response to the register lock value being set.
本技術的發明人理解到,在一些情形中,甚至防止最受信任的程序修改保持在該至少一個系統暫存器中的裝置權限資訊可係有益的。因此,在此實例中,暫存器封鎖值(在本文中亦稱為「寫入忽略」值)定義成當設定成給定值時,指示標定系統暫存器–或對系統暫存器的經識別部分–的任何寫入請求應忽略。例如,該值可包含單一位元,其經設定成「1」以指示對系統暫存器的寫入應忽略,或經設定成「0」以指示允許對系統暫存器的寫入(受可能係適當的任何其他限制–例如,取決於目前例外等級)。然而,應理解指示應或不應忽略寫入的「1」或「0」的分配係任意的,且可替代地指示寫入應忽略的係「0」的值。此外,在一些特定實例中,可存在針對該至少一個系統暫存器之各者定義的一單獨封鎖值(例如,在控制暫存器的單獨欄位中)。再者,雖然在一些實例中保持暫存器封鎖值的控制暫存器可與系統暫存器分開,在其他實例中,該至少一個控制暫存器可與系統暫存器相同。在此類實例中,暫存器封鎖值實際上可係保持在系統暫存器本身之給定欄位中的值。The inventors of the present technology understand that in some cases, it may be beneficial to prevent even the most trusted programs from modifying the device permission information maintained in the at least one system register. Therefore, in this example, a register lock value (also referred to herein as a "write ignore" value) is defined as when set to a given value, indicating that any write request to a designated system register - or to an identified portion of a system register - should be ignored. For example, the value may include a single bit that is set to "1" to indicate that writes to the system register should be ignored, or set to "0" to indicate that writes to the system register are allowed (subject to any other restrictions that may be appropriate - for example, depending on the current exception level). However, it should be understood that the assignment of "1" or "0" to indicate that a write should or should not be ignored is arbitrary, and a value of "0" may alternatively indicate that a write should be ignored. Additionally, in some specific examples, there may be a separate lock value defined for each of the at least one system register (e.g., in a separate field of the control register). Furthermore, while in some examples the control register that holds the register lock value may be separate from the system register, in other examples the at least one control register may be the same as the system register. In such examples, the register lock value may actually be the value held in a given field of the system register itself.
此外,本文描述的暫存器封鎖值亦可用以保護設備中的其他暫存器(例如,不僅保護負責儲存裝置權限資訊的系統暫存器)。例如,控制暫存器可保持對應於系統中的任何指定暫存器的暫存器封鎖值。In addition, the register lock values described herein may also be used to protect other registers in the device (e.g., not just system registers responsible for storing device permission information). For example, a control register may hold a register lock value corresponding to any specified register in the system.
在一些實例中,除非該請求者裝置經重設,防止該設備在該暫存器封鎖值已設定之後將其清除。In some examples, the apparatus is prevented from clearing the register lock value after it has been set unless the requestor device is reset.
因此,暫存器封鎖值可係「固著的(sticky)」。此藉由使清除暫存器封鎖值(且因此重啟用請求者裝置的對應PAS)變得更困難而改善安全性。應注意到允許設備設定暫存器封鎖值(例如,除非該值經設定,其係非「固著的」);應理解與設定暫存器封鎖值關聯的安全等級不一定需要與清除暫存器封鎖值關聯的安全等級一樣高,因為設定該值僅增加對該至少一個系統暫存器提供的保護等級。Thus, the register lock value may be "sticky." This improves security by making it more difficult to clear the register lock value (and thereby re-enable the corresponding PAS of the requestor device). It should be noted that a device is permitted to set the register lock value (e.g., unless the value is set, it is not "sticky"); it should be understood that the security level associated with setting the register lock value does not necessarily need to be as high as the security level associated with clearing the register lock value, as setting the value merely increases the level of protection provided to the at least one system register.
在一些實例中,該設備包含位址轉譯電路系統,該位址轉譯電路系統回應於該記憶體存取請求而將由該記憶體存取請求指定的該記憶體位址轉譯成與該記憶體存取請求關聯的經選擇之該PAS中的一實體位址。In some examples, the device includes address translation circuitry that, in response to the memory access request, translates the memory address specified by the memory access request into a physical address in the selected PAS associated with the memory access request.
在此實例中,記憶體位址係在與經選擇實體位址空間不同的輸入位址空間中,且因此提供位址轉譯電路系統以將記憶體位址轉譯成經選擇PAS中的實體位址。作為一特定實例,記憶體位址可係虛擬位址。將實體位址空間虛擬化成對程序暴露的一或多個輸入位址空間可藉由在程序之間提供進一步的隔離等級而改善安全性。In this example, the memory address is in an input address space that is different from the selected physical address space, and therefore address translation circuitry is provided to translate the memory address into a physical address in the selected PAS. As a specific example, the memory address may be a virtual address. Virtualizing the physical address space into one or more input address spaces exposed to the program may improve security by providing a further level of isolation between programs.
在一些實例中,該位址轉譯電路系統包含該PAS選擇電路系統。In some examples, the address translation circuitry includes the PAS selection circuitry.
因此,在此實例中,當將記憶體位址轉譯成實體位址時,執行PAS的選擇。在特定實例中,此可涉及將PAS識別符關聯至記憶體存取請求。Thus, in this example, the selection of a PAS is performed when translating a memory address into a physical address. In a specific example, this may involve associating a PAS identifier with a memory access request.
在一些實例中,該PAS選擇電路系統回應於該記憶體存取請求而基於定義在用於由該記憶體存取請求指定之該記憶體位址的一頁表項中的資訊而選擇待與該記憶體存取請求關聯的經選擇之該PAS。In some examples, the PAS selection circuitry selects the selected PAS to be associated with the memory access request in response to the memory access request based on information defined in a page table entry for the memory address specified by the memory access request.
在此實例中,位址轉譯電路系統使用定義在頁表中的位址轉譯資訊(例如,其可儲存在記憶體中,其中可選地將來自頁表的一些資訊快取在轉譯後備緩衝區中)將記憶體位址轉譯成實體位址。對應於記憶體位址的頁表項提供經轉譯PAS,且在此實例中,亦提供用於在選擇待與記憶體存取請求關聯之PAS時使用的資訊。定義在頁表項中的任何此類資訊與目前操作域的識別符組合使用以選擇PAS。In this example, the address translation circuitry translates a memory address into a physical address using address translation information defined in a page table (e.g., which may be stored in memory, with some information from the page table optionally cached in a translation lookaside buffer). The page table entry corresponding to the memory address provides a translated PAS and, in this example, also provides information for use in selecting a PAS to be associated with a memory access request. Any such information defined in the page table entry is used in combination with an identifier of the current operating domain to select a PAS.
在一些實例中,該位址轉譯電路系統包含下列之至少一者: - 記憶體管理單元(memory management unit, MMU),其與至少一個處理元件關聯;及 - 一系統MMU (SMMU),其與至少一個外部裝置關聯。 In some embodiments, the address translation circuitry includes at least one of: - a memory management unit (MMU) associated with at least one processing element; and - a system MMU (SMMU) associated with at least one external device.
MMU係位址轉譯電路系統的特定實例,且亦可負責強制執行至少一些記憶體存取權限(例如,定義在頁表中之可或可不包括位址空間權限資訊的存取權限)。MMU的特定實例係SMMU,其提供MMU之用於接收自一或多個外部裝置之記憶體存取請求的功能。在本技術的此實例中,設備可包含MMU及SMMU的一或二者,其各者可提供上述PAS選擇電路系統的功能。An MMU is a specific instance of address translation circuitry and may also be responsible for enforcing at least some memory access permissions (e.g., access permissions defined in page tables that may or may not include address space permission information). A specific instance of an MMU is an SMMU, which provides the functionality of the MMU for memory access requests received from one or more external devices. In this example of the present technology, an apparatus may include one or both of an MMU and an SMMU, each of which may provide the functionality of the PAS selection circuitry described above.
在一些實例中,該請求者裝置包含一處理元件或一外部裝置。In some examples, the requester device includes a processing element or an external device.
因此,請求者裝置可係處理元件(processing element, PE)(諸如中央處理單元(CPU)、圖形處理單元(GPU)、或類神經處理單元(neural processing unit, NPU))或其可係某外部(例如,周邊或I/O)裝置。應注意到設備可經調適以接收來自多個請求者裝置(例如,請求者裝置可係複數個請求者裝置之一者)(其可包括PE及外部裝置二者)的記憶體存取請求。Thus, the requestor device may be a processing element (PE) such as a central processing unit (CPU), a graphics processing unit (GPU), or a neural processing unit (NPU) or it may be some external (e.g., peripheral or I/O) device. It should be noted that the apparatus may be adapted to receive memory access requests from multiple requestor devices (e.g., the requestor device may be one of a plurality of requestor devices), which may include both PEs and external devices.
在一些實例中,該PAS檢查電路系統經組態以取決於定義在記憶體中的一表的一表項中的權限資訊識別該位址空間權限資訊,其中該權限資訊定義該複數個PAS的何者係用於經識別之該記憶體位置的一經允許PAS。In some examples, the PAS checking circuitry is configured to identify the address space permission information based on permission information in an entry in a table defined in memory, wherein the permission information defines which of the plurality of PASs is an allowed PAS for the identified memory location.
例如,此可係與上文討論之頁表不同的表,且可稱為「顆粒保護表」(Granule Protection Table, GPT)。GPT可針對給定記憶體位置保持指示允許哪些PAS存取該記憶體位置的資訊(稱為「顆粒保護資訊」(GPI))。因此,在此實例中,PAS檢查電路系統使用GPI判定是否拒絕記憶體存取請求(例如,由於GPI不將經選擇PAS識別為該記憶體位置的經允許PAS)。For example, this may be a different table than the page table discussed above, and may be referred to as a "Granule Protection Table" (GPT). The GPT may maintain information indicating, for a given memory location, which PASs are allowed to access that memory location (referred to as "granule protection information" (GPI)). Thus, in this example, the PAS checking circuitry uses the GPI to determine whether to deny a memory access request (e.g., because the GPI does not identify the selected PAS as an allowed PAS for that memory location).
在一些實例中,該設備包含至少一個前PoPA記憶體系統組件,該至少一個前PoPA記憶體系統組件提供在一實體別名點(PoPA)上游,以將來自不同PAS之對應於相同記憶體系統資源的別名實體位址視為彷彿該等別名實體位址對應於不同的記憶體系統資源。In some examples, the apparatus includes at least one pre-PoPA memory system component provided upstream of a physical point of alias (PoPA) to treat aliased physical addresses from different PASs corresponding to the same memory system resources as if the aliased physical addresses correspond to different memory system resources.
記憶體系統可包括實體別名點(point of physical aliasing, PoPA),該實體別名點係將來自不同實體位址空間之對應於相同記憶體系統資源的別名實體位址映射至唯一識別記憶體系統資源的單一實體位址的點。記憶體系統可包括提供在PoPA上游的至少一個前PoPA記憶體系統組件,該至少一個前PoPA記憶體系統組件將該等別名實體位址視為彷彿其等對應於不同的記憶體系統資源。The memory system may include a point of physical aliasing (PoPA), which is a point that maps aliased physical addresses from different physical address spaces corresponding to the same memory system resource to a single physical address that uniquely identifies the memory system resource. The memory system may include at least one pre-PoPA memory system component provided upstream of the PoPA, the at least one pre-PoPA memory system component treating the aliased physical addresses as if they correspond to different memory system resources.
例如,至少一個前PoPA記憶體系統組件可包括可將用於別名實體位址的資料、程式碼、或位址轉譯資訊快取在單獨項中的快取記憶體或轉譯後備緩衝區,使得若相同的記憶體系統資源經請求從不同的實體位址空間存取,則存取將導致分配單獨的快取記憶體或TLB項。再者,前PoPA記憶體系統組件可包括一致性控制電路系統,諸如一致性互連、監聽過濾器、或用於在各別主裝置處的經快取資訊之間維持一致性的其他機制。一致性控制電路系統可將單獨的一致性狀態指派給不同實體位址空間中的各別別名實體位址。因此,出於維持一致性的目的,即使別名實體位址實際上對應於相同的底層記憶體系統資源,將其等視為分開的位址。雖然表面上,分開追蹤別名實體位址的一致性看起來可能會導致一致性損失的問題,實際上此由於若在不同域中操作的程序確實意圖共用對特定記憶體系統資源的存取,則其等可使用較不安全的實體位址空間存取該資源(或使用下文描述的限制性共用特徵以使用其他實體位址空間之一者存取資源)而不成問題。前PoPA記憶體系統組件的另一實例可係記憶體保護引擎,其經提供以用於保護儲存至晶片外記憶體的資料防備機密損失及/或篡改。例如,此一記憶體保護引擎可取決於資源從哪個實體位址空間存取而使用不同的加密金鑰分開加密與特定記憶體系統資源關聯的資料,有效地將別名實體位址視為彷彿其等對應於不同的記憶體系統資源(例如,可使用使加密相依於位址的加密方案,且可針對此目的,將實體位址空間識別符視為係位址的部分)。For example, at least one pre-PoPA memory system component may include a cache or translation lookaside buffer that can cache data, code, or address translation information for aliased physical addresses in separate entries, so that if the same memory system resource is requested to be accessed from different physical address spaces, the access will result in the allocation of separate cache or TLB entries. Furthermore, the pre-PoPA memory system component may include consistency control circuitry, such as a consistency interconnect, a snoop filter, or other mechanism for maintaining consistency between cached information at separate masters. The consistency control circuitry can assign separate consistency states to separate aliased physical addresses in different physical address spaces. Therefore, for the purpose of maintaining consistency, alias physical addresses are treated as separate addresses even though they actually correspond to the same underlying memory system resource. Although on the surface, separately tracking the consistency of alias physical addresses may appear to cause consistency loss problems, in reality this is because if programs operating in different domains do intend to share access to a particular memory system resource, they can use the less secure physical address space to access that resource (or use the restricted sharing feature described below to access the resource using one of the other physical address spaces) without being a problem. Another example of a pre-PoPA memory system component may be a memory protection engine, which is provided for protecting data stored to off-chip memory from confidentiality loss and/or tampering. For example, such a memory protection engine may separately encrypt data associated with particular memory system resources using different encryption keys depending on which physical address space the resource is accessed from, effectively treating the aliased physical addresses as if they corresponded to different memory system resources (e.g., an encryption scheme may be used that makes encryption address-dependent, and the physical address space identifier may be treated as part of the address for this purpose).
無論前PoPA記憶體系統組件的形式為何,此一前PoPA記憶體系統組件將別名實體位址視為彷彿其等對應於不同的記憶體系統資源可係有用的,由於此在發布至不同的實體位址空間的存取之間提供硬體強制隔離,使得與一個域關聯的資訊無法藉由諸如快取記憶體時序側通道或涉及由一致性控制電路系統所觸發的一致性的改變的側通道的特徵而洩露至另一域。Regardless of the form of the pre-PoPA memory system component, it may be useful for such a pre-PoPA memory system component to treat aliased physical addresses as if they correspond to different memory system resources, since this provides hardware-enforced isolation between accesses issued to different physical address spaces so that information associated with one domain cannot be leaked to another domain through characteristics such as cache timing side channels or side channels involving changes in coherence triggered by coherence control circuitry.
在一些實例中,該設備包含一PoPA記憶體系統組件,該PoPA記憶體系統組件經組態以將該複數個別名實體位址去別名(de-alias)以獲得待提供至至少一個下游記憶體系統組件的一經去別名實體位址。In some examples, the apparatus includes a PoPA memory system component configured to de-alias the plurality of aliased physical addresses to obtain a de-aliased physical address to be provided to at least one downstream memory system component.
在一些實施方案中,不同實體位址空間中的別名實體位址針對各別不同的實體位址空間使用不同的數值實體位址值表示可係可行的。此方法可能需要映射表以在PoPA處判定不同的實體位址值的哪些對應於相同的記憶體系統資源。然而,可將維持映射表的此負擔視為係不需要的,且因此在一些實施方案中,若別名實體位址包含在不同實體位址空間之各者中使用相同數值實體位址值表示的實體位址,可能更簡單。若採用此方法,則在實體別名點處,其可足夠簡單以將識別哪個實體位址空間係使用記憶體存取存取的實體位址空間識別符拋棄,且接著在下游將剩餘的實體位址位元提供為經去別名實體位址。In some implementations, it may be feasible for aliased physical addresses in different physical address spaces to be represented using different numerical physical address values for respectively different physical address spaces. This approach may require a mapping table to determine which of the different physical address values correspond to the same memory system resources at the PoPA. However, this burden of maintaining a mapping table may be considered unnecessary, and therefore in some implementations, it may be simpler if the aliased physical addresses include physical addresses represented using the same numerical physical address value in each of the different physical address spaces. If this approach is adopted, then at the physical alias point, it may be simple enough to discard the physical address space identifier that identifies which physical address space is accessed using a memory access, and then provide the remaining physical address bits downstream as a de-aliased physical address.
因此,除了前PoPA記憶體系統組件外,該記憶體系統亦可包括一PoPA記憶體系統組件,該PoPA記憶體系統組件經組態以將該複數個別名實體位址去別名以獲得待提供至至少一個下游記憶體系統組件的一經去別名實體位址。如上文所述,PoPA記憶體系統組件可係存取映射表以找出對應於特定位址空間中的別名位址的經去別名位址的裝置。然而,PoPA組件亦可簡單地係在記憶體系統內的位置,其中將與給定記憶體存取關聯的實體位址標籤拋棄,使得下游提供的實體位址唯一識別對應的記憶體系統資源,無論此係從哪個實體位址空間提供。替代地,在一些情形中,PoPA記憶體系統組件仍可將實體位址空間標籤提供給至少一個下游記憶體系統組件(例如,如下文進一步討論的,出於啟用完成者側過濾的目的),但PoPA可標示記憶體系統內之超出其下游記憶體系統組件就不再將別名實體位址視為不同記憶體系統資源的點,但將別名實體位址之各者視為映射相同的記憶體系統資源。例如,若PoPA下游的記憶體控制器或硬體記憶體儲存裝置接收實體位址標籤及給定記憶體存取請求的實體位址,則若該實體位址對應於與先前所見交易相同的實體位址,則可施加針對存取相同實體位址(諸如將存取合併至相同位址)的各別交易執行的任何風險檢查或效能改善,即使該等各別交易指定不同的實體位址空間標籤。相比之下,對於PoPA上游的記憶體系統組件,若此等交易指定不同實體位址空間中的相同實體位址,可不叫用針對存取相同實體位址的交易所採取的此類風險檢查或效能改善步驟。Thus, in addition to the pre-PoPA memory system component, the memory system may also include a PoPA memory system component configured to de-alias the plurality of aliased physical addresses to obtain a de-aliased physical address to be provided to at least one downstream memory system component. As described above, the PoPA memory system component may be a device that accesses a mapping table to locate a de-aliased address corresponding to an aliased address in a particular address space. However, the PoPA component may also simply be a location within the memory system where the physical address tag associated with a given memory access is discarded so that the physical address provided downstream uniquely identifies the corresponding memory system resource, regardless of which physical address space it is provided from. Alternatively, in some cases, a PoPA memory system component may still provide physical address space labels to at least one downstream memory system component (e.g., as discussed further below, for the purpose of enabling completer-side filtering), but the PoPA may mark a point within the memory system beyond which its downstream memory system components no longer treat the aliased physical addresses as different memory system resources, but instead treat each of the aliased physical addresses as mapping the same memory system resource. For example, if a memory controller or hardware memory storage device downstream of PoPA receives a physical address tag and the physical address of a given memory access request, then if the physical address corresponds to the same physical address as a previously seen transaction, any risk checks or performance improvements that are performed for separate transactions accessing the same physical address (such as merging accesses to the same address) may be applied, even if the separate transactions specify different physical address space tags. In contrast, for a memory system component upstream of PoPA, if such transactions specify the same physical address in different physical address spaces, such risk checks or performance improvement steps that are taken for transactions accessing the same physical address may not be invoked.
上文討論的技術可實施在具有實施上文描述之PAS選擇電路系統及存取控制電路系統之電路硬體的硬體設備中。The techniques discussed above may be implemented in a hardware device having circuit hardware that implements the PAS selection circuitry and access control circuitry described above.
然而,在另一實例中,相同技術可實施在電腦程式(例如,架構模擬器或模型)中,其可提供用於控制主機資料處理設備以提供用於來自目標碼之指令的執行的指令執行環境。電腦程式可包括PAS選擇程式邏輯以用於選擇待與記憶體存取請求關聯的PAS–該PAS選擇程式邏輯因此仿真PAS選擇電路系統的功能。電腦程式亦可包括PAS檢查程式邏輯及裝置權限檢查程式邏輯以分別仿真PAS檢查電路系統及裝置權限檢查電路系統的功能。PAS檢查程式邏輯及裝置權限檢查程式邏輯可一起視為係存取控制程式邏輯的部分。However, in another example, the same technology may be implemented in a computer program (e.g., an architecture simulator or model) that may provide an instruction execution environment for controlling a host data processing device to provide for the execution of instructions from target code. The computer program may include PAS selector logic for selecting a PAS to be associated with a memory access request—the PAS selector logic thus emulating the functionality of a PAS selection circuit system. The computer program may also include PAS checker logic and device permission checker logic to respectively emulate the functionality of a PAS checker circuit system and a device permission checker circuit system. The PAS checker logic and the device permission checker logic may be considered together as part of the access control program logic.
在特定實例中,該程式亦可包括暫存器維持程式邏輯,該暫存器維持程式邏輯維持表示(仿真)由該程式模擬之指令集架構的架構暫存器的資料結構(在主機設備的記憶體或架構暫存器內)。經仿真暫存器可包括在上文的一些實例中描述的該至少一個系統暫存器及/或該至少一個控制暫存器。因此,此一模擬器電腦程式可對在模擬器電腦程式上執行的目標碼呈現與將由能夠直接執行目標指令集的實際硬體設備提供的環境類似的指令執行環境,即使在正在執行模擬器程式的主機電腦上可能不存在提供此等特徵的任何實際硬體。此對於在不實際支援一個指令集架構的主機平台上執行針對該架構編寫的碼可係有用的。再者,在軟體開發與支援新架構之硬體裝置的開發並行地執行的同時,模擬器在開發新版本之指令集架構之軟體的期間可係有用的。此可允許軟體在模擬器上開發及測試,使得軟體開發可在支援新架構的硬體裝置可用之前開始。In certain examples, the program may also include register-maintained program logic that maintains a data structure (in a memory or architecture register of a host device) of an architecture register representing (simulating) an instruction set architecture emulated by the program. The emulated registers may include the at least one system register and/or the at least one control register described in some examples above. Thus, such an emulator computer program can present to target code executed on the emulator computer program an instruction execution environment similar to that which would be provided by actual hardware devices capable of directly executing the target instruction set, even though there may not be any actual hardware providing such features on the host computer on which the emulator program is being executed. This can be useful for executing code written for an instruction set architecture on a host platform that does not actually support that architecture. Furthermore, an emulator can be useful during the development of software for a new version of an instruction set architecture, while the software development is performed in parallel with the development of hardware devices supporting the new architecture. This allows software to be developed and tested on the emulator, allowing software development to begin before hardware devices supporting the new architecture are available.
本文所描述之概念可體現於用於製造體現所描述之概念的設備的電腦可讀碼中。例如,電腦可讀碼可在半導體設計及製造程序之一或多個階段中使用,該半導體設計及製造程序包括電子設計自動化(electronic design automation, EDA)階段,以製造一積體電路,其包含實現概念之設備。上述電腦可讀碼可另外或替代地促成實現本文所述之概念之設備的定義、模型化、模擬、驗證及/或測試。The concepts described herein may be embodied in computer readable code for use in fabricating devices embodying the described concepts. For example, the computer readable code may be used in one or more stages of a semiconductor design and fabrication process, including an electronic design automation (EDA) stage, to fabricate an integrated circuit comprising a device implementing the concepts. The computer readable code may additionally or alternatively facilitate the definition, modeling, simulation, verification and/or testing of devices implementing the concepts described herein.
例如,用於製造實現本文所述之概念的設備之電腦可讀碼可以定義代表該等概念之硬體描述語言(HDL)的碼實施。例如,碼可定義用於定義實現概念的設備之一或多個邏輯電路的暫存器轉移層(register-transfer-level, RTL)抽象概念。碼可定義代表一或多個邏輯電路的HDL,其以Verilog、System Verilog、Chisel或VHDL(超高速積體電路硬體描述語言)以及諸如FIRRTL的中間表示實現設備。電腦可讀碼可使用系統級模型化語言提供實現概念之定義,諸如系統C及系統Verilog或可藉由電腦解譯以促成概念的模擬、功能及/或正式驗證及測試之概念的其他行為表示。For example, computer-readable code for making devices that implement the concepts described herein may define a code implementation of a hardware description language (HDL) that represents the concepts. For example, the code may define a register-transfer-level (RTL) abstract concept that is used to define one or more logic circuits of a device that implements the concept. The code may define an HDL that represents one or more logic circuits that implement the device in Verilog, System Verilog, Chisel, or VHDL (Very High Speed Integrated Circuit Hardware Description Language), as well as intermediate representations such as FIRRTL. The computer-readable code may provide definitions of the implementation concepts using a system-level modeling language such as System C and System Verilog or other behavioral representations of the concepts that can be interpreted by a computer to facilitate simulation, functional and/or formal verification and testing of the concepts.
另外或替代地,電腦可讀碼可實現一或多個接線對照表之電腦可讀表示。一或多個接線對照表可藉由將一或多個邏輯合成程序應用於RTL表示而產生。替代地或額外地,一或多個邏輯合成程序可從電腦可讀碼產生一位元流,該位元流被載入至一場可程式化閘陣列(FPGA)中以組態FPGA以實現所描述之概念。FPGA可部署用於積體電路中之製造之前的驗證及測試概念的目的,或FPGA可直接部署於產品中。Additionally or alternatively, the computer readable code may implement a computer readable representation of one or more wiring lookup tables. The one or more wiring lookup tables may be generated by applying one or more logic synthesis programs to the RTL representation. Alternatively or additionally, the one or more logic synthesis programs may generate a bit stream from the computer readable code that is loaded into a field programmable gate array (FPGA) to configure the FPGA to implement the described concepts. The FPGA may be deployed for the purpose of validating and testing concepts prior to fabrication in an integrated circuit, or the FPGA may be deployed directly in a product.
電腦可讀碼可包含用於製造設備之碼表示之混合,例如包括RTL表示、接線對照表表示、或用於半導體設計及製造程序以製造實現本發明之設備的另一電腦可讀定義之一或多者之混合。替代地或額外地,概念可定義在半導體設計及製造程序中使用以製造設備之電腦可讀定義與一旦製造由所定義設備執行的電腦可讀碼定義指令的組合。The computer readable code may include a mixture of code representations used to manufacture a device, such as a mixture of one or more of an RTL representation, a wiring lookup table representation, or another computer readable definition used in a semiconductor design and manufacturing process to manufacture a device that implements the present invention. Alternatively or additionally, a concept may define a combination of a computer readable definition used in a semiconductor design and manufacturing process to manufacture a device and computer readable code definition instructions executed by the defined device once manufactured.
此類電腦可讀碼可設置於任何已知暫時性電腦可讀媒體(諸如,網路上之有線或無線傳輸碼)或非暫時性電腦可讀媒體(諸如,半導體、磁碟或光碟)中。使用電腦可讀碼製造的積體電路可包含組件,諸如中央處理單元、圖形處理單元、神經處理單元、數位信號處理器或單獨或共同實現概念的其他組件之一或多者。Such computer readable code may be placed in any known transient computer readable medium (e.g., wired or wireless transmission code over a network) or non-transient computer readable medium (e.g., semiconductor, disk, or optical disk). An integrated circuit fabricated using computer readable code may include components such as a central processing unit, a graphics processing unit, a neural processing unit, a digital signal processor, or one or more of the other components that implement the concept alone or together.
現在將參考圖式描述特定實施例。 藉由軟體控制對實體位址空間的存取 A specific embodiment will now be described with reference to the drawings. Access to physical address space controlled by software
圖1示意地繪示具有至少一個請求者裝置4及至少一個完成者裝置6的資料處理系統2的實例。互連8提供請求者裝置4與完成者裝置6之間的通訊。請求者裝置能夠發布請求對特定可定址記憶體系統位置的記憶體存取的記憶體存取請求。完成者裝置6係具有服務指向其之記憶體存取請求之責任的裝置。雖然未顯示於圖1中,一些裝置可能能夠充當請求者裝置及充當完成者裝置二者。請求者裝置4可例如包括處理元件(諸如中央處理單元(CPU)或圖形處理單元(GPU))或其他主裝置(諸如匯流排主裝置、網路介面控制器、顯示器控制器、外部裝置(亦稱為「周邊」或「輸入/輸出」(I/O)裝置))等。完成者裝置可包括負責控制對對應記憶體儲存單元之存取的記憶體控制器、用於控制對周邊裝置之存取的周邊控制器等。圖1更詳細地顯示請求者裝置4之一者的實例組態,但應理解其他請求者裝置4可具有類似組態。替代地,其他請求者裝置可具有與顯示於圖1左側之請求者裝置4不同的組態。FIG. 1 schematically illustrates an example of a data processing system 2 having at least one requestor device 4 and at least one completer device 6. An interconnect 8 provides communication between the requestor device 4 and the completer device 6. The requestor device is capable of issuing memory access requests requesting memory access to a specific addressable memory system location. The completer device 6 is a device that has the responsibility of servicing memory access requests directed to it. Although not shown in FIG. 1 , some devices may be capable of acting as both a requestor device and as a completer device. Requester device 4 may, for example, include a processing element such as a central processing unit (CPU) or a graphics processing unit (GPU) or other host devices such as a bus host device, a network interface controller, a display controller, an external device (also referred to as a "peripheral" or "input/output" (I/O) device) and the like. A completer device may include a memory controller responsible for controlling access to a corresponding memory storage unit, a peripheral controller for controlling access to a peripheral device, and the like. FIG. 1 shows an example configuration of one of requester devices 4 in more detail, but it should be understood that other requester devices 4 may have similar configurations. Alternatively, other requester devices may have a different configuration than the requester device 4 shown on the left side of FIG. 1 .
請求者裝置4具有用於回應於指令而參考儲存在暫存器12中的資料執行資料處理的處理電路系統10。暫存器12可包括用於儲存運算元及經處理指令之結果的通用暫存器,以及用於儲存用於組態處理如何由處理電路系統執行的控制資料的控制暫存器。例如,控制資料可包括用以選擇哪個操作域係目前域的目前域指示14,及指示哪個例外等級係處理電路系統10正在操作的目前例外等級的目前例外等級指示15。暫存器亦可進一步包括待於下文更詳細地討論的系統暫存器13。The requester device 4 has a processing circuit system 10 for performing data processing in response to an instruction with reference to data stored in a register 12. The register 12 may include general registers for storing operands and results of processed instructions, and control registers for storing control data for configuring how processing is performed by the processing circuit system. For example, the control data may include a current domain indication 14 for selecting which operating domain is the current domain, and a current exception level indication 15 indicating which exception level is the current exception level at which the processing circuit system 10 is operating. The registers may also further include a system register 13 to be discussed in more detail below.
處理電路系統10可能能夠發布指定識別待存取之可定址位置的虛擬位址(virtual address, VA)的記憶體存取請求及識別目前域的域識別符(域ID或「安全狀態」)。位址轉譯電路系統16(例如,記憶體管理單元(MMU))基於定義在儲存在記憶體系統中的頁表結構中的頁表資料而通過多級位址轉譯之一者將虛擬位址轉譯成實體位址(physical address, PA)。轉譯後備緩衝區(translation lookaside buffer, TLB) 18充當用於快取一些頁表資訊的查找快取記憶體,以用於在每次需要位址轉譯時,比若必需從記憶體提取頁表資訊更快的存取。在此實例中,除了產生實體位址外,位址轉譯電路系統16亦選擇若干個實體位址空間之與該實體位址關聯之一者,並輸出識別經選擇實體位址空間的實體位址空間(PAS)識別符。因此,此實例中的位址轉譯電路系統16充當PAS選擇電路系統。PAS的選擇將於下文更詳細地討論;應注意,在一些其他實例中,PAS選擇電路系統可與位址轉譯電路系統16分開。Processing circuitry 10 may be capable of issuing a memory access request specifying a virtual address (VA) identifying an addressable location to be accessed and a domain identifier (domain ID or "security state") identifying a current domain. Address translation circuitry 16 (e.g., a memory management unit (MMU)) translates the virtual address into a physical address (PA) through one of multiple levels of address translation based on page table data defined in a page table structure stored in the memory system. Translation lookaside buffer (TLB) 18 acts as a lookup cache for caching some page table information for faster access than if the page table information had to be fetched from memory each time an address translation is needed. In this example, in addition to generating a physical address, address translation circuitry 16 also selects one of several physical address spaces associated with the physical address and outputs a physical address space (PAS) identifier that identifies the selected physical address space. Thus, address translation circuitry 16 in this example acts as PAS selection circuitry. The selection of a PAS will be discussed in more detail below; it should be noted that in some other examples, the PAS selection circuitry may be separate from the address translation circuitry 16.
PAS過濾器20充當用於基於經轉譯實體位址及PAS識別符檢查是否允許該實體位址在由PAS識別符識別的經指定實體位址空間內存取的請求者側過濾電路系統。此查找係基於儲存在記憶體系統內所儲存之顆粒保護表結構中的顆粒保護資訊。顆粒保護資訊可快取在顆粒保護資訊快取記憶體22內,類似於將頁表資料快取在TLB 18中。雖然在圖1的實例中將顆粒保護資訊快取記憶體22顯示成係與TLB 18分開的結構,在其他實例中,可將此等類型的查找快取記憶體組合成單一查找快取記憶體結構,使得經組合結構之項的單一查找提供頁表資訊及顆粒保護資訊二者。顆粒保護資訊定義限制給定實體位址可自其存取之實體位址空間的資訊,且基於此查找,PAS過濾器20判定是否允許記憶體存取請求繼續進行以發布至一或多個快取記憶體24及/或互連8。若不允許記憶體存取請求的經指定PAS存取經指定實體位址,則PAS過濾器20阻止交易且可傳訊故障。The PAS filter 20 acts as a requester-side filtering circuit system for checking whether the physical address is allowed to access the specified physical address space identified by the PAS identifier based on the translated physical address and the PAS identifier. This search is based on the grain protection information stored in the grain protection table structure stored in the memory system. The grain protection information can be cached in the grain protection information cache 22, similar to caching the page table data in the TLB 18. 1 is shown as a separate structure from the TLB 18, in other examples, these types of lookup caches may be combined into a single lookup cache structure so that a single lookup of the entries of the combined structure provides both page table information and granule protection information. The granule protection information defines information that restricts the physical address space from which a given physical address can be accessed, and based on this lookup, the PAS filter 20 determines whether to allow a memory access request to proceed to be issued to one or more caches 24 and/or the interconnect 8. If the PAS-specified physical address of the memory access request is not allowed, the PAS filter 20 blocks the transaction and may signal a fault.
雖然圖1顯示具有多個請求者裝置4之系統的實例,針對圖1左側的一個請求者裝置顯示的特徵亦可包括在僅有一個請求者裝置(諸如單核心處理器)的系統中。Although FIG. 1 shows an example of a system having multiple requester devices 4, the features shown for one requester device on the left side of FIG. 1 may also be included in a system having only one requester device (e.g., a single core processor).
雖然圖1顯示用於給定請求之PAS的選擇係由位址轉譯電路系統16執行的實例,在其他實例中,用於判定選擇哪個PAS的資訊可連同PA由位址轉譯電路系統16輸出至PAS過濾器20,且PAS過濾器20可選擇PAS並檢查是否允許PA在經選擇PAS內存取。替代地,PAS選擇可與位址轉譯電路系統16及PAS過濾器20二者分開。Although FIG. 1 shows an example in which the selection of a PAS for a given request is performed by the address translation circuit system 16, in other examples, information used to determine which PAS to select may be output by the address translation circuit system 16 along with the PA to the PAS filter 20, and the PAS filter 20 may select the PAS and check whether the PA is allowed to access within the selected PAS. Alternatively, the PAS selection may be separate from both the address translation circuit system 16 and the PAS filter 20.
PAS過濾器20的提供幫助支援可在若干個操作域中操作的系統,該等操作域各與其自身的經隔離實體位址空間關聯,其中對於至少部分的記憶體系統(例如,對於一些快取記憶體或一致性強制機制,諸如監聽過濾器),將分開的實體位址空間視為彷彿其等參考至識別分開的記憶體系統位置的完全分開的位址組,即使在彼等位址空間內的位址實際上參考至記憶體系統中的相同實體位置。此對安全目的可係有用的。The provision of PAS filter 20 helps support systems that can operate in several operating domains, each associated with its own isolated physical address space, where to at least part of the memory system (e.g., to some cache or consistency enforcement mechanisms such as monitoring filters), the separate physical address spaces are treated as if they refer to completely separate sets of addresses that identify separate memory system locations, even though addresses within those address spaces actually refer to the same physical location in the memory system. This can be useful for security purposes.
圖2顯示處理電路系統10可在其中操作的不同操作狀態及域的實例,及可在不同例外等級及域中執行之軟體之類型的實例(當然,應理解安裝在系統上的特定軟體係由管理該系統的管理方選擇且因此係非硬體架構的基本特徵)。Figure 2 shows examples of different operating states and domains in which the processing circuit system 10 can operate, and examples of the types of software that can execute in different exception levels and domains (of course, it should be understood that the specific software installed on the system is selected by the administrator who manages the system and is therefore not an essential feature of the hardware architecture).
處理電路系統10可在若干個不同的例外等級80操作,在此實例中,標記為EL0、EL1、EL2、及EL3的四個例外等級,其中在此實例中,EL3係指具有最大特權等級的例外等級,而EL0係指具有最小特權的例外等級。應理解其他架構可選擇相反的編號,使得可將具有最高數目的例外等級視為具有最低特權。在此實例中,最小特權例外等級EL0係用於應用程式層級碼、次一最高特權例外等級EL1係用於作業系統層級碼、次一最高特權例外等級EL2係用於管理若干個虛擬化作業系統之間的切換的超管理器層級碼、而最高特權例外等級EL3係用於管理各別域之間的切換及實體位址至實體位址空間之分配的監測碼,如稍後描述的。The processing circuit system 10 can operate at a number of different exception levels 80, in this example, four exception levels labeled EL0, EL1, EL2, and EL3, where in this example, EL3 refers to the exception level with the most privileged level and EL0 refers to the exception level with the least privileged level. It should be understood that other architectures may choose the opposite numbering, so that the exception level with the highest number can be considered to have the least privilege. In this example, the least privileged exception level EL0 is used for application-level code, the next most privileged exception level EL1 is used for operating system-level code, the next most privileged exception level EL2 is used for hypervisor-level code that manages switching between several virtualized operating systems, and the most privileged exception level EL3 is used for monitoring code that manages switching between individual domains and allocation of physical addresses to physical address space, as described later.
當例外在處理在特定例外等級中之軟體的同時發生時,對於一些類型的例外,將該例外取至更高(更多特權)的例外等級,其中該例外取至其的特定例外等級係基於所發生之特定例外的屬性選擇。然而,在一些情況下,其他類型的例外在與採取例外時正在處理之碼關聯的例外等級相同的例外等級採取可係可能的。當採取例外時,可儲存描述處理器在採取例外時之狀態的特性的資訊,包括例如在採取例外時的目前例外等級,且因此一旦例外處理器已經處理以應付該例外時,處理可接著返回至先前處理且經儲存資訊可用以識別處理應返回的例外等級。When an exception occurs while processing software at a particular exception level, for some types of exceptions, the exception is taken to a higher (more privileged) exception level, where the particular exception level to which the exception is taken is selected based on the attributes of the particular exception that occurred. However, in some cases, it may be possible for other types of exceptions to be taken at the same exception level as the exception level associated with the code being processed when the exception was taken. When an exception is taken, information describing characteristics of the state of the processor at the time the exception was taken may be stored, including, for example, the current exception level at the time the exception was taken, and thus once the exception handler has processed to handle the exception, processing may then return to the previous processing and the stored information may be used to identify the exception level to which processing should return.
除了不同的例外等級外,處理電路系統亦支援包括根域82、安全(S)域84、較不安全域86、及領域域88的若干個操作域。為便於參考,較不安全域將於下文描述為「非安全」(NS)域,但應理解此未意圖暗示任何特定的安全(或缺乏安全)等級。替代地,「非安全(non-secure)」僅指示非安全域意圖用於比在安全域中操作之碼更不安全的碼。當處理電路系統10在最高例外等級EL3時,選擇根域82。當處理電路系統在其他例外等級EL0至EL2之一者中時,目前域係基於指示其他域84、86、88的何者係使用中的目前域指示符14選擇。對於其他域84、86、88之各者,處理電路系統可在例外等級EL0、EL1、或EL2的任一者中。In addition to the different exception levels, the processing circuit system also supports several operating domains including a root domain 82, a secure (S) domain 84, a less secure domain 86, and a domain domain 88. For ease of reference, the less secure domain will be described below as a "non-secure" (NS) domain, but it should be understood that this is not intended to imply any particular level of security (or lack of security). Instead, "non-secure" simply indicates that the non-secure domain is intended for code that is less secure than code operating in the secure domain. When the processing circuit system 10 is at the highest exception level EL3, the root domain 82 is selected. When the processing circuit system is in one of the other exception levels EL0 to EL2, the current domain is selected based on the current domain indicator 14 indicating which of the other domains 84, 86, 88 is in use. For each of the other domains 84, 86, 88, the processing circuitry may be in any of the exception levels EL0, EL1, or EL2.
在啟動時間,若干個啟動碼區段(例如,BL1、BL2、OEM啟動)可例如在更高特權例外等級EL3或EL2內執行。例如,啟動碼BL1、BL2可與根域關聯且OEM啟動碼可在安全域中操作。然而,一旦系統經啟動,在運行時間,可將處理電路系統10視為每次在域82、84、86、及88之一者中操作。域82至88之各者與其自身之經關聯實體位址空間(PAS)關聯,其使資料能在至少部分的記憶體系統內與不同域隔離。此將於下文更詳細地描述。At boot time, several boot code segments (e.g., BL1, BL2, OEM boot) may be executed, for example, within a higher privilege exception level EL3 or EL2. For example, boot code BL1, BL2 may be associated with a root domain and OEM boot code may operate in a secure domain. However, once the system is booted, at run time, processing circuit system 10 may be considered to operate in one of domains 82, 84, 86, and 88 at a time. Each of domains 82 to 88 is associated with its own associated physical address space (PAS), which enables data to be isolated from different domains within at least a portion of the memory system. This will be described in more detail below.
非安全域86可用於常規應用程式層級處理,及用於管理此類應用程式的作業系統及超管理器活動。因此,在非安全域86內,可存在在EL0操作的應用程式碼30、在EL1操作的作業系統(OS)碼32、及在EL2操作的超管理器碼34。The non-secure domain 86 may be used for conventional application level processing, and for managing operating system and hypervisor activities of such applications. Thus, within the non-secure domain 86, there may be application code 30 operating at EL0, operating system (OS) code 32 operating at EL1, and hypervisor code 34 operating at EL2.
安全域84使某些系統單晶片安全性、媒體、或系統服務能隔離至與用於非安全處理的實體位址空間分開的實體位址空間中。安全及非安全域就非安全域碼無法存取與安全域84關聯的資源而安全域可存取安全及非安全資源二者的意義上而言並不相等。支援安全域84及非安全域86之此類分割之系統的實例係基於由Arm ®Limited提供的TrustZone ®架構的系統。安全域可在EL0運行受信任應用程式36、在EL1運行受信任作業系統38、以及可選地在EL2運行安全分割管理器40,若支援安全分割,該安全分割管理器可使用2階頁表以與超管理器34可以其管理在非安全域86中執行之虛擬機器或客作業系統32之間的隔離的方式類似的方式支援在安全域84中執行的不同受信任作業系統38之間的隔離。 The secure domain 84 enables certain SoC security, media, or system services to be isolated into a physical address space separate from the physical address space used for non-secure processing. The secure and non-secure domains are not equal in the sense that non-secure domain code cannot access resources associated with the secure domain 84, while the secure domain can access both secure and non-secure resources. An example of a system that supports such a partitioning of the secure domain 84 and the non-secure domain 86 is a system based on the TrustZone® architecture provided by Arm® Limited. The secure domain can run trusted applications 36 at EL0, a trusted operating system 38 at EL1, and optionally a secure partitioning manager 40 at EL2. If secure partitioning is supported, the secure partitioning manager can use a two-level page table to support isolation between different trusted operating systems 38 running in the secure domain 84 in a manner similar to the way the hypervisor 34 can manage isolation between virtual machines or guest operating systems 32 running in the non-secure domain 86.
延伸系統以支援安全域84由於其使單一硬體處理器能支援經隔離安全處理,避免在單獨硬體處理器上執行該處理的需求而在近年變得普遍。然而,隨著安全域的使用日益普遍,具有此一安全域的許多實際系統現在在安全域內支援由範圍廣泛的不同軟體提供商提供的相對複雜的混合服務環境。例如,在安全域84中操作的碼可包括由(尤其)下列提供的不同軟體區段:製造積體電路的矽供應商、將由矽供應商提供的積體電路組裝成電子裝置(諸如行動電話)的原始設備製造商(original equipment manufacturer, OEM)、提供用於裝置之作業系統32的作業系統廠商(operating system vendor, OSV);及/或管理通過雲端支援用於若干個不同用戶端之服務的雲端伺服器的雲端平台供應商。Extending systems to support security domains 84 has become popular in recent years because it enables a single hardware processor to support isolated secure processing, avoiding the need to execute that processing on a separate hardware processor. However, as the use of security domains has become more common, many actual systems with such a security domain now support relatively complex mixed service environments within the security domain provided by a wide range of different software providers. For example, code operating in security domain 84 may include different software segments provided by (among others): a silicon supplier that manufactures integrated circuits, an original equipment manufacturer (OEM) that assembles the integrated circuits provided by the silicon supplier into an electronic device (such as a mobile phone), an operating system vendor (OSV) that provides an operating system 32 for the device; and/or a cloud platform provider that manages a cloud server that supports services for a number of different clients via the cloud.
然而,提供使用者層級碼(通常可預期其執行為在非安全域86內的應用程式30)的供應方對於具有可被信任不將資訊洩露給在相同實體平台上的其他方操作碼的安全計算環境的期望逐漸增加。此類安全計算環境在運行時間可動態地分配、及認證、及可證明,使得使用者在信任該裝置處理可能敏感的碼或資料之前能夠驗證是否在實體平台上提供足夠的安全保證可係所欲的。此類軟體的使用者可能不希望信任提供通常可能在非安全域86中操作之富作業系統32或超管理器34的供應方(或即使彼等供應商本身可被信任,使用者可能希望保護自身免於作業系統32或超管理器34為攻擊者所損害)。再者,雖然安全域84可用於需要安全處理的此類使用者提供應用程式,實際上,此對於提供需要安全計算環境之碼的使用者及對於在安全域84內操作之現有碼的供應商雙方導致問題。對於在安全域84內操作之現有碼的供應商,將任意使用者提供碼添加在安全域內會增加潛在攻擊其等碼的攻擊表面,其可係非所欲的,且因此可能強烈地勸阻允許使用者將碼添加至安全域84中。另一方面,提供需要安全計算環境之碼的使用者可能不願意信任在安全域84中操作的不同碼區段的所有供應商具有對其資料或碼的存取,若需要認證或證明在特定域中操作的碼以作為使用者提供碼執行其處理的先決條件,可能難以審核及認證由不同軟體供應商提供之在安全域84中操作的所有不同碼區段,其可能限制第三方提供更安全服務的機會。However, there is an increasing desire among vendors of user-level code (which is typically expected to be executed as an application 30 in a non-secure domain 86) to have a secure computing environment that can be trusted not to leak information to other parties' operating code on the same physical platform. Such secure computing environments can be dynamically allocated, authenticated, and certifiable at run time, so that users can verify that sufficient security assurances are desirable on the physical platform before trusting the device to process potentially sensitive code or data. Users of such software may not want to trust vendors that provide rich operating systems 32 or hypervisors 34 that may typically operate in non-secure domains 86 (or even if their vendors themselves can be trusted, users may want to protect themselves from having their operating systems 32 or hypervisors 34 compromised by attackers). Furthermore, while security domain 84 may be used for such user-provided applications that require secure processing, in practice this causes problems for both users who provide code that requires a secure computing environment and for vendors of existing code that operates within security domain 84. For vendors of existing code that operates within security domain 84, adding arbitrary user-provided code within the security domain increases the potential attack surface for attacking their code, which may be undesirable, and therefore there may be strong disincentives to allow users to add code into security domain 84. On the other hand, users who provide code that requires a secure computing environment may not be willing to trust all suppliers of different code segments operating in security domain 84 to have access to their data or code. If authentication or proof of code operating in a specific domain is required as a prerequisite for user-provided code to perform its processing, it may be difficult to review and authenticate all different code segments operating in security domain 84 provided by different software vendors, which may limit the opportunity for third parties to provide more secure services.
因此,如圖2所示,提供稱為領域域的額外域88,其可由此類使用者引入碼使用以提供正交於與在安全域24中操作之組件關聯的任何安全計算環境的安全計算環境。在領域域中,所執行的軟體可包括若干個領域,其中各領域可藉由在例外等級EL2操作的領域管理模組(realm management module, RMM) 46與其他領域隔離。RMM 46可控制執行領域域88的各別領域42、44之間的隔離,例如,藉由類似於超管理器34以其管理在非安全域86中操作的不同組件之間的隔離的方式將存取權限及位址映射定義在頁表結構中。在此實例中,領域包括在EL0執行的應用程式層級領域42,及橫跨例外等級EL0及EL1執行的經封裝應用程式/作業系統領域44。應理解支援EL0及EL0/EL1類型的領域係非必要的,且相同類型的多個領域可由RMM 46建立。2, an additional domain 88, referred to as a realm domain, is provided that may be used by such user-introduced code to provide a secure computing environment that is orthogonal to any secure computing environment associated with components operating in the secure domain 24. In the realm domain, the software executed may include a number of realms, each of which may be isolated from other realms by a realm management module (RMM) 46 operating at exception level EL2. The RMM 46 may control isolation between the respective realms 42, 44 executing the realm domain 88, for example, by defining access permissions and address mappings in a page table structure in a manner similar to how the hypervisor 34 manages isolation between different components operating in the non-secure domain 86. In this example, the domains include an application level domain 42 that executes at EL0, and a packaged application/operating system domain 44 that executes across exception levels EL0 and EL1. It should be understood that supporting both EL0 and EL0/EL1 type domains is not necessary, and multiple domains of the same type may be created by RMM 46.
領域域88具有類似於安全域84之分配給其之其自身的實體位址空間,但就領域域88及安全域84可各存取與非安全域86關聯的非安全PAS的同時,領域域88及安全域84無法存取彼此的實體位址空間的意義上而言,領域域正交於安全域84。此意謂著在領域域88及安全域84中執行的碼彼此不具有相依性。領域域中的碼僅需要信任硬體、RMM 46、及在根域82中操作之管理域之間的切換的碼,其意謂著證明及認證變得更可行。證明使給定軟體區段能請求安裝在裝置上的碼匹配某些預期性質的驗證。此可藉由檢查安裝在裝置上之程式碼的雜湊是否匹配由受信任方使用密碼協定簽署的預期值而實施。例如,RMM 46及監測碼29可藉由檢查此軟體的雜湊是否匹配由受信任方(諸如製造包含處理系統2之積體電路的矽供應商,或設計支援基於域之記憶體存取控制之處理器架構的架構供應商)簽署的預期值而證明。此可允許使用者提供碼42、44在執行任何安全或敏感功能之前驗證基於域之架構的完整性是否可信任。Domain domain 88 has its own physical address space allocated to it similar to security domain 84, but is orthogonal to security domain 84 in the sense that while domain domain 88 and security domain 84 can each access the non-secure PAS associated with non-secure domain 86, domain domain 88 and security domain 84 cannot access each other's physical address space. This means that the code executing in domain domain 88 and security domain 84 has no dependencies on each other. Code in the domain domain only needs to trust the hardware, RMM 46, and the code switching between management domains operating in root domain 82, which means that certification and authentication become more feasible. Certification enables a given piece of software to request verification that the code installed on a device matches certain expected properties. This can be implemented by checking whether the hash of the code installed on the device matches the expected value signed by a trusted party using a cryptographic protocol. For example, the RMM 46 and monitoring code 29 can be verified by checking whether the hash of this software matches the expected value signed by a trusted party (such as a silicon vendor that manufactures the integrated circuits that include the processing system 2, or an architecture vendor that designs the processor architecture that supports domain-based memory access control). This allows the user-provided code 42, 44 to verify that the integrity of the domain-based architecture can be trusted before performing any secure or sensitive functions.
因此,可看出與領域42、44關聯的碼(其將已於先前在非安全域86中執行,如藉由顯示在此等程序將已於先前於該處執行之非安全域中之間隙的虛線所示)現在可移動至其等由於其等的資料及碼不可由在非安全域86中操作的其他碼存取而可具有更強安全保證的領域域中。然而,導因於領域域88與安全域84正交且因此無法看見彼此的實體位址空間,此意謂著領域域中之碼的供應商不需要信任安全域中之碼的供應商,反之亦然。領域域中的碼可簡單地信任提供用於根域82之監測碼29及RMM 46的受信任韌體,該受信任韌體可由當碼在矽供應商或由處理器所支援之指令集架構的供應商的裝置上執行時可已經固有地必需受信任的該等供應商提供,使得使用者能夠具有安全計算環境而不需要與其他作業系統廠商、OEM、或雲端主機的進一步信任關係。Thus, it can be seen that code associated with domains 42, 44 (which would have previously been executed in non-secure domain 86, as indicated by the dashed lines showing gaps in the non-secure domain where such programs would have previously been executed) can now be moved into domains where they can have stronger security assurances because their data and code are not accessible by other code operating in non-secure domain 86. However, because domain 88 is orthogonal to secure domain 84 and therefore cannot see each other's physical address space, this means that suppliers of code in the domains do not need to trust suppliers of code in the secure domain, and vice versa. Code in the domain domain may simply trust trusted firmware that provides monitoring code 29 and RMM 46 for the root domain 82, which may be provided by vendors that may already be inherently trusted when the code is executed on devices from silicon vendors or vendors of instruction set architectures supported by the processor, enabling users to have a secure computing environment without the need for further trust relationships with other operating system vendors, OEMs, or cloud hosts.
此可對一系列應用程式及使用情形有用,包括例如行動電子錢包及支付應用程式、遊戲反作弊及盜版機制、作業系統平台安全增強、安全虛擬機器託管、機密計算、網路、或用於物聯網裝置的閘道器處理。將理解使用者可發現領域支援係有用的許多其他應用。This can be useful for a range of applications and use cases, including, for example, mobile e-wallets and payment applications, gaming anti-cheat and piracy mechanisms, OS platform security enhancements, secure virtual machine hosting, confidential computing, networking, or gateway processing for IoT devices. It will be appreciated that there are many other applications where users may find domain support useful.
為支援對領域提供的安全保證,處理系統可支援證明報告功能,其中在啟動時間或在運行時間,對韌體影像及組態進行測量,例如監測碼影像及組態或RMM碼影像及組態,且在運行時間,測量領域內容及組態,使得領域所有者可將有關證明報告回溯追蹤至已知實施方案及認證以作出是否在該系統上操作的信任決定。To support security assurance provided to a domain, the processing system may support attestation reporting capabilities, where firmware images and configurations are measured at boot time or at run time, such as monitoring code images and configurations or RMM code images and configurations, and at run time, domain content and configurations are measured so that the domain owner can trace the attestation reports back to known implementations and certifications to make a trust decision whether to operate on the system.
如圖2所示,提供管理域切換的單獨根域82,且該根域具有其自身的經隔離根實體位址空間。根域的建立及其資源與安全域的隔離,甚至對於僅具有非安全域86及安全域84但不具有領域域88的系統,允許更強固的實施方案,但亦可用於確實支援領域域88的實施方案。根域82可使用由矽供應商或架構設計者提供(或認證)的監測軟體29實施,且可用以提供安全啟動功能性、受信任啟動測量、系統單晶片組態、偵錯控制、及管理由其他方(諸如OEM)提供之韌體組件的韌體更新。根域碼可由矽供應商或架構設計者開發、認證、及部署而無須相依於最終裝置。相比之下,安全域84可由OEM管理以用於實施某些平台及安全服務。非安全域86的管理可由作業系統32控制以提供作業系統服務,而領域域88在與安全域84中的現有安全軟體環境互相隔離的同時,允許可專用於使用者或第三方應用程式的新形式的受信任執行環境的開發。As shown in Figure 2, a separate root domain 82 is provided to manage domain switching, and the root domain has its own isolated root physical address space. The establishment of the root domain and the isolation of its resources from the secure domain allows for a more robust implementation even for systems that only have a non-secure domain 86 and a secure domain 84 but no domain domain 88, but can also be used for implementations that do support the domain domain 88. The root domain 82 can be implemented using monitoring software 29 provided (or certified) by a silicon vendor or architecture designer, and can be used to provide secure boot functionality, trusted boot measurements, system on chip configuration, debugging control, and management of firmware updates for firmware components provided by other parties (such as OEMs). The root domain code can be developed, certified, and deployed by silicon vendors or architects without dependency on the end device. In contrast, the secure domain 84 can be managed by the OEM for implementation of certain platform and security services. The management of the non-secure domain 86 can be controlled by the operating system 32 to provide operating system services, while the domain domain 88 allows the development of new forms of trusted execution environments that can be dedicated to users or third-party applications while being isolated from the existing secure software environment in the secure domain 84.
圖3示意地繪示用於支援此等技術之處理系統2的另一實例。與圖1相同的元件使用相同的元件符號說明。圖3更詳細地顯示位址轉譯電路系統16,其包含1階記憶體管理單元50及2階記憶體管理單元52。1階MMU 50可負責將虛擬位址轉譯成實體位址(當轉譯由EL2或EL3碼觸發時)或中間位址(當轉譯在需要藉由2階MMU 52的另外的2階轉譯的操作狀態中由EL0或EL1碼觸發時)。2階MMU可將中間位址轉譯成實體位址。1階MMU可基於由作業系統控制之用於從EL0或EL1起始之轉譯的頁表、由超管理器控制之用於來自EL2之轉譯的頁表、或由監測碼29控制之用於來自EL3之轉譯的頁表。另一方面,2階MMU 52可基於取決於正在使用哪個域而由超管理器34、RMM 46、或安全分割管理器14定義的頁表結構。以此方式將轉譯分成二個階段允許作業系統在其等係唯一在系統上運行之作業系統的假設下管理其等自身及應用程式的位址轉譯,而RMM 46、超管理器34、或SPM 40可管理在相同域中運行的不同作業系統之間的隔離。FIG3 schematically illustrates another example of a processing system 2 for supporting these techniques. Components identical to those of FIG1 are illustrated using the same component numbers. FIG3 shows in greater detail the address translation circuitry 16, which includes a level 1 memory management unit 50 and a level 2 memory management unit 52. The level 1 MMU 50 may be responsible for translating a virtual address into a physical address (when the translation is triggered by an EL2 or EL3 code) or an intermediate address (when the translation is triggered by an EL0 or EL1 code in an operating state that requires an additional level 2 translation by the level 2 MMU 52). The level 2 MMU may translate an intermediate address into a physical address. The level 1 MMU may be based on page tables controlled by the operating system for translations originating from EL0 or EL1, by the hypervisor for translations from EL2, or by monitor code 29 for translations from EL3. Level 2 MMU 52, on the other hand, may be based on a page table structure defined by the hypervisor 34, RMM 46, or secure partition manager 14, depending on which domain is being used. Separating translations into two stages in this manner allows the operating system to manage address translations for itself and applications under the assumption that they are the only operating system running on the system, while RMM 46, hypervisor 34, or SPM 40 can manage isolation between different operating systems running in the same domain.
如圖3所示,使用位址轉譯電路系統16的位址轉譯程序可傳回安全屬性54,該等安全屬性與目前例外等級15及目前域14(或安全狀態)結合以回應於給定記憶體存取請求而允許選擇待存取的特定實體位址空間(藉由PAS識別符或「PAS TAG」識別)。實體位址及PAS識別符可在提供稍早描述的顆粒保護資訊的顆粒保護表56中查找。在此實例中,將PAS過濾器20顯示為顆粒記憶體保護單元(granular memory protection unit, GMPU),該顆粒記憶體保護單元驗證是否允許經選擇PAS存取所請求的實體位址,且若如此,允許交易傳遞至係記憶體系統之系統網狀架構的部分的任何快取記憶體24或互連8。3, the address translation process using the address translation circuitry 16 may return security attributes 54 which, in conjunction with the current exception level 15 and the current domain 14 (or security state), allow selection of a particular physical address space (identified by a PAS identifier or "PAS TAG") to be accessed in response to a given memory access request. The physical address and PAS identifier may be looked up in a granule protection table 56 which provides granule protection information as described earlier. In this example, the PAS filter 20 is shown as a granular memory protection unit (GMPU) that verifies whether access to the requested physical address is allowed through the selected PAS, and if so, allows the transaction to pass to any cache 24 or interconnect 8 that is part of the system mesh fabric of the memory system.
GMPU 20允許將記憶體指派給分開的位址空間而提供強的基於硬體的隔離保證且在實體記憶體至此等位址空間中的指派方法中提供空間及時間彈性,以及允許有效率的共用方案。如稍早描述的,將系統中的執行單元邏輯地分割成虛擬執行狀態(域或「世界(World)」),其中存在一個位於最高例外等級(EL3)之稱為「根世界(Root World)」之管理對此等世界之實體記憶體指派的執行狀態(根世界)。The GMPU 20 allows memory to be assigned to separate address spaces, providing strong hardware-based isolation guarantees and providing spatial and temporal flexibility in the method of assigning physical memory to these address spaces, as well as allowing efficient sharing schemes. As described earlier, the execution units in the system are logically divided into virtual execution states (domains or "worlds"), of which there is an execution state (root world) at the highest exception level (EL3) called the "root world" that manages the assignment of physical memory to these worlds.
將單一系統實體位址空間虛擬化成多個「邏輯」或「架構」實體位址空間(PAS),其中各此類PAS係具有獨立一致性屬性的正交位址空間。系統實體位址藉由使用PAS標籤延伸而映射至單一「邏輯」實體位址空間。Virtualizes a single system physical address space into multiple "logical" or "architectural" physical address spaces (PAS), where each such PAS is an orthogonal address space with independent consistency properties. System physical addresses are mapped to the single "logical" physical address space using PAS tag extensions.
允許給定世界存取邏輯實體位址空間的子集。此係藉由可附接至記憶體管理單元16之輸出的硬體過濾器20強制執行。A given world is allowed to access a subset of the logical physical address space. This is enforced by a hardware filter 20 which may be attached to the output of the memory management unit 16.
世界使用用於位址轉譯之頁表的轉譯表描述符中的欄位定義存取的安全屬性(PAS標籤)。硬體過濾器20具有對針對系統實體位址空間中的各頁定義指示與其關聯之PAS TAG及(可選地)其他顆粒保護屬性的顆粒保護資訊(GPI)的表(顆粒保護表56,或GPT)的存取。The world defines the security attributes of accesses (PAS tags) using fields in the translation table descriptors of the page tables used for address translation. Hardware filter 20 has access to a table (granule protection table 56, or GPT) that defines, for each page in the system's physical address space, granule protection information (GPI) indicating the PAS TAG associated therewith and (optionally) other granule protection attributes.
硬體過濾器20對照顆粒的GPI檢查世界ID及安全屬性並決定是否可授權存取,因此形成顆粒記憶體保護單元(GMPU)。The hardware filter 20 checks the world ID and security attributes against the GPI of the particle and determines whether access is authorized, thus forming a particle memory protection unit (GMPU).
例如,GPT 56可駐存在晶片上SRAM中或晶片外DRAM中。若儲存在晶片外,GPT 56可藉由可使用加密、完整性、及新鮮性機制以維持GPT 56之安全性的晶片上記憶體保護引擎受完整性保護。For example, GPT 56 may reside in on-chip SRAM or off-chip DRAM. If stored off-chip, GPT 56 may be integrity protected by an on-chip memory protection engine that may use encryption, integrity, and freshness mechanisms to maintain the security of GPT 56.
將GMPU 20定位在系統的請求者側上(例如,在MMU輸出上)而非在完成者側上允許以頁粒度分配存取權限,同時允許互連8繼續橫跨多個DRAM埠雜湊/條串化頁。Locating the GMPU 20 on the requester side of the system (e.g., on the MMU output) rather than on the completer side allows access permissions to be allocated at a page granularity while allowing the interconnect 8 to continue to hash/strip pages across multiple DRAM ports.
交易在其等在系統網狀架構24、8各處傳播時保持以PAS TAG標記直到到達定義為實體別名點60的位置為止。與從屬側過濾相比,此允許將過濾器定位在主站側上而無需減少安全保證。當交易在系統各處傳播時,可將PAS TAG使用為用於位址隔離的深度安全機制:例如,快取記憶體可將PAS TAG添加至快取記憶體中的位址標籤,防止使用錯誤的PAS TAG對相同PA的存取在快取記憶體中命中,且因此改善側通道抗性。PAS TAG亦可使用為用於保護引擎的上下文選擇器,該保護引擎附接至在將資料寫至外部DRAM之前加密其的記憶體控制器。Transactions remain tagged with PAS TAGs as they propagate throughout the system mesh fabric 24, 8 until they reach a location defined as a physical alias point 60. This allows filters to be located on the master side without sacrificing security compared to slave-side filtering. PAS TAGs can be used as a deep security mechanism for address isolation as transactions propagate throughout the system: for example, a cache can add PAS TAGs to address tags in the cache, preventing accesses to the same PA with the wrong PAS TAG from hitting in the cache, and thus improving side channel resistance. PAS TAGs can also be used as context selectors for a protection engine attached to a memory controller that encrypts data before writing it to external DRAM.
實體別名點(PoPA)係系統中之將PAS TAG剝除且將位址從邏輯實體位址改變回系統實體位址的位置。PoPA可位於在系統之(使用通過PAS TAG解析的加密上下文)進行對實體DRAM之存取的完成者側的快取記憶體之下。替代地,其可位於快取記憶體之上而以降低安全性的成本簡化系統實施方案。The physical point of alias (PoPA) is the location in the system where the PAS TAG is stripped and the address is changed from a logical physical address back to a system physical address. The PoPA can be located below the cache on the completer side of the system that accesses the physical DRAM (using the encryption context resolved through the PAS TAG). Alternatively, it can be located above the cache to simplify the system implementation at the cost of reduced security.
在任何時間點,世界可請求將頁從一個PAS轉變至另一者。進行對在EL3之檢測GPI之目前狀態的監測碼29的請求。EL3可僅允許特定組的轉變發生(例如,從非安全PAS至安全PAS,但不從領域PAS至安全PAS)。為提供乾淨轉變,由系統支援指令–「對實體別名點的資料清理及無效化」,EL3可在將頁轉變至新的PAS之前提交其–此保證與先前PAS關聯的任何殘餘狀態從PoPA 60上游(比該PoPA更接近請求者側)的任何快取記憶體清除。At any point in time, the world may request to transfer a page from one PAS to another. The request is made to monitor code 29 at EL3 which detects the current state of the GPI. EL3 may only allow certain sets of transfers to occur (e.g., from a non-secure PAS to a secure PAS, but not from a domain PAS to a secure PAS). To provide a clean transfer, a system supported command - "data cleanup and invalidation of entity alias points" - is submitted by EL3 before transferring the page to the new PAS - this ensures that any residual state associated with the previous PAS is cleared from any cache memory upstream of the PoPA 60 (closer to the requester side than that PoPA).
可藉由將GMPU 20附接至主站側而實現的另一性質係世界之間的記憶體的有效率共用。將對實體顆粒的共用存取授權N個世界的子集而防止其他世界存取其可係所欲的。此可藉由添加「限制性共用」語意至顆粒保護資訊,同時強制其使用特定的PAS TAG而實現。作為一實例,GPI在以安全PAS 84的PAS TAG標記的同時可指示實體顆粒可僅由「領域世界」88及「安全世界」84存取。Another property that can be achieved by attaching the GMPU 20 to the master side is efficient sharing of memory between worlds. It may be desirable to authorize shared access to a physical particle to a subset of N worlds while preventing other worlds from accessing it. This can be achieved by adding "restricted sharing" semantics to the particle protection information while forcing it to use a specific PAS TAG. As an example, a GPI while being tagged with a PAS TAG of secure PAS 84 can indicate that a physical particle can only be accessed by "domain world" 88 and "secure world" 84.
上述性質的實例使特定實體顆粒的可見性性質快速改變。考慮各世界經指派有僅可由該世界存取之私密PAS的情形。對於特定顆粒,世界可藉由將其等的GPI從「獨佔」改變成「與非安全世界的限制性共用」而在任何時間點請求使其等可為非安全世界可見,而無需改變PAS關聯性。如此,可增加該顆粒的可見性而不需要昂貴的快取維護或資料複製操作。Examples of the above properties allow the visibility properties of a particular physical particle to be changed quickly. Consider a situation where each world is assigned a private PAS that is only accessible to that world. For a particular particle, a world can request to make it visible to the non-secure world at any point in time by changing its GPI from "exclusive" to "restricted sharing with non-secure world" without changing the PAS association. In this way, the visibility of the particle can be increased without the need for expensive cache maintenance or data replication operations.
GMPU (20)包括PAS檢查電路系統,且亦可包括裝置權限檢查電路系統。The GMPU (20) includes a PAS check circuit system and may also include a device authority check circuit system.
圖4繪示在將各別實體位址空間別名至以硬體提供之實體記憶體上的概念。如稍早所述,域82、84、86、88之各者具有其自身的各別實體位址空間61。Figure 4 illustrates the concept of aliasing individual physical address spaces to physical memory provided in hardware. As described earlier, each of the domains 82, 84, 86, 88 has its own individual physical address space 61.
在實體位址由位址轉譯電路系統16產生時,該實體位址具有在由系統所支援的某個數值範圍62內的值,不論選擇哪個實體位址空間,其皆相同。然而,除了產生實體位址外,位址轉譯電路系統16亦可基於目前域14及/或用以推導實體位址之頁表項中的資訊選擇特定實體位址空間(PAS)。替代地,位址轉譯電路系統(例如,MMU)可輸出實體位址及從用於PAS之選擇的頁表項(page table entry, PTE)推導的資訊,且接著此資訊可由PAS過濾器或GMPU 20使用以選擇PAS,而非位址轉譯電路系統16執行PAS的選擇。When a physical address is generated by the address translation circuitry 16, the physical address has a value within a certain range of values 62 supported by the system, which is the same regardless of which physical address space is selected. However, in addition to generating a physical address, the address translation circuitry 16 may also select a particular physical address space (PAS) based on information in the current domain 14 and/or the page table entry used to derive the physical address. Alternatively, the address translation circuitry (e.g., an MMU) may output the physical address and information derived from the page table entry (PTE) used for PAS selection, and this information may then be used by the PAS filter or GMPU 20 to select a PAS, rather than the address translation circuitry 16 performing the PAS selection.
用於給定記憶體存取請求之PAS的選擇可取決於處理電路系統10在發布記憶體存取請求時正於其中操作的目前域而根據定義於下表中的規則受限制:
對於存在可用於選擇的多個實體位址空間的彼等域,使用來自用以提供實體位址之經存取頁表項的資訊以在可用PAS選項之間選擇。For those domains where there are multiple physical address spaces available for selection, information from the accessed page table entry used to provide the physical address is used to select between the available PAS options.
因此,在PAS過濾器20將記憶體存取請求(假設其通過任何過濾檢查)輸出至系統網狀架構24、8時,記憶體存取請求與實體位址(PA)及經選擇實體位址空間(PAS)關聯。Therefore, when the PAS filter 20 outputs a memory access request (assuming it passes any filtering checks) to the system mesh fabric 24, 8, the memory access request is associated with a physical address (PA) and a selected physical address space (PAS).
從在實體別名點(PoPA) 60之前操作的記憶體系統組件(諸如快取記憶體、互連、監聽過濾器等)的觀點,將各別實體位址空間61視為係對應於記憶體內的不同系統位置的完全分開的位址範圍。此意謂著,從前PoPA記憶體系統組件的觀點,由於有效地將PAS識別符視為在實體位址本身旁邊的額外位址位元,使得取決於哪個PAS經選擇,可將相同的實體位址PAx映射至相異實體位址空間61中的若干個別名實體位址63,由記憶體存取請求識別的位址範圍實際上係可在位址轉譯中輸出之範圍62的大小的四倍。此等別名實體位址63實際上全部對應於以實體硬體實施的相同記憶體系統位置,但前PoPA記憶體系統組件將別名位址63視為分開的位址。因此,若存在針對此類位址分配項的任何前PoPA快取記憶體或監聽過濾器,別名位址63將隨著各別的快取命中/未命中決定及各別的一致性管理而映射至不同項中。此降低攻擊者將快取記憶體或一致性側通道使用為探測其他域之操作的機制的可能性或有效性。From the perspective of memory system components (such as caches, interconnects, snoop filters, etc.) operating before a physical point of alias (PoPA) 60, the individual physical address spaces 61 are viewed as being completely separate address ranges corresponding to different system locations within memory. This means that from the perspective of the pre-PoPA memory system components, the range of addresses identified by a memory access request is actually four times the size of the range 62 that can be output in an address translation, since the PAS identifier is effectively viewed as an additional address bit next to the physical address itself, such that the same physical address PAx can be mapped to a number of individual alias physical addresses 63 in different physical address spaces 61, depending on which PAS is selected. These alias physical addresses 63 actually all correspond to the same memory system location implemented in physical hardware, but the pre-PoPA memory system components treat the alias addresses 63 as separate addresses. Therefore, if there are any pre-PoPA caches or snoop filters that allocate entries for such addresses, the alias addresses 63 will be mapped to different entries with separate cache hit/miss decisions and separate coherency management. This reduces the likelihood or effectiveness of an attacker using cache or coherency side channels as a mechanism to probe the operations of other domains.
系統可包括多於一個PoPA 60。在各PoPA 60處,將別名實體位址摺疊成系統實體位址空間64中的單一經去別名位址65。將經去別名位址65提供至下游的任何後PoPA組件,使得實際上識別記憶體系統位置的系統實體位址空間64再次與可在請求者側上執行的位址轉譯中輸出的實體位址的範圍的大小相同。例如,在PoPA 60處可將PAS識別符從位址剝除,且對於下游組件,位址可簡單地使用實體位址值識別而無需指定PAS。替代地,對於期望某種完成者側記憶體存取請求過濾的一些情形,PAS識別符可仍在PoPA 60的下游提供,但可不被解譯為位址的部分,使得出現在不同實體位址空間60中的相同實體位址將在PoPA的下游解譯為參考至相同的記憶體系統位置,但所供應的PAS識別符仍可用於執行任何完成者側安全檢查。The system may include more than one PoPA 60. At each PoPA 60, the aliased physical addresses are collapsed into a single de-aliased address 65 in the system physical address space 64. The de-aliased address 65 is provided to any post-PoPA components downstream so that the system physical address space 64 that actually identifies the memory system location is again the same size as the range of physical addresses that can be output in the address translation performed on the requester side. For example, the PAS identifier can be stripped from the address at the PoPA 60, and for downstream components, the address can simply be identified using the physical address value without specifying the PAS. Alternatively, for some situations where some completer-side memory access request filtering is desired, the PAS identifier may still be provided downstream of the PoPA 60, but may not be interpreted as part of an address, such that the same physical address appearing in different physical address spaces 60 will be interpreted downstream of the PoPA as referring to the same memory system location, but the supplied PAS identifier may still be used to perform any completer-side security checks.
圖5繪示可如何使用顆粒保護表56將系統實體位址空間64劃分成經分配以用於在特定架構實體位址空間61內存取的塊。顆粒保護表(GPT) 56定義允許系統實體位址空間65的哪些部分從各架構實體位址空間61存取。例如,GPT 56可包含各對應於特定大小之實體位址的一顆粒(例如,4K頁)的若干個項且可定義用於該顆粒的經指派PAS,該顆粒可從非安全、安全、領域、及根域中選擇。藉由設計,若將特定顆粒或顆粒組指派給與域之一者關聯的PAS,則其僅可在與該域關聯的PAS內存取且無法在其他域的PAS內存取。然而,應注意雖然分配給安全PAS(例如)的顆粒無法從根PAS內存取,然而根域82能夠藉由在其頁表中指定用於確保將與映射至實體經定址記憶體之該區域的頁關聯的虛擬位址轉譯成在安全PAS中而非根PAS中的實體位址的PAS選擇資訊而存取實體位址的該顆粒。因此,橫跨域的資料共用(在由定義在稍早描述之表中的可存取性/不可存取性規則所允許的情況下)可在選擇用於給定記憶體存取請求的PAS時受控制。FIG5 illustrates how a granule protection table 56 may be used to divide the system physical address space 64 into blocks allocated for access within a particular architectural physical address space 61. A granule protection table (GPT) 56 defines which portions of the system physical address space 65 are allowed to be accessed from each architectural physical address space 61. For example, the GPT 56 may include a number of entries, each corresponding to a granule of physical addresses of a particular size (e.g., a 4K page) and may define an assigned PAS for the granule, which may be selected from a non-secure, secure, domain, and root domain. By design, if a particular granule or group of granules is assigned to a PAS associated with one of the domains, it may only be accessed within the PAS associated with that domain and cannot be accessed within the PASs of other domains. However, it should be noted that although a granule assigned to a secure PAS (for example) cannot be accessed from within the root PAS, the root domain 82 is able to access the granule of the physical address by specifying in its page table PAS selection information for ensuring that the virtual address associated with the page mapped to the region of physically addressed memory is translated into a physical address in the secure PAS rather than in the root PAS. Thus, data sharing across domains (where permitted by the accessibility/inaccessibility rules defined in the table described earlier) can be controlled when selecting the PAS for a given memory access request.
然而,在一些實施方案中,除了允許實體位址的顆粒在由GPT定義的經指派PAS內存取外,GPT可使用其他GPT屬性以將位址空間的某些區域標示成與另一位址空間(例如,與通常將不允許其針對該域之存取請求選擇經指派PAS的較低特權或正交特權的域關聯的位址空間)共用。此可促進資料的暫時共用而不需要改變用於給定顆粒的經指派PAS。例如,在圖5中,領域PAS的區域70在GPT中定義為指派給領域域,由於非安全域86無法針對其存取請求選擇該領域PAS,所以通常其不可從非安全域86存取。由於非安全域26無法存取領域PAS,則非安全碼通常不能看到區域70中的資料。然而,若領域暫時希望與非安全域共用在其經指派記憶體區域中之其資料的一些,則其可請求在根域82中操作的監測碼29更新GPT 56以指示區域70將與非安全域86共用,且如圖5左側所示,此可使區域70亦可從非安全PAS存取,而不需要改變哪個域係用於區域70的經指派域。若領域域已將其位址空間的區域指定為與非安全域共用,則儘管從非安全域發布之標定該區域的記憶體存取請求最初可指定該非安全PAS,PAS過濾器20可重映射該請求的PAS識別符以替代地指定領域PAS,使得下游記憶體系統組件將該請求視為彷彿其始終從領域域發布。由於將不同域指派至特定記憶體區域的操作涉及較大程度的快取記憶體/TLB無效化及/或記憶體中的資料歸零或資料在記憶體區域之間的複製而可係更效能密集的,若預期共用僅係暫時的,該等操作可係不必要的,此共用可改善效能。However, in some implementations, in addition to allowing physically addressed particles to be accessed within the assigned PAS defined by the GPT, the GPT may use other GPT attributes to mark certain areas of the address space as being shared with another address space (e.g., an address space associated with a domain of lower privilege or orthogonal privilege that would not normally be allowed to select the assigned PAS for access requests to that domain). This can facilitate temporary sharing of data without requiring changes to the assigned PAS for a given particle. For example, in FIG. 5 , area 70 of the domain PAS is defined in the GPT as being assigned to the domain domain, and is generally not accessible from the non-secure domain 86 because the non-secure domain 86 cannot select the domain PAS for its access requests. Since the non-secure domain 26 cannot access the domain PAS, the non-secure code generally cannot see the data in area 70. However, if the domain temporarily wishes to share some of its data in its assigned memory region with the non-secure domain, it may request the monitor code 29 operating in the root domain 82 to update the GPT 56 to indicate that region 70 is to be shared with the non-secure domain 86, and as shown on the left side of Figure 5, this may make region 70 also accessible from the non-secure PAS without changing which domain is the assigned domain for region 70. If the domain domain has designated a region of its address space as being shared with the non-secure domain, then although a memory access request issued from the non-secure domain targeting that region may initially specify the non-secure PAS, the PAS filter 20 may remap the PAS identifier of the request to instead specify the domain PAS so that downstream memory system components treat the request as if it had always been issued from the domain domain. Since the operation of assigning different domains to a particular memory region may be more performance intensive involving greater cache/TLB invalidation and/or zeroing of data in memory or copying of data between memory regions, such operations may be unnecessary if the intended sharing is only temporary, and such sharing may improve performance.
圖6係顯示如何判定目前操作域的流程圖,其可由處理電路系統10或由位址轉譯電路系統16或PAS過濾器20執行。在步驟100,判定目前例外等級15是否係EL3,且若如此,則在步驟102,目前域經判定為係根域82。若目前例外等級係非EL3,則在步驟104,如藉由處理器之EL3控制暫存器內的至少二個域指示位元14指示的,將目前域判定為係非安全域86、安全域84、及領域域88之一者(由於根域藉由係EL3的目前例外等級指示,域指示位元14可能不必具有對應於根域的編碼,所以域指示位元的至少一個編碼可保留以用於其他目的)。EL3控制暫存器當在EL3操作時可寫入且無法從其他例外等級EL2至EL0寫入。6 is a flow chart showing how to determine the current operating domain, which may be performed by the processing circuitry 10 or by the address translation circuitry 16 or PAS filter 20. At step 100, it is determined whether the current exception level 15 is EL3, and if so, then at step 102, the current domain is determined to be the root domain 82. If the current exception level is not EL3, then at step 104, the current domain is determined to be one of the non-secure domain 86, the secure domain 84, and the domain domain 88 as indicated by at least two domain indication bits 14 in the EL3 control register of the processor (since the root domain is indicated by the current exception level being EL3, the domain indication bits 14 may not necessarily have a coding corresponding to the root domain, so at least one coding of the domain indication bits may be reserved for other purposes). The EL3 control registers are writable when operating at EL3 and cannot be written from other exception levels EL2 to EL0.
圖7顯示頁表項(PTE)格式的實例,其可用於由位址轉譯電路系統16使用以用於將虛擬位址映射至實體位址、將虛擬位址映射至中間位址、或將中間位址映射至實體位址之頁表結構中的頁表項(取決於轉譯是否正在完全需要2階轉譯的操作狀態中執行,且若需要2階轉譯,取決於轉譯係1階轉譯或2階轉譯)。一般而言,可將給定頁表結構定義為實施為頁表樹的多層表結構,其中第一層頁表基於儲存在處理器之轉譯表基底位址暫存器中的基底位址識別,且選擇頁表內的特定1階表項的索引係從正針對其執行轉譯查找之輸入位址的位元子集推導(輸入位址可係用於2階轉譯之中間位址的1階轉譯的虛擬位址)。1階頁表項可係提供至次一層頁表之指標器112的「表描述符」110,另外的頁表項接著可基於輸入位址的另外的位元子集自其選擇。最後,在對連續層頁表的一或多個查找之後,可識別提供對應於輸入位址之輸出位址120的區塊或頁描述符PTE 114、116、118。輸出位址可係中間位址(用於在亦執行進一步2階轉譯的操作狀態中執行的1階轉譯)或實體位址(用於2階轉譯,或當不需要2階轉譯時,用於1階轉譯)。FIG. 7 shows an example of a page table entry (PTE) format that may be used by the address translation circuitry 16 for a page table entry in a page table structure for mapping a virtual address to a physical address, mapping a virtual address to an intermediate address, or mapping an intermediate address to a physical address (depending on whether the translation is being performed in an operating state that fully requires a 2nd-level translation, and if a 2nd-level translation is required, depending on whether the translation is a 1st-level translation or a 2nd-level translation). In general, a given page table structure may be defined as a multi-level table structure implemented as a tree of page tables, where a first level page table is identified based on a base address stored in a processor's translation table base address register, and the index that selects a particular level 1 table entry within the page table is derived from a bit subset of the input address for which the translation lookup is being performed (the input address may be a virtual address of a level 1 translation of an intermediate address for a level 2 translation). The level 1 page table entry may be a "table descriptor" 110 that provides a pointer 112 to a next level page table, from which additional page table entries may then be selected based on additional bit subsets of the input address. Finally, after one or more lookups of consecutive levels of page tables, a block or page descriptor PTE 114, 116, 118 may be identified that provides an output address 120 corresponding to the input address. The output address may be an intermediate address (for level 1 translation performed in an operating state that also performs further level 2 translation) or a physical address (for level 2 translation, or for level 1 translation when level 2 translation is not required).
為支援上文描述的相異實體位址空間,除了次一層頁表指標器112或輸出位址120及用於控制對對應記憶體區塊之存取的任何屬性122外,頁表項格式亦可指定某個額外狀態以用於在實體位址空間選擇時使用。To support the different physical address spaces described above, in addition to the next level page table pointer 112 or output address 120 and any attributes 122 used to control access to the corresponding memory block, the page table entry format may also specify some additional state for use in physical address space selection.
對於表描述符110,由非安全域86以外的任何域使用的PTE包括指示次一層頁表將從非安全實體位址空間或從目前域的實體位址空間存取的非安全表指示符124。此幫助促進更有效率的頁表管理。通常由根域、領域域、或安全域24使用的頁表結構可僅需要定義用於虛擬位址空間的一部分的特殊頁表項,且當由非安全域26使用時相同的頁表項可用於其他部分,所以藉由提供非安全表指示符124,此可允許更高階的頁表結構提供專用領域/安全表描述符,同時在頁表樹的特定點處,根域、領域域、或安全域可切換以將來自非安全域的頁表項用於位址空間之不需要較高安全性的彼等部分。在頁表樹的其他部分中的其他頁表描述符仍可從與根域、領域域、或安全域關聯的有關實體位址空間提取。For table descriptors 110, PTEs used by any domain other than non-secure domain 86 include a non-secure table indicator 124 indicating that the next level page table will be accessed from the non-secure physical address space or from the physical address space of the current domain. This helps promote more efficient page table management. Typically, a page table structure used by a root domain, a domain domain, or a secure domain 24 may only need to define special page table entries for a portion of the virtual address space, and the same page table entries can be used for other portions when used by a non-secure domain 26, so by providing a non-secure table indicator 124, this allows higher-level page table structures to provide dedicated domain/security table descriptors, while at specific points in the page table tree, the root domain, the domain domain, or the secure domain can switch to use page table entries from the non-secure domain for those portions of the address space that do not require higher security. Other page table descriptors in other parts of the page table tree may still be fetched from the relevant physical address space associated with the root domain, domain domain, or security domain.
另一方面,取決區塊/頁描述符114、116、118與哪個域關聯,其等可包括實體位址空間選擇資訊126。由於非安全域僅能夠存取非安全PAS,使用在非安全域86中的非安全區塊/頁描述符118不包括任何PAS選擇資訊。然而,對於其他域,區塊/頁描述符114、116包括用以選擇將輸入位址轉譯至哪個PAS中的PAS選擇資訊126。對於根域22,EL3頁表項可具有包括至少2個位元以將與4個域82、84、86、88的任一者關聯的PAS指示為對應實體位址將轉譯至其中之經選擇PAS的PAS選擇資訊126。相比之下,對於領域域及安全域,對應的區塊/頁描述符116僅需要包括PAS選擇資訊126的一個位元,該位元用於該領域域時,在領域PAS與非安全PAS之間選擇,且用於安全域時,在安全PAS與非安全PAS之間選擇。為改善電路實施方案的效率並避免增加頁表項的大小,對於領域域及安全域,無論目前域係領域域或安全域,區塊/頁描述符116可將PAS選擇資訊126編碼在PTE內的相同位置,使得PAS選擇位元126可共用。On the other hand, depending on which domain the block/page descriptor 114, 116, 118 is associated with, it may include physical address space selection information 126. Since the non-secure domain can only access the non-secure PAS, the non-secure block/page descriptor 118 used in the non-secure domain 86 does not include any PAS selection information. However, for other domains, the block/page descriptor 114, 116 includes PAS selection information 126 for selecting which PAS the input address is translated into. For the root domain 22, the EL3 page table entry may have PAS selection information 126 including at least 2 bits to indicate the PAS associated with any of the 4 domains 82, 84, 86, 88 as the selected PAS to which the corresponding physical address is translated. In contrast, for the domain domain and the security domain, the corresponding block/page descriptor 116 only needs to include one bit of PAS selection information 126, which is used to select between the domain PAS and the non-secure PAS when used for the domain domain, and to select between the secure PAS and the non-secure PAS when used for the security domain. To improve the efficiency of the circuit implementation and avoid increasing the size of the page table entry, for the domain domain and the security domain, the block/page descriptor 116 can encode the PAS selection information 126 at the same position within the PTE, regardless of whether the current domain is the domain domain or the security domain, so that the PAS selection bit 126 can be shared.
因此,圖8係顯示基於目前域及來自在產生給定記憶體存取請求之實體位址時所使用的區塊/頁PTE的資訊124、126選擇PAS的方法的流程圖。PAS選擇可由位址轉譯電路系統16執行,或若位址轉譯電路系統將PAS選擇資訊126轉發至PAS過濾器20,由位址轉譯電路系統16及PAS過濾器20的組合執行。8 is a flow chart showing a method of selecting a PAS based on the current domain and information 124, 126 from the block/page PTE used when generating the physical address of a given memory access request. The PAS selection may be performed by the address translation circuitry 16, or if the address translation circuitry forwards the PAS selection information 126 to the PAS filter 20, by a combination of the address translation circuitry 16 and the PAS filter 20.
在圖8中的步驟130,處理電路系統10發布將給定虛擬位址(VA)指定為目標VA的記憶體存取請求。在步驟132,位址轉譯電路系統16在其TLB 18中查找任何頁表項(或從此類頁表項推導的經快取資訊)。若任何所需頁表資訊皆不可用,位址轉譯電路系統16對記憶體起始頁表走訪以提取所需的PTE(可能需要一系列記憶體存取以逐步通過頁表結構的各別層及/或位址轉譯的多個階段以用於獲得從VA至中間位址(IPA)且接著從IPA至PA的映射)。應注意到在頁表走訪操作中由位址轉譯電路系統16發布的任何記憶體存取請求本身可受位址轉譯及PAS過濾,所以在步驟130接收的請求可係經發布以向記憶體請求頁表項的記憶體存取請求。一旦相關頁表資訊已識別,將虛擬位址轉譯成實體位址(可能經由IPA以二個階段)。在步驟134,位址轉譯電路系統16或PAS過濾器20使用顯示於圖6中的方法判定哪個域係目前域。At step 130 in FIG. 8 , processing circuitry 10 issues a memory access request specifying a given virtual address (VA) as the target VA. At step 132 , address translation circuitry 16 looks up any page table entries (or cached information derived from such page table entries) in its TLB 18 . If any required page table information is not available, address translation circuitry 16 accesses the memory origin page table to retrieve the required PTE (a series of memory accesses may be required to step through the various layers of the page table structure and/or multiple stages of address translation to obtain a mapping from VA to an intermediate address (IPA) and then from IPA to PA). It should be noted that any memory access request issued by the address translation circuit system 16 during a page table walk operation may itself be subject to address translation and PAS filtering, so the request received in step 130 may be a memory access request issued to request a page table entry from memory. Once the relevant page table information has been identified, the virtual address is translated into a physical address (possibly via IPA in two stages). In step 134, the address translation circuit system 16 or PAS filter 20 determines which domain is the current domain using the method shown in Figure 6.
若目前域係非安全域,則在步驟136,針對此記憶體存取請求選擇的輸出PAS係非安全PAS。If the current domain is a non-secure domain, then in step 136, the output PAS selected for this memory access request is a non-secure PAS.
若目前域係安全域,則在步驟138,輸出PAS係基於包括在提供實體位址之區塊/頁描述符PTE中的PAS選擇資訊126選擇,其中將該輸出PAS選擇為安全PAS或非安全PAS之任一者。If the current domain is a secure domain, then in step 138, the output PAS is selected based on the PAS selection information 126 included in the block/page descriptor PTE providing the physical address, wherein the output PAS is selected as either a secure PAS or a non-secure PAS.
若目前域係領域域,則在步驟140,輸出PAS係基於包括在實體位址係自其推導之區塊/頁描述符PTE中的PAS選擇資訊126選擇,且在此情形中,將該輸出PAS選擇為領域PAS或非安全PAS之任一者。If the current domain is the domain domain, then in step 140, the output PAS is selected based on the PAS selection information 126 included in the block/page descriptor PTE from which the physical address is derived, and in this case, the output PAS is selected as either the domain PAS or the non-secure PAS.
若在步驟134,目前域經判定係根域,則在步驟142,輸出PAS係基於實體位址係自其推導之根區塊/頁描述符PTE 114中的PAS選擇資訊126選擇。在此情形中,將輸出PAS選擇成與根域、領域域、安全域、及非安全域關聯的實體位址空間的任一者。 藉由硬體裝置控制對實體位址空間的存取 If, at step 134, the current domain is determined to be the root domain, then at step 142, the output PAS is selected based on the PAS selection information 126 in the root block/page descriptor PTE 114 from which the physical address is derived. In this case, the output PAS is selected to be any one of the physical address spaces associated with the root domain, the domain domain, the secure domain, and the non-secure domain. Controlling access to the physical address space by a hardware device
圖9顯示存取控制電路系統23的實例。存取控制電路系統23包含PAS檢查電路系統20(例如,上文討論的PAS過濾器)及裝置權限檢查電路系統92。裝置權限檢查電路系統92未明確地顯示於圖1中,但可提供在顯示於圖1中的PAS過濾器20旁邊(例如,其可在沿著藉由在位址轉譯電路系統與互連之間的記憶體存取請求所採取的路徑的邏輯位置)。替代地,裝置權限檢查電路系統可提供在不同位置。PAS檢查電路系統20負責基於針對給定實體位址定義的顆粒保護資訊(GPI)控制對給定記憶體位置的存取。用於給定實體位址的GPI指示允許哪些PAS存取給定實體位址(例如,如圖5所示)。如上文討論的,此允許保護儲存在記憶體的某些區域中的資料免於由在某些其他域中執行的軟體存取–例如,在「非安全」域中執行的軟體通常不能存取儲存在記憶體之指定為「安全」、「領域」、或「根」的區域中的資料。FIG9 shows an example of an access control circuit system 23. The access control circuit system 23 includes the PAS check circuit system 20 (e.g., the PAS filter discussed above) and the device permission check circuit system 92. The device permission check circuit system 92 is not explicitly shown in FIG1, but may be provided next to the PAS filter 20 shown in FIG1 (e.g., it may be at a logical location along the path taken by the memory access request between the address translation circuit system and the interconnect). Alternatively, the device permission check circuit system may be provided at a different location. The PAS check circuit system 20 is responsible for controlling access to a given memory location based on the granular protection information (GPI) defined for the given physical address. The GPI for a given physical address indicates which PASs are allowed to access the given physical address (e.g., as shown in FIG. 5 ). As discussed above, this allows data stored in certain areas of memory to be protected from access by software executing in certain other domains—for example, software executing in a “non-secure” domain generally cannot access data stored in areas of memory designated as “secure,” “domain,” or “root.”
然而,除了將區域與軟體程序隔離外,亦提供用於將記憶體的區域與特定硬體元件(例如,請求者裝置)隔離的機制可係有用的。例如,無論PE於其中執行的目前域為何,可存在能夠將某種資料或碼與特定處理元件(PE)隔離可係有用的情況。類似地,可能希望使記憶體的某個區域僅為特定請求者裝置可見而無須其可由任何其他裝置存取。例如,此可允許將資料處理系統中的多個請求者裝置(例如,系統單晶片(SoC))有效地分割至上述PAS之子集中。此可能有用的實例係提供專用安全處理單元以執行高安全性處理(例如,此可係在管理生物測量或面部辨識特徵時所涉及的處理)–允許此類程序與其他處理元件隔離可係尤其有用的,因為其限制需要信任的其他程序/裝置的數目。However, in addition to isolating regions from software programs, it may be useful to also provide a mechanism for isolating regions of memory from specific hardware elements (e.g., requestor devices). For example, there may be situations where it may be useful to be able to isolate certain data or code from a specific processing element (PE), regardless of the current domain in which the PE is executing. Similarly, it may be desirable to make a certain region of memory visible only to a specific requestor device without requiring it to be accessible to any other device. For example, this may allow multiple requestor devices (e.g., a system-on-chip (SoC)) in a data processing system to be effectively partitioned into subsets of the PAS described above. An example where this might be useful is to provide a dedicated secure processing unit to perform high security processing (for example, this might be the processing involved in managing biometric or facial recognition features) – allowing such processes to be isolated from other processing elements can be particularly useful as it limits the number of other processes/devices that need to be trusted.
可假設此類高安全性程序可藉由在安全域或領域域內執行其等並將與該等程序關聯的任何資料或碼儲存在對應的安全或領域PAS中而受保護。然而,雖然此將藉由將高安全性程序與其他PAS關聯的程序隔離而提供某種保護,在相同PAS中操作的其他程序仍可能能夠存取碼。因此,提供額外的隔離層級可提供更大程度的安全性,其可在某些情形中獲得保證。It may be assumed that such high security programs may be protected by executing them within a secure or domain domain and storing any data or code associated with such programs in the corresponding secure or domain PAS. However, while this will provide some protection by isolating the high security programs from programs associated with other PASs, other programs operating in the same PAS may still be able to access the code. Therefore, providing an additional level of isolation may provide a greater degree of security, which may be warranted in certain circumstances.
亦可能考慮在根域內執行此類高安全性程序。然而,將允許在根域內操作的程序的數目最小化係較佳的,以保留根域用於在管理其他操作域之間的切換時所涉及的彼等程序。It may also be considered to run such high-security programs in the root domain. However, it is better to minimize the number of programs allowed to operate in the root domain, reserving the root domain for those programs involved in managing handoffs between other operating domains.
因此,本技術使用裝置權限檢查電路系統92隔離此等高安全性程序。裝置權限檢查電路系統92檢查是否允許發布存取請求的請求者裝置存取經選擇PAS(由PAS選擇電路系統選擇的PAS)。請求者裝置的身分可基於隨請求提供的裝置識別符判定(例如,此可係若請求者係外部裝置的情形–作為SMMU的部分(於下文討論)或作為互連8的部分)。替代地,裝置識別符可基於暫存器或其他儲存結構的內容(例如,若裝置權限檢查電路系統92在多個PE之間共用–例如,其可在互連8上)判定,或可係隱含的(例如,若裝置權限檢查電路系統92提供在請求者裝置本身中–例如,如圖1所示)。若裝置權限檢查電路系統判定不允許來自經識別裝置的請求存取經選擇PAS,則其拒絕該請求。Therefore, the present technology isolates these high security processes using device permission checking circuitry 92. Device permission checking circuitry 92 checks whether the requestor device issuing the access request is allowed to access the selected PAS (the PAS selected by the PAS selection circuitry). The identity of the requestor device can be determined based on the device identifier provided with the request (for example, this may be the case if the requestor is an external device - as part of the SMMU (discussed below) or as part of the interconnect 8). Alternatively, the device identifier may be determined based on the contents of a register or other storage structure (e.g., if device permission checking circuitry 92 is shared among multiple PEs - e.g., it may be on interconnect 8), or may be implicit (e.g., if device permission checking circuitry 92 is provided in the requestor device itself - e.g., as shown in FIG. 1). If the device permission checking circuitry determines that the request from the identified device is not allowed to access the selected PAS, it denies the request.
應注意到雖然一些圖式將存取控制電路系統20繪示為單一單元,將裝置權限檢查電路系統92及PAS檢查電路系統20提供在不同位置係可行的。例如,因為由裝置權限檢查電路系統92執行的檢查不需要實體位址,此電路系統可提供在位址轉譯電路系統16之前(假設某個替代PAS選擇電路系統提供在裝置權限檢查電路系統92之前)。替代地,位址轉譯電路系統16在一些實例中可能能夠通過位址轉譯中途獲得PAS(例如,若實施多階位址轉譯,在位址轉譯的較早階中)。因此,在一些實例中,位址轉譯電路系統16可通過位址轉譯中途將PAS傳遞至裝置權限檢查電路系統92,且裝置權限檢查電路系統92可與執行最終階轉譯的位址轉譯電路系統16並行地執行其檢查。It should be noted that although some of the figures illustrate access control circuitry 20 as a single unit, it is feasible to provide device authorization check circuitry 92 and PAS check circuitry 20 at different locations. For example, because the checks performed by device authorization check circuitry 92 do not require a physical address, this circuitry may be provided before address translation circuitry 16 (assuming that some alternative PAS selection circuitry is provided before device authorization check circuitry 92). Alternatively, address translation circuitry 16 may in some instances be able to obtain the PAS midway through address translation (e.g., in an earlier stage of address translation if multi-stage address translation is implemented). Therefore, in some examples, the address translation circuitry 16 may pass the PAS to the device permission check circuitry 92 midway through the address translation, and the device permission check circuitry 92 may perform its check in parallel with the address translation circuitry 16 performing the final translation.
裝置權限檢查電路系統92取決於針對特定裝置及經選擇PAS定義的存取權限而判定是否拒絕來自特定裝置的存取請求。此等存取權限可如何定義的實例顯示於圖10中。Device permission checking circuitry 92 determines whether to deny an access request from a particular device based on the access permissions defined for the particular device and the selected PAS. An example of how these access permissions may be defined is shown in FIG. 10 .
圖10顯示與特定裝置關聯且可由裝置權限檢查電路系統存取之系統暫存器96的實例,其定義上文描述的額外的基於勸告的權限。在一些特定實例中,此暫存器96可係提供在請求者裝置4內的暫存器12之一者,儘管該暫存器亦可提供在請求者裝置外側。暫存器96在圖7中稱為「GPC控制暫存器」或「GPCCR」,且在此實例中,其內容可僅由在最高例外等級(例如,此實例中係EL3)執行的程序修改。FIG10 shows an example of a system register 96 associated with a particular device and accessible by the device permission checking circuitry, which defines the additional advisory-based permissions described above. In some specific examples, this register 96 may be one of the registers 12 provided within the requestor device 4, although the register may also be provided external to the requestor device. Register 96 is referred to as the "GPC Control Register" or "GPCCR" in FIG7, and in this example, its contents may only be modified by a program executing at the highest exception level (e.g., EL3 in this example).
GPPCR包含各對應於稍早討論之PAS之一者的若干個欄位,且此等欄位之各者保持可用以指示是否允許關聯裝置存取對應PAS的資訊。具體而言,「SPASD」欄位95定義與安全(S) PAS有關的權限資訊;「NSPASD」欄位97定義與較不安全(NS) PAS有關的權限資訊;且「RLPASD」欄位99定義與領域(RL) PAS有關的權限資訊。不存在針對根PAS提供的欄位。The GPPCR includes several fields that each correspond to one of the PASs discussed earlier, and each of these fields holds information that can be used to indicate whether the associated device is allowed to access the corresponding PAS. Specifically, the "SPASD" field 95 defines permission information related to the secure (S) PAS; the "NSPASD" field 97 defines permission information related to the less secure (NS) PAS; and the "RLPASD" field 99 defines permission information related to the domain (RL) PAS. There are no fields provided for the root PAS.
在一特定實例中,欄位(稱為「PASD」欄位)之各者保持「PAS停用」(PASD)位元。此係單一位元(「1」或「0」其中一者),其指示是否禁止裝置存取對應PAS–該PASD位元因此在由PAS檢查電路系統20強制執行的權限之上定義用於關聯裝置的一組額外權限(例如,彼等權限定義在GPT中)。例如,「0」的值可指示未定義額外權限,而「1」的值可指示來自關聯裝置之對對應PAS的存取受禁止。例如,保持在PASD位元之各者中的值可解譯如下: RLPASD位元: - 若RLPASD = 0,當領域PAS經選擇為經選擇PAS且基於GPT的顆粒保護檢查指示對領域PAS的存取允許用於目標實體位址時,允許對領域PAS的存取。 - 若RLPASD = 1,當啟用顆粒保護檢查時,對領域實體位址空間的任何存取導致GPF(顆粒保護錯誤)。 SPASD位元: - 若SPASD = 0,當安全PAS經選擇為經選擇PAS且基於GPT的顆粒保護檢查指示對安全PAS的存取允許用於目標實體位址時,允許對安全PAS的存取 - 若SPASD = 1,當啟用顆粒保護檢查時,對安全實體位址空間的任何存取導致GPF。 NSPASD位元: - 若NSPASD = 0,當非安全(較不安全)PAS經選擇為經選擇PAS且基於GPT的顆粒保護檢查指示對非安全PAS的存取允許用於目標實體位址時,允許對非安全PAS的存取 - 若NSPASD = 1,當啟用顆粒保護檢查時,對非安全(較不安全)實體位址空間的任何存取導致GPF。 In one particular example, each of the fields (referred to as "PASD" fields) holds a "PAS Disable" (PASD) bit. This is a single bit (one of "1" or "0") that indicates whether a device is prohibited from accessing the corresponding PAS - the PASD bit thus defines an additional set of permissions for the associated device over and above those enforced by the PAS checking circuitry 20 (e.g., those permissions defined in the GPT). For example, a value of "0" may indicate that no additional permissions are defined, while a value of "1" may indicate that access to the corresponding PAS from the associated device is prohibited. For example, the value held in each of the PASD bits may be interpreted as follows: RLPASD Bits: - If RLPASD = 0, access to the domain PAS is allowed when the domain PAS is selected as the selected PAS and the GPT-based granular protection check indicates that access to the domain PAS is allowed for the target physical address. - If RLPASD = 1, when granular protection checking is enabled, any access to the domain physical address space results in a GPF (granular protection fault). SPASD bit: - If SPASD = 0, access to the secure PAS is allowed when the secure PAS is selected as the selected PAS and the GPT-based granular protection check indicates that access to the secure PAS is allowed for the target physical address. - If SPASD = 1, when granular protection checking is enabled, any access to the secure physical address space causes a GPF. NSPASD bit: - If NSPASD = 0, access to the non-secure (less secure) PAS is allowed when the non-secure (less secure) PAS is selected as the selected PAS and the GPT-based granular protection check indicates that access to the non-secure PAS is allowed for the target physical address. - If NSPASD = 1, when granular protection checking is enabled, any access to the non-secure (less secure) physical address space causes a GPF.
此亦於下表中說明:
應理解施用至0b0及0b1之值的解譯亦可翻轉,使得0b1的值指示權限取決於GPI。It should be understood that the interpretation applied to the values of 0b0 and 0b1 may also be reversed, such that the value of 0b1 indicates that the authority depends on the GPI.
可針對複數個請求者裝置之各者提供各別的GPCCR 96,雖然應注意到不一定需要存在針對資料處理系統中的每一個請求者裝置提供的GPCCR 96。A separate GPCCR 96 may be provided for each of a plurality of requester devices, although it should be noted that there need not necessarily be a GPCCR 96 provided for every requester device in the data processing system.
在另一實例中,可存在針對給定請求者裝置提供的多於一個GPCCR 96–例如,定義在PASD欄位95、97、99之各者中的權限可替代地定義在單獨的暫存器中。In another example, there may be more than one GPCCR 96 provided for a given requestor device - for example, the permissions defined in each of PASD fields 95, 97, 99 may alternatively be defined in a separate register.
此外,在一些實例中,PASD權限可定義在不同的資料結構中。具體而言,SMMU可存取串流表項以判定外部裝置的裝置權限資訊-由於SMMU可管理數百個裝置,將權限定義在記憶體中的表中可比使用GPCCR更可行。Additionally, in some examples, PASD permissions may be defined in different data structures. Specifically, the SMMU may access stream table entries to determine device permission information for external devices - since the SMMU may manage hundreds of devices, defining permissions in a table in memory may be more feasible than using GPCCR.
其可用以提供用於防止定義在PASD欄位之任一者中的權限被修改的機制。防止暫存器96由在最高例外等級(在此情形中係EL3)以外的例外等級中執行的程式所修改提供一些保護,但進一步保護可藉由實施「寫入忽略」特徵提供。例如,可提供「寫入忽略控制暫存器」98以識別在一些情況下對其的寫入請求應忽略的一或多個暫存器(其可包括GPCCR)及/或暫存器的一或多個特定部分。It can be used to provide a mechanism for preventing the permissions defined in any of the PASD fields from being modified. Preventing registers 96 from being modified by programs executing in exception levels other than the highest exception level (EL3 in this case) provides some protection, but further protection can be provided by implementing a "write ignore" feature. For example, a "write ignore control register" 98 can be provided to identify one or more registers (which may include the GPCCR) and/or one or more specific portions of registers to which write requests should be ignored in some circumstances.
顯示於圖10中的寫入忽略控制暫存器98可僅由在最高(最高特權)例外等級(EL3)操作的程序編輯,且包含保持指示對GPPCR的直接寫入是否應忽略的暫存器封鎖值的欄位101。例如,此欄位可儲存單一位元,當該單一位元經設定時指示標定GPCCR 96的寫入請求應忽略。亦提供另外的欄位103,以指示對其他經命名暫存器的寫入是否亦應忽略。例如,保持在此等欄位中的位元可解譯如下: 「經命名暫存器」位元101、103: - 0b0:對「經命名暫存器」(例如,對於GPCCR欄位101,「經命名暫存器」係GPCCR)的直接寫入不為此機制所影響 - 0b1:忽略對「經命名暫存器」的直接寫入,且不更新「經命名暫存器」。 The write ignore control register 98 shown in FIG10 can be edited only by a program operating at the highest (most privileged) exception level (EL3), and includes a field 101 that holds a register lock value indicating whether direct writes to the GPPCR should be ignored. For example, this field may store a single bit that, when set, indicates that write requests to the designated GPCCR 96 should be ignored. Additional fields 103 are also provided to indicate whether writes to other named registers should also be ignored. For example, the bits held in these fields may be interpreted as follows: "Named register" bits 101, 103: - 0b0: Direct writes to the "named register" (e.g., for GPCCR field 101, the "named register" is the GPCCR) are not affected by this mechanism - 0b1: Direct writes to the "named register" are ignored and the "named register" is not updated.
應再次理解施用至0b0及0b1之值的解譯亦可翻轉,使得0b0的值指示寫入應忽略。此外,雖然上述實例展示可如何封鎖整個「經命名暫存器」,在一些實例中,寫入忽略控制暫存器可識別對其之寫入請求應忽略的給定暫存器的特定位元/欄位。It should again be understood that the interpretation of the values applied to 0b0 and 0b1 can also be flipped so that a value of 0b0 indicates that a write should be ignored. Furthermore, while the above example shows how an entire "named register" can be locked, in some examples, a write ignore control register can identify specific bits/fields of a given register for which write requests should be ignored.
在一特定實例中,此等「經命名暫存器」位元(在本文中亦稱為「暫存器封鎖值」或「寫入忽略值」)係「固著的」,使得寫入0b0之值的任何請求(例如,清除該值的請求)被忽略,而0b1的寫入不被忽略。「經命名暫存器」位元101、103可接著在資料處理設備重設時重設成0。In a particular example, these "named register" bits (also referred to herein as "register lock values" or "write ignore values") are "sticky" such that any request to write a value of 0b0 (e.g., a request to clear the value) is ignored, while a write of 0b1 is not ignored. The "named register" bits 101, 103 may then be reset to 0 when the data processing device is reset.
應注意,在替代實施方案中,可將GPCCR的暫存器封鎖值提供為GPCCR本身的欄位105而非獨立暫存器的欄位。It should be noted that in alternative embodiments, the register lock value of the GPCCR may be provided as field 105 of the GPCCR itself rather than as a field of a separate register.
其可用以提供用於停用上述特徵(例如,停用PASD及/或寫入忽略特徵)的機制。例如,此可幫助提供回溯相容性。因此,圖10亦顯示包含指示PASD特徵是否經啟用的PASD啟用欄位91及指示寫入忽略特徵是否經啟用的FGWIE欄位93的特徵暫存器94。例如,在此等欄位之任一者中的1的值可指示對應特徵經啟用,而0的值可指示其等經停用(或反之亦然)。It can be used to provide a mechanism for disabling the above-mentioned features (e.g., disabling PASD and/or write-ignore features). For example, this can help provide retroactive compatibility. Therefore, Figure 10 also shows a feature register 94 including a PASD enable field 91 indicating whether the PASD feature is enabled and a FGWIE field 93 indicating whether the write-ignore feature is enabled. For example, a value of 1 in either of these fields can indicate that the corresponding feature is enabled, while a value of 0 can indicate that it is disabled (or vice versa).
圖11示意地繪示資料處理設備2的另一實例配置。設備2包括若干個請求者裝置4,其在此實例中包括二個中央處理單元(CPU) 5及用於控制資料自/至周邊裝置之輸入或輸出的輸入/輸出單元7。請求者裝置的至少一些可具有內部資料或指令快取記憶體21以用於將本端指令或資料快取至裝置。其他主裝置(諸如輸入/輸出介面7)可係無快取主裝置。各別快取記憶體中的資料與由各別主裝置所存取的資料之間的一致性可由一致性互連9(其係如圖1所示之互連8的實例)管理,其追蹤用於從給定位址存取資料的請求,且當需要維持一致性時,控制在其他主裝置之快取記憶體中的資料的監聽。應理解,在其他實施例中,此類一致性操作可以軟體管理,但提供用於追蹤此類一致性的硬體互連9的益處在於由系統執行之軟體的程式設計師不需要考慮一致性。FIG11 schematically shows another example configuration of a data processing apparatus 2. The apparatus 2 includes a number of requester devices 4, which in this example include two central processing units (CPUs) 5 and an input/output unit 7 for controlling the input or output of data from/to peripheral devices. At least some of the requester devices may have an internal data or instruction cache 21 for caching local instructions or data to the device. Other master devices (such as the input/output interface 7) may be cacheless master devices. The consistency between the data in the respective caches and the data accessed by the respective masters may be managed by a consistency interconnect 9 (which is an example of interconnect 8 shown in FIG. 1 ) which tracks requests to access data from a given address and controls the monitoring of data in caches of other masters when necessary to maintain consistency. It should be understood that in other embodiments, such consistency operations may be managed by software, but the benefit of providing a hardware interconnect 9 for tracking such consistency is that programmers of software executed by the system do not need to be concerned with consistency.
如圖11所示,一些請求者可包括記憶體管理單元(MMU) 17,該MMU可包括用於快取用於將由軟體指定的位址轉譯成參考記憶體11中之特定位置的實體位址的位址轉譯資料的至少一個位址轉譯快取記憶體。提供未提供在給定請求者裝置內,但提供為特定請求者7與一致性互連9之間的額外組件的系統記憶體管理單元(SMMU) 19亦係可行的,用於允許未設計有內建MMU的更簡單主裝置使用位址轉譯功能性。在其他實例中,可將SMMU 17視為係互連9的部分。MMU 17及SMMU 19係位址轉譯電路系統的實例,且在一些實例中,亦可提供PAS選擇電路系統的功能性。As shown in FIG11 , some requestors may include a memory management unit (MMU) 17, which may include at least one address translation cache for caching address translation data used to translate addresses specified by software into physical addresses that reference specific locations in memory 11. It is also possible to provide a system memory management unit (SMMU) 19 that is not provided within a given requestor device, but is provided as an additional component between a particular requestor 7 and the coherent interconnect 9, to allow simpler master devices that are not designed with a built-in MMU to use address translation functionality. In other examples, the SMMU 17 may be considered to be part of the interconnect 9. MMU 17 and SMMU 19 are examples of address translation circuitry and, in some examples, may also provide the functionality of PAS selection circuitry.
圖12繪示可將本技術實施於其中的資料處理系統2的另一實例。在此實例中,將記憶體–具體而言,動態隨機存取記憶體(DRAM) 146–邏輯地分割成多個PAS:根PAS、領域(RL) PAS、安全(S) PAS、及較不安全(NS) PAS。提供包括多個PE 5及多個外部裝置7的多個請求者裝置。在此實例中,允許PE 5各在安全域84、較不安全域86、或根域82(例如,如圖2所示,根域經保留以用於某些程序)其中一者中執行軟體。同時,允許外部裝置7各在較不安全域86或領域域88其中一者中執行軟體。因此,在此特定實例中,領域域88由外部裝置7獨佔地使用,且安全域84由PE 5獨佔地使用。FIG. 12 illustrates another example of a data processing system 2 in which the present technology may be implemented. In this example, memory—specifically, dynamic random access memory (DRAM) 146—is logically partitioned into multiple PASs: a root PAS, a domain (RL) PAS, a secure (S) PAS, and a less secure (NS) PAS. A plurality of requestor devices including a plurality of PEs 5 and a plurality of external devices 7 are provided. In this example, each PE 5 is allowed to execute software in one of a secure domain 84, a less secure domain 86, or a root domain 82 (e.g., as shown in FIG. 2, the root domain is reserved for use by certain programs). At the same time, each external device 7 is allowed to execute software in one of the less secure domain 86 or the domain domain 88. Thus, in this particular example, domain domain 88 is used exclusively by external device 7 and security domain 84 is used exclusively by PE 5.
如上文描述的實例中,根PAS 82與所有其他PAS隔離,而領域PAS 88及安全PAS 84彼此隔離且與較不安全PAS 86隔離。不同PAS之間的隔離係由擁有(控制)GPT且在根域82中操作的系統領域控制器(system range controller, SRC) 144強制執行。SRC 144亦可可選地負責程式化領域SMMU上下文。As in the example described above, the root PAS 82 is isolated from all other PASs, while the domain PAS 88 and the secure PAS 84 are isolated from each other and from the less secure PAS 86. The isolation between the different PASs is enforced by the system range controller (SRC) 144, which owns (controls) the GPT and operates in the root domain 82. The SRC 144 may also optionally be responsible for programming the domain SMMU context.
圖9中亦實施硬體強制安全(hardware enforced security, HES)機制,例如,以保護可包括由SRC 144執行之程序的所謂的「信任根(root of trust, RoT)」服務。Hardware enforced security (HES) mechanisms are also implemented in FIG. 9 , for example, to protect so-called “root of trust (RoT)” services that may include programs executed by SRC 144 .
圖13係繪示根據本技術之實例方法的流程圖。在此實例方法中,在步驟106中,從標記為「裝置X」的裝置接收指定記憶體位址(例如,此可係虛擬位址)的記憶體存取請求。在步驟108中,選擇待與記憶體位址關聯的PAS–此選擇取決目前執行域作出。在步驟148中,判定是否允許裝置X存取經選擇PAS。若判定禁止裝置存取經選擇PAS,則拒絕該請求(步驟156)。另一方面,若未判定禁止裝置存取經選擇PAS,則在步驟150中,獲得經指定記憶體位址的GPI。在步驟152中,判定是否允許經選擇PAS存取根據GPI指派給記憶體位址的PAS。若不允許存取,在步驟156中拒絕存取。另一方面,若存取不為GPI所禁止,允許存取(步驟154)進行。 模擬器實施方案 FIG. 13 is a flow chart illustrating an example method according to the present technology. In this example method, in step 106, a memory access request is received from a device labeled "Device X" specifying a memory address (e.g., this may be a virtual address). In step 108, a PAS is selected to be associated with the memory address - this selection is made depending on the current execution domain. In step 148, a determination is made whether device X is allowed to access the selected PAS. If it is determined that the device is prohibited from accessing the selected PAS, the request is denied (step 156). On the other hand, if it is not determined that the device is prohibited from accessing the selected PAS, then in step 150, a GPI for the specified memory address is obtained. In step 152, it is determined whether access to the PAS assigned to the memory address according to the GPI is allowed via the selected PAS. If access is not allowed, access is denied in step 156. On the other hand, if access is not prohibited by the GPI, access is allowed (step 154) to proceed. Simulator Implementation Scheme
圖14繪示可使用的模擬器實施方案。雖然稍早所述之實施例以用於操作支援所關注技術的特定處理硬體之設備及方法來實施本發明,但亦可能根據本文所述之實施例提供一指令執行環境,其係透過使用電腦程式實施。此類電腦程式常稱為模擬器,因為其等提供硬體架構之基於軟體的實施方案。模擬器電腦程式的種類包括仿真器、虛擬機、模型、及二進制轉譯器(包括動態二進制轉譯器)。一般而言,模擬器實施方案可在可選地運行主機作業系統420、支援模擬器程式410的主機處理器430上運行。在一些配置中,在硬體與所提供的指令執行環境及/或相同的主機處理器上提供的多個相異指令執行環境之間可有多層模擬。歷史上,已需要強大的處理器來提供模擬器實施方案,其以合理速度執行,但此種方法在某些情況下可係有正當理由的,諸如當因為相容性或再使用原因此需要執行另一處理器原生的程式碼時。例如,模擬器實施方案可提供具有不為主機處理器硬體所支援之額外功能性的指令執行環境,或提供一般與不同的硬體架構相關聯的指令執行環境。模擬的綜述係於「Some Efficient Architecture Simulation Techniques」中給出,Robert Bedichek, Winter 1990 USENIX Conference,頁數53至63。FIG. 14 illustrates a simulator implementation that may be used. Although the embodiments described earlier implement the present invention with apparatus and methods for operating specific processing hardware supporting the technology of interest, it is also possible to provide an instruction execution environment according to the embodiments described herein that is implemented using a computer program. Such computer programs are often referred to as simulators because they provide software-based implementations of the hardware architecture. Types of simulator computer programs include emulators, virtual machines, models, and binary translators (including dynamic binary translators). Generally speaking, the simulator implementation can be run on a host processor 430 that optionally runs a host operating system 420 and supports the simulator program 410. In some configurations, there may be multiple layers of emulation between the hardware and the instruction execution environment provided and/or multiple different instruction execution environments provided on the same host processor. Historically, powerful processors have been required to provide an emulator implementation that executes at reasonable speeds, but this approach may be justified in certain circumstances, such as when it is necessary to execute code that is native to another processor for compatibility or reuse reasons. For example, an emulator implementation may provide an instruction execution environment with additional functionality not supported by the host processor hardware, or provide an instruction execution environment that is generally associated with a different hardware architecture. An overview of simulation is given in "Some Efficient Architecture Simulation Techniques", Robert Bedichek, Winter 1990 USENIX Conference, pages 53-63.
在先前已參照特定硬體架構或特徵來描述實施例之情況下,在一模擬實施例中,可藉由合適的軟體架構或特徵提供等效功能。例如,可在模擬實施例中將特定電路系統實施為電腦程式邏輯。類似地,記憶體硬體(諸如暫存器或快取)可在模擬實施例中實施為軟體資料結構。於先前描述實施例中提及的硬體元件的一或多者存在於主機硬體(例如,主機處理器430)上的配置中,一些模擬實施例可在適當時利用主機硬體。Where an embodiment has been previously described with reference to a particular hardware architecture or feature, in an analog embodiment, equivalent functionality may be provided by an appropriate software architecture or feature. For example, a particular circuit system may be implemented as computer program logic in an analog embodiment. Similarly, memory hardware (such as registers or caches) may be implemented as software data structures in an analog embodiment. In configurations where one or more of the hardware elements mentioned in the previously described embodiments reside on host hardware (e.g., host processor 430), some analog embodiments may utilize host hardware when appropriate.
模擬器程式410可儲存在電腦可讀儲存媒體(其可係非暫時性媒體)上,並提供程式介面(指令執行環境)給目標碼400(其可包括應用程式、作業系統、及超管理器),該程式介面與藉由模擬器程式410模型化之硬體架構的介面相同。因此,目標碼400的程式指令可使用模擬器程式410從指令執行環境內執行,使得實際上不具有上文討論之設備2之硬體特徵的主機電腦430可仿真此等特徵。例如,由於目標碼可藉由在不支援該架構的主機裝置上執行的模擬器內運行而測試,此對於允許在實際支援新版本處理器架構的硬體裝置仍可用之前測試針對該架構開發的目標碼400可係有用的。The emulator program 410 may be stored on a computer-readable storage medium (which may be a non-transitory medium) and provides a programming interface (instruction execution environment) to the object code 400 (which may include applications, operating systems, and hypervisors), which is the same as the interface of the hardware architecture modeled by the emulator program 410. Therefore, program instructions of the object code 400 can be executed from within the instruction execution environment using the emulator program 410, so that a host computer 430 that does not actually have the hardware features of the device 2 discussed above can emulate these features. For example, since the object code can be tested by running within an emulator executing on a host device that does not support the architecture, this can be useful to allow object code 400 developed for a new version of a processor architecture to be tested before actual hardware devices supporting the architecture are available.
模擬器碼包括處理程式邏輯412,該處理程式邏輯仿真處理電路系統10的行為,例如,包括解碼目標碼400之指令及將指令映射至由主機硬體430支援之原生指令集中的對應指令序列以執行等效於經解碼指令之功能的指令解碼程式邏輯。處理程式邏輯412亦模擬如上文描述之碼在不同例外等級及域中的處理。暫存器仿真程式邏輯413維持在主機處理器之主機位址空間中的資料結構,該資料結構仿真根據與目標碼400關聯的目標指令集架構定義的架構暫存器狀態。因此,替代如圖1之實例中將此類架構狀態儲存在硬體暫存器12中,其替代地儲存在主機處理器430的記憶體中,其中暫存器仿真程式邏輯413將目標碼400之指令的暫存器參考映射至對應位址以用於從主機記憶體獲得經模擬架構狀態資料。此架構狀態可包括稍早描述的目前域指示14、目前例外等級指示15、及其他系統暫存器13。The emulator code includes handler logic 412 that emulates the behavior of the processing circuit system 10, for example, including instruction decoder logic that decodes instructions of the target code 400 and maps the instructions to corresponding instruction sequences in the native instruction set supported by the host hardware 430 to perform functions equivalent to the decoded instructions. The handler logic 412 also emulates the processing of the code in different exception levels and domains as described above. The register emulator logic 413 maintains data structures in the host address space of the host processor that emulate the architecture register states defined according to the target instruction set architecture associated with the target code 400. Therefore, instead of storing such architectural state in hardware registers 12 as in the example of Figure 1, it is instead stored in the memory of the host processor 430, where the register emulation program logic 413 maps the register references of the instructions of the target code 400 to corresponding addresses for obtaining the simulated architectural state data from the host memory. This architectural state may include the current domain indication 14, the current exception level indication 15, and other system registers 13 described earlier.
模擬碼包括分別仿真位址轉譯電路系統16及PAS過濾器20之參考與稍早描述相同的頁表結構及GPT 56的功能性的位址轉譯程式邏輯414及過濾程式邏輯416。因此,位址轉譯程式邏輯414將由目標碼400指定的虛擬位址轉譯成PAS之一者中的經模擬實體位址(從目標碼的觀點,其係指記憶體中的實體位置),但實際上此等經模擬實體位址藉由位址空間映射程式邏輯415映射至主機處理器的(虛擬)位址空間上。過濾程式邏輯416執行顆粒保護資訊的查找,以與上述PAS過濾器相同的方式判定是否允許由目標碼觸發的記憶體存取繼續進行。The emulation code includes address translation logic 414 and filter logic 416 which respectively emulate the functionality of the address translation circuitry 16 and the PAS filter 20 with reference to the same page table structure and GPT 56 as described earlier. Thus, the address translation logic 414 translates virtual addresses specified by the object code 400 into emulated physical addresses in one of the PASs (which, from the object code's point of view, refer to physical locations in memory), but in reality these emulated physical addresses are mapped onto the (virtual) address space of the host processor by the address space mapper logic 415. Filter logic 416 performs a lookup of the particle protection information to determine whether the memory access triggered by the target code is allowed to proceed in the same manner as the PAS filter described above.
在本申請案中,用語「經組態以...(configured to...)」係用以意指一設備的一元件具有能夠實行該經定義作業的一組態。在此上下文中,「組態(configuration)」意指硬體或軟體之互連的配置或方式。例如,該設備可具有專用硬體,其提供經定義的作業,或者一處理器或其他處理裝置可經程式化以執行該功能。「經組態以(configured to)」並不意味著設備元件需要以任何方式改變以提供所定義的作業。In this application, the phrase "configured to..." is used to mean that a component of a device has a configuration that enables it to perform the defined operation. In this context, "configuration" means the arrangement or manner in which hardware or software is interconnected. For example, the device may have dedicated hardware that provides the defined operation, or a processor or other processing device may be programmed to perform the function. "Configured to" does not mean that the device component needs to be changed in any way to provide the defined operation.
進一步地,詞「包含…中之至少一者(comprising at least one of…)」在本申請案中係用以意指包括以下選項的任一者或以下選項的任何組合。例如,「下列之至少一者:A;B;及C」意圖意指A或B或C或A、B、及C的任何組合(例如,A及B或A及C或B及C)。Furthermore, the term "comprising at least one of..." is used in this application to mean including any one of the following options or any combination of the following options. For example, "at least one of the following: A; B; and C" is intended to mean A or B or C or any combination of A, B, and C (e.g., A and B or A and C or B and C).
雖然本文已參照附圖詳細地描述本發明的說明性實施例,應瞭解本發明不限於該等精確實施例,且所屬技術領域中具有通常知識者可於其中實行各種變化與修改,而不脫離如隨附申請專利範圍所定義的本發明的範圍。Although illustrative embodiments of the present invention have been described in detail with reference to the accompanying drawings, it should be understood that the present invention is not limited to those precise embodiments and that a person skilled in the art may implement various changes and modifications therein without departing from the scope of the present invention as defined by the appended claims.
2:資料處理系統;處理系統;資料處理設備;設備 4:請求者裝置 5:中央處理單元(CPU);PE 6:完成者裝置 7:輸入/輸出單元;輸入/輸出介面;請求者;外部裝置 8:互連;系統網狀架構 9:一致性互連;硬體互連;互連 10:處理電路系統 11:記憶體 12:暫存器 13:系統暫存器 14:目前域指示;目前域指示符;目前域;域指示位元 15:目前例外等級指示;目前例外等級 16:位址轉譯電路系統;PAS選擇電路系統 17:記憶體管理單元(MMU) 18:轉譯後備緩衝區(TLB) 19:系統記憶體管理單元(SMMU) 20:PAS過濾器;GMPU;硬體過濾器;PAS檢查電路系統 21:內部資料或指令快取記憶體 22:顆粒保護資訊快取記憶體 23:存取控制電路系統 24:快取記憶體;系統網狀架構;安全域 26:非安全域 29:監測碼;監測軟體 30:應用程式碼;應用程式 32:作業系統(OS)碼;客作業系統;富作業系統;作業系統 34:超管理器碼;超管理器 36:受信任應用程式 38:受信任作業系統 40:安全分割管理器;SPM 42:領域;使用者提供碼 44:領域;使用者提供碼 46:領域管理模組(RMM) 50:1階記憶體管理單元;1階MMU 52:2階記憶體管理單元;2階MMU 54:安全屬性 56:顆粒保護表(GPT) 60:實體別名點(PoPA) 61:實體位址空間 62:數值範圍;範圍 63:別名實體位址;別名位址 64:系統實體位址空間 65:經去別名位址;系統實體位址空間 70:區域 80:例外等級 82:根域;域;根PAS 84:安全(S)域;域;安全PAS;安全世界 86:較不安全域;域;較不安全PAS;非安全域 88:領域域;域;領域PAS;領域世界 91:PASD啟用欄位 92:裝置權限檢查電路系統 93:FGWIE欄位 94:特徵暫存器 95:SPASD欄位;PASD欄位 96:系統暫存器;GPCCR;暫存器 97:NSPASD欄位;PASD欄位 98:寫入忽略控制暫存器 99:RLPASD欄位;PASD欄位 100:步驟 101:欄位;經命名暫存器位元 102:步驟 103:欄位;經命名暫存器位元 104:步驟 105:欄位 106:步驟 108:步驟 110:表描述符 112:指標器 114:區塊或頁描述符PTE;區塊/頁描述符 116:區塊或頁描述符PTE;區塊/頁描述符 118:區塊或頁描述符PTE;區塊/頁描述符 120:輸出位址 122:屬性 124:非安全表指示符;資訊 126:實體位址空間選擇資訊;PAS選擇資訊;資訊;PAS選擇位元 130:步驟 132:步驟 134:步驟 136:步驟 138:步驟 140:步驟 142:步驟 144:系統領域控制器(SRC) 146:動態隨機存取記憶體(DRAM) 148:步驟 150:步驟 152:步驟 154:步驟 156:步驟 400:目標碼 410:模擬器程式 412:處理程式邏輯 413:暫存器仿真程式邏輯 414:位址轉譯程式邏輯 415:位址空間映射程式邏輯 416:過濾程式邏輯 420:主機作業系統 430:主機處理器;主機電腦;主機硬體 2: data processing system; processing system; data processing equipment; equipment 4: requester device 5: central processing unit (CPU); PE 6: completer device 7: input/output unit; input/output interface; requester; external device 8: interconnect; system mesh architecture 9: coherent interconnect; hardware interconnect; interconnect 10: processing circuit system 11: memory 12: register 13: system register 14: current domain indicator; current domain indicator; current domain; domain indicator bit 15: current exception level indicator; current exception level 16: address translation circuit system; PAS selection circuit system 17: memory management unit (MMU) 18: Translation lookaside buffer (TLB) 19: System memory management unit (SMMU) 20: PAS filter; GMPU; hardware filter; PAS check circuit system 21: Internal data or instruction cache 22: Granular protection information cache 23: Access control circuit system 24: Cache memory; System mesh architecture; Security domain 26: Non-secure domain 29: Monitoring code; Monitoring software 30: Application code; Application 32: Operating system (OS) code; Guest operating system; Rich operating system; Operating system 34: Hypervisor code; Hypervisor 36: Trusted application 38: Trusted Operating System 40: Secure Partition Manager; SPM 42: Domain; User-Provided Code 44: Domain; User-Provided Code 46: Domain Management Module (RMM) 50: Level 1 Memory Management Unit; Level 1 MMU 52: Level 2 Memory Management Unit; Level 2 MMU 54: Security Attributes 56: Granular Protection Table (GPT) 60: Physical Point of Alias (PoPA) 61: Physical Address Space 62: Numeric Range; Range 63: Alias Physical Address; Alias Address 64: System Physical Address Space 65: De-Aliased Address; System Physical Address Space 70: Zone 80: Exception Level 82: Root Domain; Domain; Root PAS 84: secure (S) domain; domain; secure PAS; secure world 86: less secure domain; domain; less secure PAS; non-secure domain 88: domain domain; domain; domain PAS; domain world 91: PASD enable field 92: device permission check circuitry 93: FGWIE field 94: feature registers 95: SPASD field; PASD field 96: system registers; GPCCR; registers 97: NSPASD field; PASD field 98: write ignore control register 99: RLPASD field; PASD field 100: step 101: field; named register bits 102: step 103: field; named register bit 104: step 105: field 106: step 108: step 110: table descriptor 112: pointer 114: block or page descriptor PTE; block/page descriptor 116: block or page descriptor PTE; block/page descriptor 118: block or page descriptor PTE; block/page descriptor 120: output address 122: attribute 124: non-secure table indicator; information 126: physical address space selection information; PAS selection information; information; PAS selection bit 130: step 132: step 134: step 136: step 138: step 140: step 142: step 144: system domain controller (SRC) 146: dynamic random access memory (DRAM) 148: step 150: step 152: step 154: step 156: step 400: target code 410: simulator program 412: processing program logic 413: register emulation program logic 414: address translation program logic 415: address space mapping program logic 416: Filter logic 420: Host operating system 430: Host processor; Host computer; Host hardware
本技術的進一步態樣、特徵、及優點將由於結合附圖閱讀的以下實例描述而顯而易見,在該等附圖中: [圖1]繪示資料處理設備的實例; [圖2]繪示處理電路系統可於其中操作的若干個域; [圖3]繪示支援顆粒保護查找之處理系統的實例; [圖4]示意地繪示將若干個實體位址空間別名至識別記憶體系統中之位置的系統實體位址空間上; [圖5]繪示分割有效硬體實體位址空間使得不同架構的實體位址空間具有對系統實體位址空間的各別部分的存取的實例; [圖6]係繪示判定處理電路系統的目前操作域的方法的流程圖; [圖7]顯示用於將虛擬位址轉譯成實體位址之頁表項的頁表項格式的實例; [圖8]係顯示選擇待由給定記憶體存取請求存取之實體位址空間之方法的流程圖; [圖9]繪示存取控制電路系統的實例; [圖10]繪示系統暫存器的實例; [圖11]繪示資料處理設備的另一實例; [圖12]繪示資料處理設備的進一步實例; [圖13]係繪示用於檢查是否拒絕記憶體存取請求之實例方法的流程圖;及 [圖14]顯示可使用的模擬器實例。 Further aspects, features, and advantages of the present technology will become apparent from the following example descriptions read in conjunction with the accompanying drawings, in which: [FIG. 1] illustrates an example of a data processing device; [FIG. 2] illustrates a number of domains in which a processing circuit system can operate; [FIG. 3] illustrates an example of a processing system that supports granular protection lookup; [FIG. 4] schematically illustrates aliasing a number of physical address spaces to a system physical address space that identifies locations in a memory system; [FIG. 5] illustrates an example of partitioning an effective hardware physical address space so that physical address spaces of different architectures have access to separate portions of the system physical address space; [FIG. 6] is a flow chart illustrating a method for determining the current operating domain of a processing circuit system; [FIG. 7] shows an example of a page table entry format for a page table entry used to translate a virtual address into a physical address; [FIG. 8] is a flow chart showing a method for selecting a physical address space to be accessed by a given memory access request; [FIG. 9] shows an example of an access control circuit system; [FIG. 10] shows an example of a system register; [FIG. 11] shows another example of a data processing device; [FIG. 12] shows a further example of a data processing device; [FIG. 13] is a flow chart showing an example method for checking whether to deny a memory access request; and [FIG. 14] shows an example of a simulator that can be used.
20:PAS過濾器;GMPU;硬體過濾器;PAS檢查電路系統 20:PAS filter; GMPU; hardware filter; PAS inspection circuit system
23:存取控制電路系統 23: Access control circuit system
92:裝置權限檢查電路系統 92: Device permission check circuit system
Claims (20)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
GB2302688.3 | 2023-02-24 | ||
GB2302688.3A GB2627496A (en) | 2023-02-24 | 2023-02-24 | Determining whether to reject a memory access request issued by a requester device |
Publications (1)
Publication Number | Publication Date |
---|---|
TW202435076A true TW202435076A (en) | 2024-09-01 |
Family
ID=85793918
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW113105174A TW202435076A (en) | 2023-02-24 | 2024-02-12 | Determining whether to reject a memory access request issued by a requester device |
Country Status (3)
Country | Link |
---|---|
GB (1) | GB2627496A (en) |
TW (1) | TW202435076A (en) |
WO (1) | WO2024175870A1 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB0226875D0 (en) * | 2002-11-18 | 2002-12-24 | Advanced Risc Mach Ltd | Control of access to a memory by a device |
GB2570474B (en) * | 2018-01-26 | 2020-04-15 | Advanced Risc Mach Ltd | Region fusing |
GB2593486B (en) * | 2020-03-24 | 2022-06-15 | Advanced Risc Mach Ltd | Apparatus and method using plurality of physical address spaces |
GB2593485B (en) * | 2020-03-24 | 2022-06-15 | Advanced Risc Mach Ltd | Apparatus and method using plurality of physical address spaces |
GB2595256B (en) * | 2020-05-19 | 2022-08-17 | Advanced Risc Mach Ltd | Translation table address storage circuitry |
-
2023
- 2023-02-24 GB GB2302688.3A patent/GB2627496A/en active Pending
-
2024
- 2024-01-11 WO PCT/GB2024/050056 patent/WO2024175870A1/en unknown
- 2024-02-12 TW TW113105174A patent/TW202435076A/en unknown
Also Published As
Publication number | Publication date |
---|---|
GB202302688D0 (en) | 2023-04-12 |
WO2024175870A1 (en) | 2024-08-29 |
GB2627496A (en) | 2024-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI870546B (en) | Apparatus, method, computer program, and computer-readable storage medium using plurality of physical address spaces | |
JP7701936B2 (en) | Data integrity check for granule protection data | |
EP4127950B1 (en) | Apparatus and method | |
US20250036575A1 (en) | Apparatus and method using plurality of physical address spaces | |
IL297388A (en) | Translation table address storage circuitry | |
TW202435079A (en) | Predetermined less-secure memory property | |
TW202435076A (en) | Determining whether to reject a memory access request issued by a requester device |