Apparatus and method for using multiple physical address spaces

By designing a multi-domain architecture and a dedicated root physical address space, the problem of insufficient security isolation in existing data processing systems is solved, achieving stronger security and isolation effects. It is suitable for applications that require a strictly secure computing environment, such as mobile payment and banking, computer games, and cloud systems.

CN115335813BActive Publication Date: 2026-11-20ARM LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202180022692.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-03-24
Filing Date
2021-01-26
Publication Date
2026-11-20
Estimated Expiration
2041-01-26

AI Technical Summary

Technical Problem

In existing data processing systems, damage to the operating system or management program can lead to sensitive information being accessed by attackers. The lack of secure isolation and access control for different software processes results in security vulnerabilities.

Method used

It adopts a multi-domain architecture, including a root domain and multiple other domains. It uses address translation circuits to translate virtual addresses into different physical address spaces, utilizes the root domain to manage switching between domains, and provides a dedicated root physical address space to enhance security and isolation.

Benefits of technology

It achieves secure isolation between different domains, improves the security of data processing systems, prevents untrusted software processes from accessing critical data or code, and simplifies system development and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115335813B_ABST
    Figure CN115335813B_ABST
Patent Text Reader

Abstract

A processing circuit (10) is provided that performs processing in one of at least three domains (82, 84, 86, 88). An address translation circuit (16) translates a virtual address of a memory access performed from a current domain to a physical address in one of a plurality of physical address spaces (61) selected based on at least the current domain. The domains include a root domain (82) for managing switching between other domains. The physical address spaces (61) include a root physical address space associated with the root domain (82) that is separate from physical address spaces associated with other domains.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This technology relates to the field of data processing.

[0002] The data processing system may have address translation circuitry to translate the virtual address of a memory access request into the physical address corresponding to the location to be accessed in the memory system.

[0003] At least some examples provide an apparatus comprising: processing circuitry for performing processing in one of at least three domains; and address translation circuitry for translating a virtual address of a memory access performed in the current domain into a physical address in at least one of a plurality of physical address spaces selected based on the current domain; wherein: the at least three domains include a root domain for managing switching between a plurality of other domains among the at least three domains; and the plurality of physical address spaces include a root physical address space associated with the root domain, the root physical address space being separate from the physical address spaces associated with the plurality of other domains.

[0004] At least some examples provide a data processing method comprising: performing processing in one of at least three domains; and translating a virtual address of a memory access performed in the current domain into a physical address in at least one of a plurality of physical address spaces selected based on the current domain; wherein: the at least three domains include a root domain for managing switching between a plurality of other domains among the at least three domains; and the plurality of physical address spaces include a root physical address space associated with the root domain, the root physical address space being separate from the physical address spaces associated with the plurality of other domains.

[0005] At least some examples provide a computer program for controlling a host data processing device to provide an instruction execution environment for executing target code; the computer program includes: processing program logic for simulating the processing of the target code in one of at least three domains; and address translation program logic for translating a virtual address of a memory access executed from the current domain into a physical address in at least one of a plurality of simulated physical address spaces selected based on the current domain; wherein: the at least three domains include a root domain for managing switching between a plurality of other domains among the at least three domains; and the plurality of simulated physical address spaces include a root simulated physical address space associated with the root domain, the root simulated physical address space being separate from the simulated physical address spaces associated with the plurality of other domains.

[0006] At least some examples provide a computer-readable storage medium that stores the aforementioned computer program. This computer-readable storage medium can be a non-transitory storage medium or a transient storage medium.

[0007] Further aspects, features, and advantages of this technology will become apparent from the following description, which is taken in conjunction with the accompanying drawings, in which:

[0008] Figure 1 An example of a data processing device is shown;

[0009] Figure 2 Multiple domains in which the processing circuitry can operate are shown;

[0010] Figure 3 An example of a processing system that supports particle protection lookup is shown;

[0011] Figure 4 This schematically illustrates multiple physical address spaces as aliases on the system physical address space that identify locations within the memory system;

[0012] Figure 5 An example is shown of partitioning the effective hardware physical address space so that different architecture physical address spaces have access to the corresponding portions of the system physical address space;

[0013] Figure 6 This is a flowchart illustrating a method for determining the current operating domain of a processing circuit;

[0014] Figure 7 An example of the page table entry format used to translate virtual addresses into physical addresses is shown;

[0015] Figure 8 This is a flowchart illustrating a method for selecting the physical address space to be accessed based on a given memory access request;

[0016] Figure 9 An example of an entry for a particle protection table is shown, which provides particle protection information indicating which physical address spaces are allowed to access a given physical address.

[0017] Figure 10 This is a flowchart illustrating the method for performing particle protection lookup;

[0018] Figure 11 The multiple stages of address translation and particle protection information filtering are illustrated;

[0019] Figure 12 This is a flowchart illustrating the processing of cache invalid instructions;

[0020] Figure 13 This is a flowchart illustrating the processing of the cache-invalidate-to-PoPA (Physical Alias ​​Point) instruction;

[0021] Figure 14 An example of a data processing system is shown; and

[0022] Figure 15 An example of a simulator that can be used is shown.

[0023] Controlling access to the physical address space

[0024] The data processing system can support the use of virtual memory, providing address translation circuitry to translate the virtual address specified by a memory access request into a physical address associated with the location in the memory system to be accessed. The mapping between virtual and physical addresses can be defined in one or more page table structures. Page table entries within the page table structure can also define access permission information that controls whether a given software procedure executing on the processing circuitry is allowed to access a specific virtual address.

[0025] In some processing systems, address translation circuitry maps all virtual addresses to a single physical address space, which the memory system uses to identify locations in memory to be accessed. In such systems, control over whether a particular address is accessible to a specific software process is based solely on the page table structure used to provide the virtual-to-physical address translation mapping. However, this page table structure is typically defined by the operating system and / or hypervisor. If the operating system or hypervisor is compromised, this can introduce security vulnerabilities, allowing attackers to access sensitive information.

[0026] Therefore, for systems that require certain processes to be executed securely in isolation from other processes, such systems can support operations in multiple domains and multiple different physical address spaces. For at least some components of the memory system, even if physical addresses in corresponding physical address spaces actually correspond to the same location in memory, memory access requests whose virtual addresses are translated into physical addresses in different physical address spaces are treated as completely separate addresses accessing memory. By isolating accesses from different operational domains of the processing circuitry into corresponding different physical address spaces as perceived by some memory system components, this provides stronger security guarantees independent of page table permission information set by the operating system or hypervisor.

[0027] Processing circuitry can support processing within a root domain, which is responsible for managing switching between other domains in which the processing circuitry can operate. By providing a dedicated root domain for controlling switching, this helps maintain security by limiting the extent to which code executing in one domain can trigger a switch to another. For example, the root domain can perform various security checks when a domain switch is requested.

[0028] Therefore, the processing circuitry can support processing performed in one of at least three domains: the root domain and at least two other domains. The address translation circuitry can translate the virtual address of a memory access performed from the current domain into a physical address in at least one of a plurality of physical address spaces selected based on the current domain.

[0029] In the example described below, multiple physical address spaces include a root physical address space associated with the root domain, which is separate from the physical address spaces associated with other domains. Therefore, the root domain has its own physical address space allocated to it, rather than using one of the physical address spaces associated with one of the other domains. By providing a dedicated root physical address space separate from the physical address spaces associated with other domains, this provides stronger security guarantees for the data or code associated with the root domain, which can be considered the most security-critical element, assuming it will manage access to other domains. Furthermore, providing a dedicated root physical address space distinct from the physical address spaces of other domains simplifies system development because it simplifies the allocation of physical addresses within each physical address space to specific units of the hardware memory storage device. For example, by identifying a separate root physical address space, data or program code associated with the root domain can be more easily and preferentially stored in protected on-chip memory rather than less secure off-chip memory, with less overhead in determining the portion associated with the root domain compared to storing the root domain's code or data in a common address space shared with other domains.

[0030] The root physical address space can be accessed exclusively from the root domain. Therefore, when processing circuitry operates in one of other domains, it may be unable to access the root physical address space. This enhances security by ensuring that code executing in one of other domains does not tamper with data or program code that the root domain relies on for managing domain switching or controlling the permissions of processing circuitry in one of other domains.

[0031] On the other hand, all multiple physical address spaces can be accessed from the root domain. Since code executing in the root domain must be trusted by either party operating in another domain, and since the root domain code is responsible for switching to the specific domain in which that party's code is executing, the root domain can inherently be trusted to access any physical address space. Making all physical address spaces accessible from the root domain allows functions such as translating memory regions into and out of a domain, copying code and data into a domain (e.g., during boot), and providing services to that domain.

[0032] Address translation circuitry can restrict which physical address spaces are accessible based on the current domain. When a specific physical address space is accessible to the current domain, it means that the address translation circuitry can translate the virtual address specified for a memory access originating from the current domain into a physical address within that specific physical address space. This does not necessarily mean that the memory access will be allowed, because even if a specific memory access can translate its virtual address into a physical address within a specific physical address space, further checks can be performed to determine whether access to that physical address within that specific physical address space is actually permitted. This will be discussed further below with reference to the granular protection information that defines the partitioning of physical addresses between different physical address spaces. However, by restricting which subset of the physical address space the current domain can access, this can provide stronger security guarantees.

[0033] In some examples, the processing circuitry can support two additional domains besides the root domain. For example, these additional domains could include a secure domain associated with a secure physical address space and a less secure domain associated with a less secure physical address space. The less secure physical address space can be accessed from each of the less secure domain, the secure domain, and the root domain. The secure physical address space can be accessed from the secure domain and the root domain, but may not be accessible from the less secure domain. The root domain can be accessible from the root domain, but may be inaccessible from both the less secure and secure domains. Therefore, compared to using page tables as the sole security control mechanism, this allows code executing in the secure domain to have stronger security guarantees protecting its code or data from access by code operating in the less secure domain. For example, code requiring stronger security could execute in a secure domain managed by a trusted operating system, different from the insecure operating system operating in the less secure domain. Examples of systems supporting such secure and less secure domains could be based on support provided by Cambridge University, UK. Limited The system processes architectural features and operations. In traditional... In this implementation, the monitoring code used to manage the switching between secure and less secure domains uses the same secure physical address space as the secure domain. In contrast, as described above, providing a root domain for managing switching between other domains and allocating a dedicated root physical address space for the root domain helps improve security and simplify system development.

[0034] However, in other examples, "other domains" can include additional domains, such as at least three other domains besides the root domain. These domains can include the secure and less secure domains discussed above, but can also include at least one additional domain associated with a different physical address space. A less secure physical address space can also be accessed from the other domains, which in turn can be accessed from the other domains and the root domain, but not from the less secure domains. Therefore, similar to secure domains, additional domains can be considered more secure than less secure domains, and allow for further partitioning of code into corresponding domains associated with different physical address spaces to restrict their interaction.

[0035] In some examples, the domains can have a hierarchical structure such that when the system ascends from a less secure domain through a secure domain and other domains to the root domain, they are associated with an increased level of privilege, where the other domains are considered more privileged than the secure domain and therefore have access to the secure physical address space.

[0036] However, the growing need to provide secure computing environments for software providers limits the need to trust other software providers associated with other software running on the same hardware platform. For example, there are numerous applications in areas such as mobile payments and banking, the implementation of anti-cheating or anti-piracy mechanisms in computer games, security enhancements for operating system platforms, secure virtual machine hosting in cloud systems, and confidential computing, where the party providing the software code may be unwilling to trust the party providing the operating system or hypervisor (components previously considered trustworthy). In systems supporting secure and less secure domains with corresponding physical address spaces, such as those based on the above... In architectural systems, as the occupancy of secure components operating in secure domains increases, the set of software typically operating in secure domains has grown to include multiple software fragments available from a varying number of software providers, including parties such as original equipment manufacturers (OEMs) assembling processing devices (such as mobile phones) from components including silicon integrated circuit chips supplied by a specific silicon provider, operating system vendors (OSVs) providing the operating systems running on the devices, and cloud platform operators (or cloud hosts) maintaining server farms that provide server space for hosting virtual machines on the cloud. Therefore, implementing domains in a strict order of increasing privileges can be problematic, as application providers offering application-level code that they wish to provide a secure computing environment may not want to trust parties that traditionally provide software executing in secure domains (such as OSVs, OEMs, or cloud hosts). Similarly, parties providing code operating in secure domains are unlikely to want to trust application providers offering code operating in higher-privileged domains that are granted access to data associated with lower-privileged domains. Therefore, it can be recognized that a strict hierarchy of domains with progressively increasing privileges may be inappropriate.

[0037] Therefore, in the more detailed examples below, the additional domain can be considered orthogonal to the security domain. While both the additional domain and the security domain can access the less secure physical address space, the physical address space associated with the additional domain cannot be accessed from the security domain, and the secure physical address space associated with the security domain cannot be accessed from the additional domain. The root domain can still access the physical address spaces associated with both the security domain and the additional domain.

[0038] Therefore, using this model, other domains (examples of which are the domains described in the following examples) and the security domain have no dependencies on each other and therefore do not need to trust each other. The security domain and other domains only need to trust the root domain, which is inherently trusted in managing entries into other domains.

[0039] While the following examples describe a single instance of an additional domain (domain domain), it should be understood that the principle of additional domains orthogonal to the security domain can be extended to provide multiple additional domains such that each of the security domain and at least two additional domains can access the less secure physical address space, cannot access the root physical address space, and cannot access the physical address spaces associated with each other.

[0040] The less secure physical address space is accessible from all domains supported by the processing circuitry. This is useful because it facilitates the sharing of data or program code between software executing in different domains. If a specific data or code item needs to be accessible in a different domain, it can be assigned to the less secure physical address space, thus allowing it to be accessed from any domain.

[0041] When translating a virtual address into a physical address, the address translation circuitry can perform the translation based on at least one page table entry. At least when the current domain is a subset of at least three domains supported by the processing circuitry, the address translation circuitry can select which of the physical address spaces will be used as the physical address space, where the physical address is translated to that physical address space for a given memory access, based on the current domain and physical address space selection information specified in at least one page table entry used for translating the virtual address into a physical address. Therefore, information defined within the page table structure can influence which physical address space is selected for a given memory access when emanating from the current domain. For some domains, this selection based on physical address space selection information specified in the page table entry may not be necessary. For example, if the current domain is the less secure domain described above, a less secure physical address space can be selected regardless of any information specified in the at least one page table entry used for address translation, since all other address spaces are inaccessible to the less secure domain.

[0042] However, for other domains, the choice can be made between two or more different physical address spaces. Therefore, for these domains, it may be useful to define information in the page table entries of a given address block that indicates which physical address space should be used for the access, so that different portions of the virtual address space seen by the given software can be mapped to different physical addresses.

[0043] For example, when the current domain is the root domain, the address translation circuit can translate a virtual address into a physical address based on a root domain page table entry. For each root domain page table entry, the physical address space selection information includes at least two bits of physical address space selection information used to select among at least three physical address spaces accessible from the root domain. For example, in an implementation supporting root, less secure, and secure domains, the physical address space selection information in the root domain page table entry can select among any of these three physical address spaces. In an implementation also having at least one additional domain, the physical address space selection information can select among the root physical address space, the secure physical address space, the less secure physical address space, and at least one additional physical address space.

[0044] On the other hand, when the current domain is a secure domain or another domain, the choice of physical address space may be more restricted, thus requiring fewer bits of physical address space selection information compared to the root domain. For example, in a secure domain, physical address space selection information can be used to choose between a secure address space and a less secure address space (because the root physical address space and other physical address spaces may be inaccessible). When the current domain is another domain, physical address space selection information can be used to choose between another physical address space and a less secure physical address space, because the secure physical address space and the root physical address space may be inaccessible. For page table entries used to select the physical address space to use when the current domain is a secure domain or another domain, the physical address space selection indicator used for this selection can be encoded in the same location within at least one page table entry, regardless of whether the current domain is a secure domain or another domain. This makes the encoding of page table entries more efficient and allows the hardware used to interpret that portion of the page table entry to be reused for secure domains and other domains, thereby reducing circuit area.

[0045] The memory system may include a Physical Alias ​​Point (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 that memory system resource. The memory system may include at least one pre-PoPA memory system component provided upstream of the PoPA that treats the aliased physical addresses as corresponding to different memory system resources.

[0046] For example, at least one pre-PoPA memory system component may include a cache or translation back buffer that caches data, program code, or address translation information for alias physical addresses in separate entries, such that if requests to access the same memory system resource are made from different physical address spaces, these accesses 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 consistency interconnects, snooping filters, or other mechanisms for maintaining consistency between cached information at various masters. The consistency control circuitry can assign separate consistency states to individual alias physical addresses in different physical address spaces. Therefore, for consistency purposes, alias physical addresses are treated as separate addresses, even if they actually correspond to the same underlying memory system resource. Although, superficially, tracking consistency separately for alias physical addresses may seem to cause a consistency penalty, this is not actually a problem because if processes operating in different domains do intend to share access to a particular memory system resource, they can access that resource using a less secure physical address space (or access that resource using one of the other physical address spaces using the restrictive sharing features described below). Another example of a pre-PoPA memory system component could be a memory protection engine, which is provided to protect data stored in off-chip memory from confidentiality loss and / or tampering. For example, such a memory protection engine could use different encryption keys to individually encrypt data associated with a specific memory system resource based on from which physical address space the resource is accessed, effectively treating aliased physical addresses as corresponding to different memory system resources (e.g., an encryption scheme that makes encryption address-dependent could be used, and the physical address space identifier could be considered as part of the address used for this purpose).

[0047] Regardless of the form of the pre-PoPA memory system components, it is useful for such PoPA memory system components to treat alias physical addresses as corresponding to different memory system resources, because this provides a hardware-enforced separation between accesses issued to different physical address spaces, so that information associated with one domain cannot leak to another domain through features such as cache timing side channels or side channels involving consistency changes triggered by consistency control circuitry.

[0048] In some implementations, alias physical addresses in different physical address spaces can be represented using different digital physical address values ​​for each different physical address space. This method may require a mapping table to determine at the PoPA which of the different physical address values ​​corresponds to the same memory system resource. However, the overhead of maintaining such a mapping table may be considered unnecessary, and therefore, in some implementations, it may be simpler if the alias physical address includes physical addresses represented using the same digital physical address value in each different physical address space. If this approach is adopted, at the physical alias point, it is sufficient to simply discard the physical address space identifier that identifies which physical address space is being accessed using memory access, and then provide the remaining physical address bits downstream as the de-alias physical address.

[0049] Therefore, 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 de-aliased physical addresses to be provided to at least one downstream memory system component. The PoPA memory system component may be a device that accesses a mapping table to find the de-aliased address corresponding to the aliased address in a specific address space, as described above. However, the PoPA component may also simply be the location in the memory system where the physical address label associated with a given memory access is discarded, such 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, the PoPA memory system component may still provide physical address space labels to at least one downstream memory system component (e.g., to implement completer-side filtering, as discussed further below), but the PoPA may mark a point within the memory system beyond which the downstream memory system component no longer treats the aliased physical address as a different memory system resource, but instead considers each of the aliased physical addresses to map to the same memory system resource. For example, if a downstream memory controller or hardware memory storage device of PoPA receives a physical address tag and physical address for a given memory access request, then if that physical address corresponds to the same physical address as a previously seen transaction, then any danger checks or performance improvements performed on transactions accessing the same physical address (such as merging accesses to the same address) can be applied, even if the transactions specify different physical address space tags. In contrast, for upstream memory system components of PoPA, if transactions accessing the same physical address specify the same physical address in different physical address spaces, then such danger checks or performance improvement steps for those transactions can be omitted.

[0050] As described above, at least one pre-PoPA memory system component may include at least one pre-PoPA cache. This may be a data cache, an instruction cache, or a unified Level 2, Level 3, or system cache.

[0051] The processing circuitry can support cache invalidation-to-PoPA instructions that specify a target address (which can be a virtual address or a physical address). In response to a cache invalidation-to-PoPA instruction, the processing circuitry can issue at least one invalidation command to request at least one pre-PoPA cache to invalidate one or more entries associated with the target physical address value corresponding to the target address. In contrast, when at least one invalidation command is issued, at least one post-PoPA cache downstream of PoPA can retain one or more entries associated with the target physical address value. For at least one pre-PoPA cache, this cache can invalidate one or more entries associated with the target physical address value specified by at least one invalidation command, regardless of which physical address space is associated with those entries. Therefore, even if physical addresses with the same address value in different physical address spaces are treated as representing different physical addresses by the pre-PoPA cache, the physical address space identifier can be ignored to handle invalidations triggered by cache invalidation-to-PoPA instructions.

[0052] Therefore, a cache invalidation instruction can be defined in a form that allows processing circuitry to request that any cache entry associated with a specific physical address corresponding to a target virtual address be invalidated in any cache up to a physical alias point. This form of invalidation instruction can differ from other types of invalidation instructions that request the invalidation of cache entries, affecting other points in the memory system such as caches up to a coherence point (a point that ensures all observers (e.g., processor cores, direct memory access engines, etc.) see the same copy of data associated with a given address). Providing a specialized form of instruction that requests invalidation up to a physical alias point can be useful, especially for root domain code that can manage changes to address allocations across domains. For example, when updating granular protection information defining which physical addresses are accessible within a given physical address space, or when reallocating a specific physical address block to a different physical address space, root domain code can use a cache invalidation to PoPA instruction to ensure that any data, code, or other information residing in the cache (whose accessibility depends on the stale value of the granular protection information) is invalidated, ensuring that subsequent memory accesses are correctly controlled based on the new granular protection information. In some examples, in addition to invalidating cache entries, at least one pre-PoPA cache can clean up data from cache entries to write any dirty versions of data associated with the entry to be invalidated back to a location outside the PoPA in the memory system. In some cases, different versions of the cache invalidation to PoPA instruction can be supported to indicate whether cleaning is required.

[0053] Memory encryption circuitry can be provided that, in response to a memory access request specifying a selected physical address space and a target physical address within that space, encrypts or decrypts data associated with a protected address region based on one of a plurality of encryption keys chosen depending on the selected physical address space, when the target physical address is within a protected address region. In some examples, the protected address region can be the entire physical address space, while in others, encryption / decryption can be applied only to certain sub-regions that are part of the protected address region. By allocating a dedicated root physical address space separate from the physical address spaces associated with other domains, it becomes easier for the memory encryption circuitry to select different encryption keys for the root domain compared to other domains, thereby improving security. Similarly, selecting different encryption keys for all other domains allows for stronger segregation of code or data assets associated with a particular domain.

[0054] In a specific example, the device may have at least one on-chip memory on the same integrated circuit as the processing circuitry, and all valid physical addresses in the root physical address space can be mapped to that at least one on-chip memory, unlike off-chip memory. This helps improve the security of the root domain. It should be understood that information from other domains can also be stored in on-chip memory. Providing a separate root physical address space simplifies memory allocation because, in examples where the root domain shares a secure physical address space with secure domains, there may be too much data associated with the secure domain to keep all of it in on-chip memory, and it may be difficult to determine which specific data slices are associated with the root domain. When marked with a separate physical address space identifier, it is much simpler to partition the data (or code) of the root domain.

[0055] However, in other examples, some addresses in the root physical address space can be mapped to off-chip memory. Memory encryption, integrity, and freshness mechanisms can be used to protect root domain data stored off-chip.

[0056] The above-described techniques can be implemented in a hardware device having hardware circuitry logic for implementing the functions described above. Therefore, the processing circuitry and address translation circuitry can include hardware circuitry logic. However, in other examples, a computer program for controlling a host data processing device to provide an instruction execution environment for executing target code can be configured with processing logic and address translation logic, which perform functions equivalent to the aforementioned processing circuitry and address translation circuitry in software form. This is useful, for example, to enable target code written for a specific instruction set architecture to execute on a host computer that may not support that instruction set architecture. Therefore, simulation software can be used to emulate the functionality expected by an instruction set architecture not provided by the host computer, providing the target code with an instruction execution environment equivalent to that expected when executing the target code on a hardware device that actually supports that instruction set architecture. Therefore, the computer program providing the simulation can include: processing logic that simulates processing in one of the at least three domains previously described; and address translation logic that translates virtual addresses into physical addresses in at least one of a plurality of simulated physical address spaces selected based on the current domain. As in hardware devices, at least three domains may include a root domain for managing switching between other domains, and the root domain may have a root emulated physical address space associated with it, which is separate from the emulated physical address spaces associated with other domains. For methods of providing architecture emulation, the individual physical address spaces selected by the address translation program logic are emulated physical address spaces because they do not actually correspond to the physical address spaces recognized by the host computer's hardware components, but rather are addresses that will be mapped into the host's virtual address space. Providing such emulation is useful for a variety of purposes, such as enabling legacy code written for one instruction set architecture to execute on different platforms that support different instruction set architectures, or assisting software development for new versions of instruction set architectures when hardware devices supporting new versions of instruction set architectures are not yet available (this allows software for the new version of the architecture to begin development in parallel with the development of hardware devices supporting the new version of the architecture).

[0057] Particle protection search

[0058] In systems where the virtual address of a memory access request can be mapped to a physical address in one of two or more different physical address spaces, granular protection information can be used to restrict which physical addresses can be accessed within a specific physical address space. This is useful for ensuring that certain physical memory locations implemented in on-chip or off-chip hardware can be restricted to access within a specific physical address space or a specific subset of physical address spaces when needed.

[0059] In one method for managing such limitations, a completer-side filtering circuit, provided at or near the completer device, can be used to implement the determination of whether a given physical address can be accessed from a particular physical address space. For example, the completer-side filtering circuit can be associated with a memory controller or a peripheral controller. In this method, issuing a memory access request to a cache or an interconnect used to route transactions from the requester device to the completer device can be independent of any lookup of information defining which physical addresses are accessible within a given physical address space.

[0060] In contrast, in the example described below, a granular protection lookup is performed by a requester-side filtering circuit that checks whether a memory access request is permitted to be passed to a cache or interconnect based on a lookup of granular protection information indicating at least one allowed physical address space associated with the target granularity of the physical address to be accessed. The granules of the physical address space defining the individual granular protection information entries can have a specific size, which can be the same as or different from the size of a page in the page table structure used for address translation circuitry. In some cases, the size of the granules can be larger than the page defining the address translation map of the address translation circuitry. Alternatively, granular protection information can be defined at the same page-level granularity as the address translation information within the page table structure. Defining granular protection information at the page-level granularity can be convenient because it allows for finer-grained control over which areas of the memory storage hardware can be accessed from a specific physical address space and therefore from specific domains of the operation of the processing circuitry.

[0061] Therefore, an apparatus may include: an address translation circuit for translating a target virtual address specified by a memory access request issued by a requester circuit into a target physical address; and a requester-side circuitry for performing a granular protection lookup based on the target physical address and a selected physical address space associated with the memory access request to determine whether to allow the memory access request to be passed to a cache or to an interconnect for communication with a completer device to service the memory access request. The selected physical address space may be one of multiple physical address spaces. In the granular protection lookup, the requester-side filtering circuitry may be configured to:

[0062] Obtain particle protection information corresponding to the target particle, including the target physical address, which indicates at least one allowed physical address space associated with the target particle; and

[0063] When the particle protection information indicates that the selected physical address space is not one of at least one of the allowed physical address spaces, the memory access request is blocked.

[0064] The advantage of performing granular protection lookups on the requester side of the interconnect, rather than the completer side, is that it allows for finer-grained control over which physical addresses can be accessed from a given physical address space, compared to the practicality on the completer side. This is because the completer side typically has relatively limited access to the entire memory system. For example, a memory controller for a given memory cell can only access locations within that memory cell and may not access other regions of the address space. Providing finer-grained control can rely on a more complex granular protection information table that can be stored in the memory system, and accessing such a table from the requester side may be more practical, offering greater flexibility in issuing memory access requests to a wider subset of the memory system.

[0065] Furthermore, performing particle protection lookup on the requester side helps enable the ability to dynamically update particle protection information at runtime, which may be impractical for completer-side filter circuits that can be limited to accessing a relatively small amount of statically defined data defined at boot time.

[0066] Another advantage of requester-side filtering circuitry is that it allows interconnects to assign different addresses within the same particle to different completer ports that communicate with different completer devices (e.g., different DRAM (Dynamic Random Access Memory) cells). This can be effective for performance, but it may be impractical if the entire particle needs to be directed to the same completer cell so that particle protection lookups can be performed on the completer side to verify whether memory access is allowed.

[0067] Therefore, performing a granular protection lookup on the requester side rather than the completer side to distinguish whether a particular physical address can be accessed from the particular physical address space selected for a given memory access request may have many advantages.

[0068] Granular protection information can be represented in different ways. In one example, granular protection can be defined in a single linear index table stored in a single contiguous block of addresses, where a specific entry to be accessed within that block is selected based on the target physical address. However, in practice, granular protection information may not be defined for the entire physical address space, so using a multi-level table structure to store granular protection information may be more efficient, similar to multi-level page tables used for address translation. In such a multi-level structure, a portion of the target physical address can be used to select a first-level granular protection table entry, which provides a pointer to the location in memory storing another level of granular protection table. Another portion of the target physical address can then select which entry of that additional granular protection table to retrieve. After iterating through one or more levels beyond the first level of tables, a granular protection table entry providing the granular protection information associated with the target physical address is finally obtained.

[0069] Regardless of the specific structure chosen for the table storing granular protection information, the granular protection information can represent which physical address in the physical address space is at least one allowed physical address in several ways. One approach could be to provide a series of fields, each indicating whether a corresponding granular address in the physical address space is allowed to access the physical address containing the target physical address. For example, a bitmap could be defined within the granular protection information, where each bit of the bitmap indicates whether the corresponding physical address space is a allowed or disallowed physical address space for that granular address.

[0070] However, in practice, for most use cases, it is relatively impossible to expect to allow a large amount of physical address space to access a given physical address. As discussed in the previous section on controlling access to the physical address space, a less secure physical address space can be used to select from all domains, and thus can be used when data or code needs to be shared across multiple domains, potentially eliminating the need to map a particular physical address to all or most of the available physical address space.

[0071] Therefore, a relatively effective approach could be that the particle protection information can specify the allocated physical address space for a target particle with a physical address, and at least one allowed physical address space can include at least the allocated physical address space specified by the particle protection information for that particular target particle. In some implementations, the particle protection information can specify a single physical address space as the allocated physical address space. Therefore, in some cases, the particle protection information can include an identifier for a specific physical address space that serves as the allocated physical address space for target particles that are allowed to access that physical address.

[0072] In some implementations, the only physical address space of the target particle whose physical address is allowed to be accessed may be the allocated physical address space, and access to the target particle from any other physical address space may not be permitted. This approach is effective for maintaining security. Conversely, access from different domains to a specific physical address space can be controlled via address translation functions, where the address translation circuitry may be able to select which specific physical address space to use for a given memory access, thus potentially eliminating the need to allow sharing of physical address particles across multiple physical address spaces. If only the allocated physical address space is allowed to access the target particle's physical address, then updating which physical address space is the allocated physical address space may be necessary to enable access to that physical address particle from other physical address spaces. For example, this might require the root domain, as described earlier, to perform some processing to switch the allocated physical address space for a given physical address particle. This processing may have a performance cost; for example, it may (for security reasons) involve rewriting each location in the given particle's physical address with empty data or other data independent of the previous content of those physically addressed locations to ensure that the process of accessing the newly allocated physical address space cannot glean anything from the data previously stored at the location associated with the given physical address particle.

[0073] Therefore, another approach could be to include, in addition to identifying the allocated physical address space, granular protection information that includes shared attribute information indicating whether at least one other physical address space besides the allocated physical address space is one of at least one allowed physical address space. Thus, if the shared attribute information indicates that at least one other physical address space is allowed to access the corresponding physical address granule, then the physical address granule can be accessed from multiple physical address spaces. This is useful for allowing code in a domain associated with one physical address space to temporarily allow one of its allocated physical address granules to be visible to domains associated with different physical address spaces. This can make temporary sharing of data or code more efficient, as it avoids the potentially expensive operation of changing which physical address space is the allocated physical address space. The shared attribute information can be set directly by code executing in the domain associated with the allocated physical address space, or it can be set by the root domain based on a request from code executing in the domain associated with the allocated physical address space.

[0074] With the support of shared attribute information, and by using this shared attribute information to verify whether an address allocated to a physical address space can be accessed by a request specifying a different address space, the requester-side filtering circuit can also convert the physical address space selected for a downstream memory access request to a cache or interconnect based on the shared attribute information. Therefore, when the particle protection lookup determines that the selected physical address space is a physical address space other than the allocated physical address space of at least one of the allowed physical address spaces indicated by the shared attribute information, the requester-side filtering circuit can allow the memory access request to be passed to the cache or interconnect specifying the allocated physical address space instead of the selected physical address space. This means that, for the purpose of accessing downstream memory, components prior to PoPA treat memory access as if it were first issued specifying an allocated physical address space, allowing the memory access request to access cache entries or snooping filter entries marked with that allocated physical address space.

[0075] In some implementations, whenever a memory access request is checked for particle protection information, the requester-side filtering circuitry can obtain the particle protection information for particle protection lookup from the memory. This method may require less hardware cost on the requester side. However, obtaining the particle protection information from the memory can be relatively slow.

[0076] Therefore, to improve performance, the requester-side filtering circuitry can access at least one lookup cache that can cache granular protection information, allowing granular protection lookups to be performed in at least one lookup cache, and eliminating the need to retrieve the required granular information from memory if it is already stored in at least one lookup cache. In some cases, the at least one lookup cache may be a cache separate from the translation back buffer (TLB) used by the address translation circuitry to cache page table data that provides the mapping between virtual and physical addresses. However, in other examples, the at least one lookup cache may combine a cache of page table data with a cache of granular protection information. Thus, in some cases, the at least one lookup cache may store at least one combination of translation-granular protection entry specification information, which depends on the granular protection information and at least one page table entry used by the address translation circuitry to map the target virtual address to the target physical address. Whether the TLB and granular protection cache are implemented as separate structures or as a single combined structure is one implementation option, and either one can be used.

[0077] Regardless of the method used for at least one lookup cache, the at least one lookup cache can invalidate a lookup cache entry storing information that depends on granular protection information associated with the physical address granularity that includes the invalid target physical address in response to at least one lookup cache invalidation command specifying an invalid target physical address. In a conventional processing system with a TLB, while the TLB can typically support invalidation commands specifying a virtual address or (in systems supporting two address translation stages, an intermediate address), the TLB typically does not need to be able to identify which entry will be invalidated using the physical address. However, when at least one lookup cache is provided to cache granular protection information, it can be useful to be able to invalidate any entry that depends on that information if the granular protection information for a given physical address granularity changes. Therefore, the command can identify a specific physical address for which the entry containing information depending on the granular protection information will be invalidated.

[0078] If the granular protection information cache is implemented separately from the TLB, the TLB may not need to have any ability to search for entries by physical address. In this case, the granular protection information cache can respond to a cache invalidation command specifying a physical address, but the TLB can ignore the command.

[0079] However, if at least one lookup cache includes a combined translation / granular protection cache whose entries are searched based on virtual or intermediate addresses, and returns both page table information associated with the virtual / intermediate address and granular protection information associated with the corresponding physical address, then providing an alternative scheme for searching entries based on physical addresses may be useful, allowing at least one lookup cache invalidation command specifying an invalid target physical address to be processed. A regular lookup of the combined cache would not require such a physical address search, because if entries are combined, a search by virtual or intermediate address might be sufficient to access all the combined information used to perform both address translation and granular protection lookups. However, on cache invalidation commands, the combined cache can be searched based on physical addresses to identify any entries that may need to be invalidated, as they rely on granular protection information specifying the physical address.

[0080] The memory system may have a PoPA memory system component as discussed above with reference to the previous example, at least one pre-PoPA memory system component, and at least one post-PoPA memory system component. Therefore, when a memory access request passes through a physical alias point, aliased physical addresses in different physical address spaces can correspond to the same memory system resource identified using the de-aliased physical address, in the same way as discussed above. Before PoPA, at least one pre-PoPA memory system component treats aliased physical addresses from different physical address spaces as corresponding to different memory system resources that can improve security. Furthermore, while theoretically different digital address values ​​could be used to identify aliased physical addresses in different physical address spaces, this could be relatively complex to implement, and it might be simpler to use the same physical address value to represent the aliased physical address in different physical address spaces.

[0081] In the case where at least one pre-PoPA memory system component includes at least one pre-PoPA cache, the processing circuitry can respond to a cache invalidation to PoPA instruction specifying a target virtual address to trigger invalidation to any pre-PoPA cache upstream of the physical alias point via the target physical address, while allowing any post-PoPA cache to retain data with the target physical address (as previously described).

[0082] The selected physical address space associated with memory access can be chosen in different ways. In some examples, the selected physical address space can be chosen (by address translation circuitry or by requester-side filtering circuitry) based at least on the current operating domain of the requester circuitry that issued the memory access request. The selection of the selected physical address space can also depend on physical address space selection information specified in at least one page table entry used to translate the target virtual address into a target physical address. The selection of which physical address space to choose can be performed as discussed previously with respect to the previous examples.

[0083] The selected domains and physical address spaces available in a given system can be as described previously and can include less secure domains, secure domains, root domains, and other domains discussed above, each with a corresponding physical address space. Alternatively, the domain / physical address space can include a subset of these domains. Therefore, any features associated with any of the previously described domains can be included in a system with requester-side filtering circuitry.

[0084] In implementations where the root domain has the corresponding root physical address space as described above, the requester-side filtering circuitry can bypass granular protection lookups when the current domain is the root domain. Granular protection lookups may be unnecessary when the current domain is the root domain because the root domain can be trusted to access all areas of the physical address space, and therefore power can be saved by skipping granular protection lookups when in the root domain.

[0085] Granular protection information can be modified by software executing in the root domain. Therefore, granular protection information can be dynamically updated at runtime. This is advantageous for some of the domain use cases discussed, where the domain providing the secure execution environment can dynamically create and allocate corresponding regions of memory reserved for that domain at runtime. This approach is generally impractical using only completer-side filtering. In some implementations, the root domain may be the only domain permitted to modify granular protection information; therefore, if other domains need to change the granular protection information to be implemented, they can request the root domain to modify the granular protection information, and the root domain can then check whether the request from another domain is permitted.

[0086] While it may be advantageous to provide requester-side filtering circuitry for performing granular protection lookups on the requester side before memory access requests are passed to the cache or interconnect, there may be other scenarios where it might be preferable to check protection information (defining which physical addresses can be accessed from a given physical address space) on the completer side of the interconnect. For example, while it might be necessary to provide fine-grained, page-level granularity to divide the memory hardware into physical address regions accessible from different physical address spaces for some portions of the address space, it might be preferable for other portions of the memory system to allocate a large block of contiguous addresses to a single physical address space, and the overhead of accessing (potentially multi-level) granular protection structures stored in memory might be unreasonable. If an entire memory cell (e.g., a specific DRAM module) is to be allocated to a single physical address space, it might be simpler to handle the enforcement of access restrictions for that memory cell through completer-side checks.

[0087] Therefore, in some implementations, in addition to providing requester-side filtering circuitry, there may also be completer-side filtering circuitry. In response to a memory access request received from the interconnect with a specified target physical address and a selected physical address space, completer-side protection lookup is performed based on the target physical address and the selected physical address space to determine whether the memory access request is permitted to be served by the completer device. By providing a hybrid approach, allowing certain portions of the memory to be protected by requester-side filtering while others are protected by completer-side filtering, a better balance is struck between performance and flexibility in allocating memory usage compared to implementations using either requester-side filtering or completer-side filtering alone.

[0088] Therefore, in some implementations, the particle protection information may specify a pass-through indicator indicating that at least one allowed physical address space will be resolved by the completer-side filtering circuitry. Thus, when the particle protection information specifies a pass-through indicator, the requester-side filtering circuitry can determine whether to pass the memory access request to the cache or interconnect independently of any check of whether the selected physical address space is one of at least one allowed physical address space for the target particle. On the other hand, if the particle protection information for the target particle access does not specify a pass-through indicator, the determination of whether the memory access request can be passed to the cache or interconnect may depend on a check of whether the selected physical address space is one of at least one allowed physical address space, because in this case, there may be no subsequent completer-side filtering after allowing the memory access request to proceed to the cache or interconnect. Therefore, the pass-through indicator can control the partitioning of the address space between those physical address particles for which checks are performed on the requester side and those for which checks are performed on the completer side, thus providing additional flexibility for system designers.

[0089] The completer-side protection information used by the completer-side filter circuit does not need to have the same format as the granular protection information used by the requester-side filter circuit. For example, the completer-side filter circuit can be defined with a coarser granularity than the granular protection information used by the requester-side filter circuit for granular protection lookup. Granular protection information can be defined in a multi-level table structure, where each level of the table provides entries corresponding to memory blocks with a given number of addresses that correspond to powers of two. Therefore, the entries for a given level of the table required to check a given target physical address can be simply indexed by adding a multiple of a certain number of bits from the target physical address to the base address associated with that level of the table, thus avoiding the need to compare the contents of the accessed entry with the target physical address to determine if it is the correct entry. In contrast, for completer-side protection information, a smaller number of entries can be defined, each specifying the start and end addresses (or start address and size) of a memory region, which can correspond to a number of addresses other than two. This approach could be better suited for defining relatively coarse-grained blocks in completer-side protection information, but it might require comparing the target physical address with the upper and lower bounds of the corresponding physical address range defined in each completer-side protection information entry to determine if any of these physical addresses matches the specified physical address. A multi-level indexed table approach for requester-side granular protection information can support a relatively large number of distinct entries, enabling fine-grained mapping from physical addresses to physical address spaces. While defining upper and lower bounds for each region in completer-side protection information is generally impractical due to the comparison overhead of looking up each of those entries to check if the target address falls within the bounds of that entry, completer-side protection information might be more efficient in terms of memory storage and may have less performance variation because the penalty is smaller if a cache miss occurs. Of course, this is just one example of how the searched information can be implemented on both the requester and completer sides.

[0090] The requester-side protection information can be dynamically updated at runtime. The completer-side protection information can be statically defined by the hardware on the on-chip system, configured at boot time, or dynamically reconfigured at runtime.

[0091] Regarding the examples described above, although the techniques for granular protection lookup described above can be implemented in a system with dedicated hardware logic for performing address translation circuitry and requester-side filtering circuitry, for reasons similar to those described above, equivalent functionality can also be implemented in software within a computer program that controls the host data device to provide an instruction execution environment for executing the target code. Therefore, address translation program logic and filtering program logic can be provided to simulate the functionality of the previously described address translation circuitry and requester-side filter. As with the examples above, for the computer program providing the instruction execution environment, at least one of the following can be applied: the granular protection information can be dynamically updated by the target code at runtime; and the granular protection information is defined at the page-level granularity. Detailed Implementation

[0092] Figure 1 An example of a data processing system 2 having at least one requester device 4 and at least one completer device 6 is schematically illustrated. Interconnection 8 provides communication between the requester device 4 and the completer device 6. The requester device is capable of issuing a memory access request for memory access to a specific addressable memory system location. The completer device 6 is the device responsible for servicing memory access requests directed to it. Although... Figure 1 Not shown, but some devices may be able to act as both requester and completer devices. Requester device 4 may include, for example, processing elements such as a central processing unit (CPU) or graphics processing unit (GPU), or other host devices such as a bus master, network interface controller, display controller, etc. Completer devices may include memory controllers responsible for controlling access to corresponding memory storage units, peripheral controllers for controlling access to peripheral devices, etc. Figure 1 An exemplary configuration of one of the requester devices 4 is shown in more detail, but it should be understood that other requester devices 4 may have similar configurations. Alternatively, other requester devices may have the same... Figure 1 The left side shows different configurations of the requester device 4.

[0093] The requester device 4 has processing circuitry 10 that performs data processing in response to instructions, referencing data stored in register 12. Register 12 may include general-purpose registers for storing operands and the results of processed instructions, and control registers for storing control data to configure how the processing circuitry performs processing. For example, the control data may include a current domain indicator 14 for selecting which operation domain is the current domain, and a current exception level indicator 15 for indicating which exception level is the current exception level that the processing circuitry 10 is operating at.

[0094] Processing circuitry 10 may issue a memory access request specifying a virtual address (VA) identifying the addressable location to be accessed and a domain identifier (domain ID or "security state") identifying the current domain. Address translation circuitry 16 (e.g., a memory management unit (MMU)) translates the virtual address into a physical address (PA) through one or more stages of address translation based on page table data defined in a page table structure stored in the memory system. Translation lookup buffer (TLB) 18 acts as a lookup cache to cache some information in the page table information, thus enabling faster access than if the page table information had to be retrieved from memory every time an address translation is needed. In this example, in addition to generating the physical address, address translation circuitry 16 selects one of several physical address spaces associated with the physical address and outputs a Physical Address Space (PAS) identifier identifying the selected physical address space. The selection of PAS will be discussed in more detail below.

[0095] PAS filter 20 acts as a requester-side filter circuit to check whether access to the physical address within the specified physical address space identified by the PAS identifier is permitted based on the translated physical address and PAS identifier. This lookup is based on particle protection information stored in a particle protection table structure within the memory system. Similar to the cache of page table data in TLB 18, particle protection information can be cached within particle protection information cache 22. Although particle protection information cache 22 is in... Figure 1 In the example shown, it is a separate structure from TLB 18, but in other examples, these types of lookup caches can be combined into a single lookup cache structure so that a single lookup of an entry in the combined structure provides both page table information and granular protection information. Granular protection information defines information that restricts access to the physical address space of a given physical address, and based on this lookup, PAS filter 20 determines whether to allow memory access requests to continue being issued to one or more caches 24 and / or interconnects 8. If the specified PAS access to the specified physical address is not permitted for the memory access request, PAS filter 20 blocks the transaction and may signal a fault.

[0096] Although Figure 1 An example of a system including multiple requester devices 4 is shown, but for... Figure 1 The feature shown by a requester device on the left-hand side can also be included in systems where only one requester device exists (such as a single-core processor).

[0097] Although Figure 1An example is shown where address translation circuit 16 performs the selection of a PAS for a given request. However, in other examples, address translation circuit 16 may output information for determining which PAS to select, along with the PA, to PAS filter 20, and PAS filter 20 may select the PAS and check whether access to the PA is permitted within the selected PAS.

[0098] The provision of PAS filter 20 helps support systems that can operate in multiple operational domains, each associated with its own isolated physical address space. This means that, for at least a portion of the memory system (e.g., for some cache or coherence implementation such as a snooping filter), even if addresses within these address spaces actually relate to the same physical location in the memory system, each individual physical address space is treated as a completely separate set of addresses that identify the individual memory system location. This can be useful for security purposes.

[0099] Figure 2 Examples of different operating states and domains in which the processing circuit 10 can operate are shown, as well as examples of the types of software that can be executed in different exception levels and domains (of course, it should be understood that the specific software installed on the system is selected by the parties managing the system and is therefore not a fundamental feature of the hardware architecture).

[0100] The processing circuitry 10 can operate at multiple different exception levels 80 (in this example, four exception levels labeled EL0, EL1, EL2, and EL3), where EL3 refers to the exception level with the highest privilege level, and EL0 refers to the exception level with the lowest privilege level. It should be understood that other architectures may choose the reverse numbering so that the exception level with the highest number can be considered to have the lowest privilege. In this example, the lowest privilege exception level EL0 is used for application-level code, the next highest privilege exception level EL1 is used for operating system-level code, the next highest privilege exception level EL2 is used for hypervisor-level code managing the switching between multiple virtualized operating systems, and the highest privilege exception level EL3 is used for monitoring code managing the switching between corresponding domains and the allocation of physical addresses to the physical address space, as described later.

[0101] When an exception occurs while the processing software is at a specific exception level, for some types of exceptions, an exception of a higher (higher privilege) level is generated, where the specific exception level to generate the exception is selected based on the attributes of the specific exception that occurred. However, in some cases, it is possible for other types of exceptions to be generated at the same exception level as the exception level associated with the code that was processed when the exception occurred. When an exception occurs, information characterizing the state of the processor at the time the exception occurred can be saved, including, for example, the current exception level at the time the exception occurred. Therefore, once an exception handler has been processed to handle the exception, processing can return to the previous processing, and the saved information can be used to identify the exception level to which the processing should return.

[0102] In addition to different exception levels, the processing circuitry supports multiple operating domains, including the root domain 82, the safe (S) domain 84, the less safe domain 86, and the domain 88. For ease of reference, the less safe domain will be described hereinafter as an “unsafe” (NS) domain, but it should be understood that this is not intended to imply any particular level of safety (or lack thereof). Rather, “unsafe” simply indicates that the unsafe domain is intended for code that is not as safe as code operating in a safe domain. The root domain 82 is selected when the processing circuitry 10 is at the highest exception level EL3. When the processing circuitry is at one of the other exception levels EL0 through EL2, the current domain is selected based on the current domain indicator 14, which indicates which of the other domains 84, 86, and 88 is active. For each of the other domains 84, 86, and 88, the processing circuitry can be at any exception level of EL0, EL1, or EL2.

[0103] At boot time, multiple fragments of boot code (e.g., BL1, BL2, OEM boot) may be executed, for example, within a higher privilege exception level EL3 or EL2. Boot code BL1 and BL2 may be associated with, for example, a root domain, and the OEM boot code may operate within a security domain. However, once the system is booted, during runtime, processing circuitry 10 can be considered to operate at one time in one of domains 82, 84, 86, and 88. Each of domains 82 through 88 is associated with its own associated physical address space (PAS), which achieves the isolation of data from different domains within at least a portion of the memory system. This will be described in more detail below.

[0104] Non-security domain 86 can be used for regular application-level processing and for operating system and hypervisor activities to manage such applications. Thus, within non-security domain 86, there can be application code 30 operating at EL0, operating system (OS) code 32 operating at EL1, and hypervisor code 34 operating at EL2.

[0105] Security domain 84 enables the isolation of certain on-chip security, media, or system services into a separate physical address space from the physical address space used for insecure processing. Non-secure domain code cannot access resources associated with security domain 84, while secure domain code can access both secure and insecure resources; in this sense, secure and insecure domains are not equivalent. An example of a system supporting this partitioning of security domain 84 and insecure domain 86 is based on Arm (…). Limited) The system architecture includes a trusted application 36 at EL0, a trusted operating system 38 at EL1, and optionally a secure partition manager 40 at EL2. If secure partitioning is supported, the secure partition manager uses stage 2 page tables to support isolation between different trusted operating systems 38 running in the secure domain 84, in a manner similar to how the hypervisor 34 manages isolation between virtual machines or guest operating systems 32 running in the non-secure domain 86.

[0106] Extending this system to support security domain 84 has become common in recent years because it enables a single hardware processor to support isolated secure processing, thus eliminating the need to execute that processing on a separate hardware processor. However, with the increasing prevalence of security domains, many real-world systems with such security domains now support relatively complex hybrid service environments offered by a wide variety of different software vendors within those domains. For example, code operating within security domain 84 may include different pieces of software provided by, among other things: silicon wafer providers that manufacture integrated circuits; original equipment manufacturers (OEMs) that assemble the integrated circuits provided by the silicon wafer providers into electronic devices such as mobile phones; operating system vendors (OSVs) that provide the operating system 32 for such devices; and / or cloud platform providers that manage cloud servers that support services for multiple different clients via the cloud.

[0107] However, there is a growing desire to provide secure computing environments for parties providing user-level code (which may typically be expected to execute as application 30 within a non-secure domain 86), environments that can be trusted not to leak information to other parties operating the code on the same physical platform. It may be desirable for such secure computing environments to be dynamically allocated at runtime and to be certified and provable, allowing users to verify adequate security guarantees on the physical platform before trusting the device to process potentially sensitive code or data. Users of such software may not want to trust a party providing a rich operating system 32 or hypervisor 34 that may typically operate in a non-secure domain 86 (or even if these providers are trusted, users may want to protect themselves from attackers who could compromise the operating system 32 or hypervisor 34). Furthermore, while a secure domain 84 can be used for such user-provided applications requiring secure processing, this can actually create problems for both users providing code that requires a secure computing environment and providers of existing code operating within a secure domain 84. For providers of existing code operating within security domain 84, adding arbitrary user-supplied code within the security domain would increase the attack surface of their code, which is likely undesirable. Therefore, it is strongly recommended that users not be allowed to add code to security domain 84. On the other hand, users providing code that requires a secure computing environment may be reluctant to trust that all providers of different fragments of code operating within security domain 84 have access to their data or code. If authentication or certification of code operating within a specific domain is required as a prerequisite for user-supplied code to perform its processing, it may be difficult to audit and authenticate all different fragments of code operating within security domain 84 provided by different software providers. This could limit opportunities for third parties to provide more secure services.

[0108] Therefore, as Figure 2 As shown, an additional domain 88 (referred to as a domain domain) is provided, which can be used by code introduced by such users to provide a secure computing environment orthogonal to any secure computing environment associated with components operating in security domain 24. Within a domain domain, the software executed may include multiple domains, each of which may be isolated from other domains by a Domain Management Module (RMM) 46 operating at exception level EL2. The RMM 46 may control the isolation between corresponding domains 42, 44 executing domain 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 the isolation between different components operating in non-security domain 86. In this example, the domains include an application-level domain 42 executing at EL0 and a packaged application / operating system domain 44 executing across exception levels EL0 and EL1. It should be understood that it is not necessary to simultaneously support domains of EL0 and EL0 / EL1 types, and multiple domains of the same type may be created by the RMM 46.

[0109] Similar to security domain 84, domain 88 has its own physical address space allocated to it. However, while domain 88 and security domain 84 can each access the non-secure PAS associated with non-secure domain 86, they cannot access each other's physical address spaces. In this sense, the domain is orthogonal to security domain 84. This means that the code executing in domain 88 and security domain 84 is independent of each other. The code in the domain only needs to trust the switching code between the hardware RMM 46 and the management domain operating in root domain 82, which makes proof and authentication more feasible. Proof enables a given piece of software to request verification that the code installed on the device matches certain expected characteristics. This can be achieved by checking whether the hash of the program code installed on the device matches an expected value signed by a trusted party using a cryptographic protocol. RMM 46 and monitoring code 29 can be verified, for example, by checking whether the hash of the software matches the expected value signed by a trusted party, such as a silicon supplier that manufactures the integrated circuits including processing system 2 or an architecture supplier that designs processor architectures that support domain-based memory access control. This allows the user-provided codes 42 and 44 to verify whether the integrity of the domain-based architecture can be trusted before performing any security or sensitive functions.

[0110] Thus, it can be seen that the code associated with domains 42 and 44 (which was previously executed in non-secure domain 86, as shown by the dashed lines indicating gaps in the non-secure domain where these processes were previously executed) can now be moved to the domain domain, where they can have stronger security guarantees because their data and code will not be accessed by other code operating in non-secure domain 86. However, the fact that domain domain 88 and secure domain 84 are orthogonal and therefore cannot see each other's physical address spaces means that the provider of the code in the domain domain does not need to trust the provider of the code in the secure domain, and vice versa. The code in the domain domain can simply trust the trusted firmware that provides the monitoring code 29 for root domain 82 and the RMM 46 provided by the silicon provider or the provider of the instruction set architecture supported by the processor (which may already be inherently needed to be trusted when the code executes on its device), so that a secure computing environment can be provided to users without further trust relationships with other operating system vendors, OEMs, or cloud hosts.

[0111] This can be used in a range of applications and use cases, including, for example, mobile wallets and payment applications, game anti-cheating and anti-piracy mechanisms, operating system platform security enhancements, secure virtual machine hosting, confidential computing, and gateway processing for networked or IoT devices. It should be understood that users can find many other applications with useful support for this domain.

[0112] To support security assurances provided to the domain, the processing system may support a proof reporting function, in which firmware images and configurations (e.g., monitoring code images and configurations or RMM code images and configurations) are measured at boot time or runtime, and domain content and configurations are measured at runtime, so that the domain owner can trace back the relevant proof reports to known implementations and certifications, thereby making a trust decision on whether to operate on the system.

[0113] like Figure 2 As shown, a separate root domain 82 is provided for managing domain switching, and this root domain has its own isolated root physical address space. Even for systems with only non-secure domains 86 and secure domains 84 but no domain 88, the creation of the root domain and the isolation of its resources from the secure domains allows for a more robust implementation, but it can also be used in implementations that do not support domain 88. Root domain 82 can be implemented using monitoring software 29 provided (or certified) by the silicon provider or architect, and can be used to provide secure boot functionality, trusted boot measurement, on-chip system configuration, debug control, and management of firmware updates for firmware components provided by other parties (such as OEMs). Root domain code can be developed, certified, and deployed by the silicon provider or architect without relying on the final device. In contrast, secure domain 84 can be managed by the OEM to implement certain platform and security services. The management of non-secure domain 86 can be controlled by operating system 32 to provide operating system services, while domain 88 allows for the development of new forms of trusted execution environments that can be dedicated to user or third-party applications while being isolated from the existing security software environment in secure domain 84.

[0114] Figure 3 Another example of a processing system 2 used to support these technologies is schematically shown. (Using the same reference numerals, it is shown alongside...) Figure 1 The same components. Figure 3The address translation circuit 16 is shown in more detail, comprising a Stage 1 memory management unit 50 and a Stage 2 memory management unit 52. The Stage 1 MMU 50 is responsible for translating virtual addresses to physical addresses (when the translation is triggered by EL2 or EL3 code) or to intermediate addresses (when the translation is triggered by EL0 or EL1 code in a certain operating state, in which further Stage 2 translation by the Stage 2 MMU 52 is required). The Stage 2 MMU can translate intermediate addresses to physical addresses. The Stage 1 MMU can be based on a page table controlled by the operating system for translations initiated from EL0 or EL1, a page table controlled by the hypervisor for translations from EL2, or a page table controlled by the monitoring code 29 for translations from EL3. On the other hand, the Stage 2 MMU 52 can be based on a page table structure defined by the hypervisor 34, RMM 46, or security partition manager 14, depending on which domain is used. Dividing these translations into two phases in this way allows the operating system to manage address translation for itself and applications (assuming they are the only operating system running on the system), while RMM 46, Hypervisor 34, or SPM40 can manage isolation between different operating systems running in the same domain.

[0115] like Figure 3 As shown, the address translation process using address translation circuit 16 returns a security attribute 54, which, combined with the current exception level 15 and the current domain 14 (or security state), allows access to a specific portion of the physical address space (identified by the PAS identifier or "PAS TAG") in response to a given memory access request. The physical address and PAS identifier can be looked up in the particle protection table 56, which provides the previously described particle protection information. In this example, PAS filter 20 is shown as a particle-shaped memory protection unit (GMPU) that verifies whether the physical address of the selected PAS access request is allowed; if so, the transaction is allowed to proceed to any cache 24 or interconnect 8 that is part of the system architecture of the memory system.

[0116] The GMPU 20 allows memory to be allocated to separate address spaces while providing strong hardware-based isolation guarantees and offering spatial and temporal flexibility as well as efficient sharing schemes in terms of how physical memory is allocated to these address spaces. As previously described, execution units in the system are logically partitioned into virtual execution states (domains or "worlds"), with one execution state (root world) located at the highest exception level (EL3), which is called the "root world" and manages the allocation of physical memory to these worlds.

[0117] A single system physical address space is virtualized into multiple "logical" or "architectural" physical address spaces (PASs), each of which is an orthogonal address space with independent consistency properties. The system physical address is mapped to a single "logical" physical address space by extending the system physical address with a PAS label.

[0118] Allowing a subset of the logical-physical address space to be accessed in a given world. This is implemented by hardware filter 20, which can be attached to the output of memory management unit 16.

[0119] The world uses fields in the translation table descriptor of the page table used for address translation to define the security attributes (PAS tags) for that access. Hardware filter 20 has access rights to a table (granular protection table 56 or GPT) that defines granular protection information (GPI) for each page in the system's physical address space, which indicates the associated PAS tag and (optionally) other granular protection attributes.

[0120] Hardware filter 20 checks the world ID and security attributes against the particle's GPI and determines whether access can be granted, thereby forming a particle memory protection unit (GMPU).

[0121] For example, GPT 56 can reside in on-chip SRAM or off-chip DRAM. If stored off-chip, GPT 56 can be protected for integrity by an on-chip memory protection engine that uses encryption, integrity, and freshness mechanisms to maintain the security of GPT 56.

[0122] Positioning GMPU 20 on the requester side of the system (e.g., on the MMU output) instead of the completer side allows for page-level access permission allocation, while allowing interconnect 8 to continue hashing / stripping the page across multiple DRAM ports.

[0123] Transactions remain tagged with the PAS tag because they propagate throughout the system architecture 24,8 until they reach a location defined as a physical alias point 60. This allows filters to be positioned on the master side without compromising security guarantees compared to slave-side filtering. Because the transaction propagates throughout the system, the PAS tag can be used as a security-in-depth mechanism for address isolation: for example, a cache can add a PAS tag to an address label in the cache, preventing accesses to the same PA with an incorrect PAS tag from hitting the cache and thus improving resistance to side-channel attacks. The PAS tag can also be used as a context selector for a protection engine attached to the memory controller, which encrypts data before writing it to external DRAM.

[0124] A Physical Alias ​​Point (PoPA) is the location in the system where the PAS tag is stripped and the address is translated from a logical physical address back to a system physical address. The PoPA can be located on the system's completer side below the cache, where physical DRAM is accessed (using the cryptographic context resolved by the PASTAG). Alternatively, it can be located above the cache to simplify system implementation at the cost of reduced security.

[0125] At any point in time, the world can request a page transition from one PAS to another. This request is made to monitoring code 29 at EL3, which checks the current state of the GPI. EL3 may allow only specific groups of transitions 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 transition, the system supports a new instruction – “Data Cleanup and Invalidate to Physical Alias ​​Point” – which EL3 can submit before transitioning a page to a new PAS. This ensures that any residual state associated with the previous PAS is flushed from any cache upstream of PoPA 60 (closer to the requester side than PoPA 60).

[0126] Another feature achievable by attaching the GMPU 20 to the host side is efficient memory sharing between worlds. It might be desirable to grant shared access to a physical particle to a subset of N worlds, while preventing other worlds from accessing that physical particle. This can be achieved by adding "restricted sharing" semantics to the particle's protection information, while forcing it to use a specific PAS tag. As an example, the GPI could indicate that a physical particle can only be accessed by "Domain World" 88 and "Secure World" 84, while being tagged with the PAS tag of "Secure PAS" 84.

[0127] An example of the aforementioned characteristics is the ability to rapidly change the visibility properties of specific physical particles. Consider the case where each world is allocated a dedicated PAS that is only accessible to that world. For a specific particle, that world can request to make it visible to the insecure world at any point in time by changing its GPI from "exclusive" to "restricted sharing with the insecure world," without altering the PAS association. This increases the particle's visibility without requiring costly cache maintenance or data copying operations.

[0128] Figure 4 The concept of aliases on physical memory provided to the hardware by the corresponding physical address space is illustrated. As previously described, each of the domains 82, 84, 86, and 88 has its own corresponding physical address space 61.

[0129] At the point when the address translation circuit 16 generates the physical address, the physical address has a value within a certain range 62 supported by the system, which is the same regardless of which physical address space is selected. However, in addition to generating the physical address, the address translation circuit 16 can also select a specific physical address space (PAS) based on the current domain 14 and / or information in the page table entries used to derive the physical address. Alternatively, instead of the address translation circuit 16 performing the selection of the PAS, an address translation circuit (e.g., MMU) can output the physical address and information derived from the page table entries (PTE) for selecting the PAS, which the PAS filter or GMPU 20 can then use to select the PAS.

[0130] The selection of PAS for a given memory access request can be restricted according to the rules defined in the table below, based on the current domain that the processing circuit 10 is operating on when issuing the memory access request:

[0131] Current domain Non-safe PAS Security PAS Domain PAS Root PAS Unsafe Accessible Inaccessible Inaccessible Inaccessible Safety Accessible Accessible Inaccessible Inaccessible field Accessible Inaccessible Accessible Inaccessible root Accessible Accessible Accessible Accessible

[0132] For those domains where multiple physical address spaces are available, information from page table entries used to provide access to physical addresses is used to select among the available PAS options.

[0133] Thus, at the point in time when the PAS filter 20 outputs the memory access request to system architectures 24, 8 (assuming it passes any filtering checks), the memory access request is associated with the physical address (PA) and the selected physical address space (PAS).

[0134] From the perspective of memory system components (such as caches, interconnects, snooping filters, etc.) operating prior to the Physical Alias ​​Point (PoPA) 60, the corresponding physical address space 61 is viewed as a completely separate address range corresponding to different system locations within memory. This means that, from the perspective of the pre-PoPA memory system components, the address range identified by a memory access request is actually four times the size of the range 62 that can be output in address translation, because the PAS identifier is actually treated as an additional address bit next to the physical address itself, so that the same physical address PAx can be mapped to multiple alias physical addresses 63 in different physical address spaces 61 depending on which PAS is selected. These alias physical addresses 63 all actually correspond to the same memory system location implemented in the physical hardware, but the pre-PoPA memory system components treat the alias address 63 as a separate address. Thus, if any pre-PoPA cache or snooping filter exists to allocate entries for such addresses, the alias address 63 will be mapped to a different entry with separate cache hit / miss decisions and separate consistency management. This reduces the likelihood or effectiveness of an attacker using a cache or consistency side channel as a mechanism to probe operations in other domains.

[0135] The system may include more than one PoPA 60 (e.g., as discussed below). Figure 14 (As shown in the diagram). At each PoPA 60, the aliased physical address is shrunk to a single de-aliased address 65 in the system physical address space 64. The de-aliased address 65 is provided downstream of any subsequent PoPA component so that the system physical address space 64, which actually identifies the memory system location, is once 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, at PoPA 60, the PAS identifier can be stripped from these addresses, and for downstream components, these addresses can simply be identified using the physical address values ​​without specifying the PAS. Alternatively, for some cases where some completer-side filtering is expected for memory access requests, the PAS identifier may still be provided downstream of PoPA 60, but may not be interpreted as part of the address, so that the same physical address appearing in different physical address spaces 60 will be interpreted downstream of the PoPA as involving the same memory system location, but the supplied PAS identifier can still be used to perform any completer-side security checks.

[0136] Figure 5 This illustrates how the granular protection table 56 can be used to divide the system physical address space 64 into blocks of access allocations within a specific architecture physical address space 61. The granular protection table (GPT) 56 defines which portions of the system physical address space 65 are allowed to be accessed from each architecture physical address space 61. For example, the GPT 56 may include multiple entries, each corresponding to a physical address granule of a certain size (e.g., 4K pages), and may be defined as the PAS allocated to that granule, which can be selected from non-secure domains, secure domains, domains, and root domains. By design, if a particular granule or group of granules is allocated to a PAS associated with one of these domains, it can only be accessed within the PAS associated with that domain and not within PASs of other domains. However, it should be noted that while granules allocated to secure PASs (for example) cannot be accessed from within the root PAS, the root domain 82 can access the physical address granule by specifying PAS selection information in its page table to ensure that the virtual address associated with a page in that region of physically addressed memory is translated into a physical address in the secure PAS (not the root PAS). Thus, the sharing of data across domains can be controlled at the point in time when a PAS is selected for a given memory access request (to the extent permitted by the accessibility / inaccessibility rules defined in the previously described table).

[0137] However, in some specific implementations, in addition to allowing access to physical address particles within the allocated PAS defined by the GPT, the GPT can also use other GPT attributes to mark certain regions of the address space as shared with another address space (e.g., an address space associated with a domain with lower or orthogonal privileges (which typically does not allow it to select an allocated PAS for access requests to that domain)). This facilitates temporary sharing of data without requiring changes to the allocated PAS of a given particle. For example, in Figure 5 In the GPT, region 70 of the domain PAS is defined as being allocated to the domain domain and therefore is normally inaccessible 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, non-secure code typically cannot see the data in region 70. However, if a domain temporarily wishes to share some data in its allocated region of memory with the non-secure domain, it can request the monitoring code 29 operating in the root domain 82 to update GPT 56 to indicate that region 70 will be shared with the non-secure domain 86, and this allows region 70 to also be accessed from the non-secure domain 86. Figure 5 The left-hand side shows the non-secure PAS access, without needing to change which domain is the domain allocated to region 70. If a domain has designated a region of its address space to be shared with a non-secure domain, then although a memory access request originating from the non-secure domain targeting that region may initially specify a non-secure PAS, the PAS filter 20 can remap the PAS identifier of the request to instead specify a domain PAS, so that downstream memory system components treat the request as always originating from the domain domain. This sharing can improve performance because the operations used to allocate different domains to specific memory regions can be more performance-intensive, involving a greater degree of cache / TLB invalidation and / or data zeroing in memory or data copying between memory regions (which can be undesirable if the sharing is expected to be only temporary).

[0138] Figure 6 This is a flowchart illustrating how the current operating domain is determined, which can be performed by processing circuitry 10 or by address translation circuitry 16 or PAS filter 20. At step 100, it is determined whether the current exception level 15 is EL3. If so, at step 102, the current domain is determined to be the root domain 82. If the current exception level is not EL3, at step 104, the current domain is determined to be one of the non-secure domain 86, secure domain 84, and neighborhood domain 88, as indicated by at least two domain indicator bits 14 in the processor's EL3 control register (since the root domain is indicated by the current exception level as EL3, it may not be necessary to have an encoding of the domain indicator bits 14 corresponding to the root domain; therefore, at least one encoding of the domain indicator bits can be reserved for other purposes). The EL3 control register can be written to when operating at EL3 and cannot be written to from other exception levels EL2-EL0.

[0139] Figure 7 An example of a Page Table Entry (PTE) format is shown that can be used for page table entries in a page table structure. These page table entries are used by address translation circuitry 16 to map virtual addresses to physical addresses, virtual addresses to intermediate addresses, or intermediate addresses to physical addresses (depending on whether the translation is performed in an operational state where a stage 2 translation is fully required, and whether the translation is a stage 1 translation or a stage 2 translation if a stage 2 translation is required). In general, a given page table structure can be defined as a multi-level table structure implemented as a page table tree, where the first level of the page table is identified based on a base address stored in the processor's translation table base address register, and an index for selecting a specific level 1 page table entry within the page table is derived from a subset of bits of the input address to which a translation lookup is performed (the input address can be a virtual address for stage 1 translation or an intermediate address for stage 2 translation). A level 1 page table entry can be a "table descriptor" 110 that provides a pointer 112 to the next level page table, from which further page table entries can be selected based on a further subset of bits of the input address. Finally, after one or more lookups at consecutive levels of the page table, block or page descriptors PTE 114, 116, and 118 are identified, which provide an output address 120 corresponding to the input address. The output address can be an intermediate address (for a Stage 1 transition performed while still in the operation state of performing a further Stage 2 transition) or a physical address (for a Stage 2 transition or a Stage 1 transition when Stage 2 is not required).

[0140] To support the different physical address spaces mentioned 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 block of memory, the page table entry format also specifies some additional states for physical address space selection.

[0141] For page table descriptor 110, the PTE used by any domain other than the non-secure domain 86 includes a non-secure table indicator 124, which indicates whether 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 facilitates more efficient management of page tables. Typically, the page table structure used by the root domain, domain domain, or secure domain 24 may only need to define special page table entries for a portion of the virtual address space, and for other portions, the same page table entries used by the non-secure domain 26 can be used. Therefore, by providing the non-secure table indicator 124, this allows higher levels of the page table structure to provide dedicated domain / secure table descriptors, while at certain points in the page table tree, the root domain or secure domain can switch to using page table entries from the non-secure domain for portions of the address space that do not require higher security. Other page table descriptors in other parts of the page table tree can still be obtained from the associated physical address space associated with the root domain, domain domain, or secure domain.

[0142] On the other hand, block / page descriptors 114, 116, and 118 may include physical address space selection information 126 depending on which domain they are associated with. The insecure block / page descriptor 118 used in the insecure domain 86 does not include any PAS selection information because the insecure domain can only access insecure PASs. However, for other domains, block / page descriptors 114 and 116 include PAS selection information 126, which is used to select which PAS to translate the input address to. For the root domain 22, EL3 page table entries may have PAS selection information 126, which includes at least two bits to indicate the selected PAS to which the corresponding physical address will be translated when the PAS associated with any of the four domains 82, 84, 86, and 88 is associated. In contrast, for both the domain and security domains, the corresponding block / page descriptor 116 only needs to include one bit of PAS selection information 126, which selects between the domain PAS and non-security PAS for the domain domain, and between the security PAS and non-security PAS for the security domain. To improve circuit implementation efficiency and avoid increasing the size of page table entries, the block / page descriptor 116 can encode the PAS selection information 126 at the same location within the PTE for both the domain and security domains, regardless of whether the current domain is the domain or the security domain, so that the PAS selection bit 126 can be shared.

[0143] thereby, Figure 8This is a flowchart illustrating a method for selecting the PAS based on the current domain and information 124, 126 from the block / page PTE for generating a physical address for a given memory access request. PAS selection can be performed by address translation circuit 16, or by a combination of address translation circuit 16 and PAS filter 20 if the address translation circuit forwards PAS selection information 126 to PAS filter 20.

[0144] exist Figure 8 At step 130, processing circuit 10 issues a memory access request specifying a given virtual address (VA) as the target VA. At step 132, address translation circuit 16 searches its TLB 18 for any page table entries (or cached information derived from such page table entries). If any required page table information is unavailable, address translation circuit 16 initiates a page table roaming to memory to obtain the required PTE (potentially requiring a series of memory accesses to progressively traverse the corresponding levels of the page table structure, and / or potentially requiring multiple stages of address translation to obtain a mapping from VA to intermediate address (IPA) and then from IPA to PA). It should be noted that any memory access request issued by address translation circuit 16 during the page table roaming operation may itself undergo address translation and PAS filtering, so the request received at 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). At step 134, address translation circuit 16 or PAS filter 20 uses Figure 6 The method shown is used to determine which domain is the current domain.

[0145] If the current domain is a non-secure domain, then at step 136, the output PAS selected for the memory access request is a non-secure PAS.

[0146] If the current domain is a secure domain, then at step 138, an output PAS is selected based on PAS selection information 126, which provides the physical address and is included in the block / page descriptor PTE, wherein the output PAS will be selected as a secure PAS or a non-secure PAS.

[0147] If the current domain is a domain domain, then at step 140, an output PAS is selected based on PAS selection information 126 included in the block / page descriptor PTE from its derived physical address, and in this case, the output PAS is selected as a domain PAS or a non-secure PAS.

[0148] If the current domain is determined to be the root domain at step 134, then at step 142, the output PAS is selected based on the PAS selection information 126 from which the physical address is derived in the root block / page descriptor PTE 114. In this case, the output PAS is selected as any physical address space in the physical address space associated with the root domain, the domain, the security domain, and the non-security domain.

[0149] Figure 9 An example of an entry for GPT 56 for a given physical address particle is shown. GPT entry 150 includes an assigned PAS identifier 152 that identifies the PAS allocated to the physical address particle, and optionally includes further attributes 154, which may include, for example, the previously described shared attribute information 156 that makes the physical address particle visible in one or more other PASs besides the assigned PAS. The root domain can perform the setting of the shared attribute information 156 when code running in the domain associated with the assigned PAS issues a request. Additionally, the attributes may include a pass-through indicator field 158 that indicates whether a GPT check (for determining whether the selected PAS of the memory access request is allowed to access the physical address particle) should be performed by the PAS filter 20 on the requester side or by the completer-side filtering circuitry on the completer device side of the interconnect, as will be discussed further below. If the pass-through indicator 158 has a first value, a requester-side filtering check may be required at the PAS filter 20 on the requester side, and if these checks fail, the memory access request can be blocked and a fault signal can be sent. However, if the pass-through indicator 158 has a second value, a requester-side filtering check based on GPT 56 may not be required for a memory access request specifying a physical address in the physical address particle corresponding to the GPT entry 150, and in this case, the memory access request can be passed all the way to cache 24 or interconnect 8 without checking whether the selected PAS is one of the allowed PAS that allows access to the physical address particle, and any such PAS filtering check will be performed later on the completer side.

[0150] Figure 10 This is a flowchart illustrating a requester-side PAS filter check performed by PAS filter 20 at the requester side of interconnect 8. At step 170, PAS filter 20 receives a memory access request, which includes a physical address and other parameters as previously described. Figure 8 The output PAS is associated as shown in the diagram.

[0151] At step 172, the PAS filter 20 either obtains the GPT entry corresponding to the specified PA from the particle protection information cache 22 (if available), or obtains the GPT entry by issuing a request to memory to obtain the required GPT entry from a table structure stored in memory. Once the required GPT entry has been obtained, at step 174, the PAS filter determines whether the output PAS selected for the memory access request is the same as the allocated PAS 152 defined in the GPT entry obtained at step 172. If so, at step 176, the memory access request (specifying the PA and the output PAS) can be allowed to pass to cache 24 or interconnect 8.

[0152] If the output PAS is not an allocated PAS, then at step 178, the PAS filter determines whether the output PAS is indicated in the shared attribute information 156 from the acquired GPT entry as a permitted PAS allowing access to the address granular corresponding to the specified PA. If so, then again at step 176, the memory access request is allowed to be passed to cache 24 or interconnect 8. The shared attribute information may be encoded as unique bits (or sets of bits) within GPT entry 150, or may be encoded as one or more codes of a field of GPT entry 150, in which case other codes of the same field may indicate other information. If step 178 determines that the shared attribute indicates that an output PAS other than an allocated PAS is allowed to access the PA, then at step 176, the PAS specified in the memory access request passed to cache 24 or interconnect 8 is an allocated PAS, not an output PAS. The PAS filter 20 transforms the PAS specified by the memory access request to match the allocated PAS, so that downstream memory system components treat it as the same as the request for the specified allocated PAS.

[0153] If the output PAS does not indicate that access to the specified physical address is permitted in the shared attribute information 156 (or alternatively, in implementations that do not support shared attribute information 156, step 178 is skipped), then at step 180, it is determined whether the pass-through indicator 158 in the obtained GPT entry for the target physical address identifies that the memory access request can be passed all the way to cache 24 or interconnect 8, regardless of the check performed at the requester-side PAS filter 20, and if a pass-through indicator is specified, then the memory access request is again permitted at step 176 (by specifying the output PAS as the PAS associated with the memory access request). Alternatively, if none of the checks in steps 174, 178, and 180 identify that the memory access request is permitted, then the memory access request is blocked at step 182. Thus, the memory access request is not passed to cache 24 or interconnect 8, and a fault can be signaled, which can trigger exception handling to address the fault.

[0154] Although steps 174, 178, and 180 are in Figure 10 These steps are shown sequentially, but may be implemented in parallel or in a different order if needed. It should also be understood that steps 178 and 180 are not necessary and some specific implementations may not support the use of shared attribute information 156 and / or pass-through indicator 158.

[0155] Figure 11 The operation of the address translation circuit 16 and the PAS filter is summarized. The PAS filter 20 can be viewed as an additional stage 3 check performed after the stage 1 (and optionally stage 2) address translation performed by the address translation circuit. It should also be noted that the EL3 translation is based on page table entries, which provide two bits of address-based selection information (in...). Figure 11 In the example, it is marked as NS, NSE), while the selection information "NS" is used to select PAS in other states. Figure 11 The safety status indicated by the input for particle protection check refers to the domain ID of the current domain of the identification processing element 4.

[0156] Figure 12 This is a flowchart illustrating the processing of the Stage 3 lookup cache invalidation instruction, which can be triggered by monitoring code 29 operating in root domain 82 to invalidate any lookup cache entry that depends on the GPT entry associated with a specific physical address. This can be useful when the root domain changes the allocation of a given system PA to which physical address space it is assigned, so that any lookup cache 22 will not retain expiration information.

[0157] Therefore, in step 200, the processing circuitry 10 within the given processing element (requester device) 4 can execute stage 3 to look up a cache invalid instruction. This instruction specifies a physical address.

[0158] In step 202, in response to the Phase 3 cache invalidation lookup instruction, the processing circuit 10 can check if the current exception level is EL3, and if not, it can reject the instruction and / or signal an exception (such as an undefined instruction exception) in step 204. This restricts the execution of the Phase 3 cache invalidation lookup instruction to the monitoring code 29 associated with the root domain, preventing malicious parties from triggering performance penalties by invalidating granular protection information from the lookup cache 22, such as that triggered by other exception levels.

[0159] If the current exception level is EL3, then in step 206, in response to the instruction executed in step 200, the processing element issues at least one lookup cache invalidation command, which is sent to any lookup cache 18, 22, which may contain information depending on granular protection table entries associated with the physical address identified by the instruction. These caches may include, but are not limited to, entries such as... Figure 1 The illustrated granular protection information cache 22 may, in some embodiments, include a combined TLB / granular protection cache that combines information from the page table structure and GPT into a single entry. For such a combined TLB / GPT cache, the combined cache may require the ability to look up information via both virtual and physical addresses.

[0160] In step 208, in response to the issued command, GPT cache 22 or the combined TLB / GPT cache invalidates any entry that depends on particle protection information from a GPT entry associated with a physical address particle corresponding to the physical address specified by the lookup cache invalidation command.

[0161] Since cache entries within the memory system can be marked with the identification of the associated PAS of those caches preceding the PoPA, if root domain code 29 changes which PAS is associated with a certain granularity of physical address by updating GPT 56, data cached in the pre-PoPA cache can still exist, marked with the erroneous PAS of the granularity of physical address. To prevent subsequent accesses after a GPT update hits a cache entry that should no longer be accessible to the requested domain, it may be useful to provide an instruction that ensures any cache entry associated with a particular physical address is invalidated in any cache preceding PoPA 60. This instruction could be different from other types of cache invalidation instructions that can operate on caches within different subsets of the memory system (such as caches preceding the coherence point or caches local to a specific processing element). Thus, processing circuitry can support cache invalidation to PoPA instructions that differentiate based on the range of invalidations observed in the caches in the system, corresponding to a portion of the memory system upstream of the PoPA. That is, for this instruction, PoPA is a limitation on the extent of invalidation that the cache must observe.

[0162] Figure 13 This is a flowchart illustrating the processing of a cache invalidation to PoPA instruction. In step 220, the processing circuitry 10 of the given requester device 4 executes a cache invalidation to PoPA instruction. This instruction specifies a virtual address, and in step 222, this virtual address is mapped to a physical address. However, in some cases, with Figure 12The instructions shown are similar, and execution of instructions to invalidate caches up to PoPA can be restricted to execution only in EL3. In step 224, the processing element executing the instructions issues invalidation commands specifying physical addresses, which are sent to any pre-PoPA cache 24 within the system. This can include caches upstream of PoPA not only within requester device 4, but also within interconnect 8 or in other requester devices 4 or other memory system components, located at points within separate ranges that treat different physical address spaces 61 as addressed memory locations.

[0163] The cache invalidation to PoPA instruction can, in some cases, be a "clean and invalid" form of instruction that not only requests the data associated with the specified PA to be invalidated from the previous PoPA cache, but also requests that the data be cleaned up by writing any dirty data back to a location outside of PoPA 60 before invalidation. Therefore, in step 226, if the instruction is in the clean and invalid form, the previous PoPA cache receiving the command triggers a write-back of dirty data from any entry associated with the specified physical address. This data can be written to a cache outside of PoPA or main memory. If the instruction is not in the clean and invalid form, or if the clean and invalid form of the instruction is not supported, step 226 can be omitted, and the method can proceed directly to step 228, which will also be executed if step 226 is performed. In step 228, the previous PoPA cache receiving the command in step 224 invalidates the entries associated with their specified physical addresses. Cache entries associated with the specified physical addresses are invalidated, regardless of which PAS tag is associated with those entries.

[0164] Therefore, the cache invalidation to PoPA instruction can be used to ensure that the cache does not continue to mark entries associated with a given physical address with incorrect PAS identifiers after the GPT is updated.

[0165] Figure 14 A more detailed example of a data processing system that can implement some of the techniques described above is shown. The same components as in the previous examples are shown using the same reference numerals. Figure 14 In the example, processing element 4 is shown in more detail, including cache 24 comprising a level 1 instruction cache, a level 1 data cache, a level 2 cache, and a shared level 3 cache 24 optionally shared among processing elements, in addition to processing circuitry 10, address translation circuitry 16, TLB 18, and PAS filter 20. Interrupt controller 300 can control the handling of interrupts by each processing element.

[0166] like Figure 14As shown, the processing element 4, capable of executing program instructions to trigger memory access, is not the only type of requesting device that can provide a requester-side PAS filter 20. In other examples, the system MMU 310 (which is provided to provide address translation functionality for requesting devices 312, 314 that do not support their own address translation capabilities, such as on-chip devices 312 (e.g., network interface controllers or display controllers), or off-chip devices 314 that can communicate with the system via a bus) can provide a PAS filter 20 to perform the same requester-side check of GPT entries as the PAS filter 20 in the processing element 4. Other requesting devices may include a debug access port 316 and a control processor 318, which may again have a PAS filter 20 associated with them to check whether memory access to a specific physical address space issued by requesting devices 316, 318 is permitted given a PAS allocation defined in GPT 56.

[0167] Interconnect 8 in Figure 14 The diagram, shown in more detail as a consistency interconnect 8, and the routing structure 320, also includes a snoop filter 322 for managing consistency between caches 24 in the various processing elements, and one or more system caches 324 that can perform caching of shared data shared between requesting devices. The snoop filter 322 and system caches 324 may be upstream of the PoPA 60 and therefore their entries can be labeled using a PAS identifier selected by the MMUs 16, 310 for a particular master device. By default, it can be assumed that requesting devices 316, 318 not associated with the MMU always issue requests for specific domains, such as non-secure domains (or root domains, if they are trusted).

[0168] Figure 14 A memory protection engine (MPE) 330 is shown as another example of a pre-PoPA component. This pre-PoPA component treats aliased physical addresses in each PAS as referencing different address locations. The memory protection engine is provided between interconnect 8 and a given memory controller 6 to control access to off-chip memory 340. MPE 330 can be responsible for encrypting data written to off-chip memory 340 to maintain confidentiality and decrypting the data upon readback. Furthermore, by generating integrity metadata when writing data to memory and using the metadata to verify whether the data has been altered when reading data back from off-chip memory, MPE can prevent tampering with data stored in off-chip memory. When encrypting data or generating hashes for memory integrity, different keys can be used depending on the physical address space being accessed, even if the access actually corresponds to an aliased physical address in off-chip memory 340. This enhances security by further separating data associated with different operational domains.

[0169] In this example, PoPA 60 is located between memory protection engine 330 and memory controller 6, such that when a request reaches memory controller 6, physical addresses are no longer considered as different physical locations mapped to memory 340, depending on the physical address space they are accessing.

[0170] Figure 14 Another example of the completer device 6 is shown, which can be a peripheral bus or non-uniform interconnect for communicating with a region of peripheral device 350 or on-chip memory 360 (e.g., implemented as static random access memory (SRAM)). Furthermore, the peripheral bus or non-uniform interconnect 6 can be used to communicate with security elements 370 (e.g., a cryptographic unit for performing cryptographic processing, a random number generator 372, or certain fuses 374 storing static hardwired information). Various power / reset / debug controllers 380 can also be accessed via the peripheral bus or non-uniform interconnect 6.

[0171] For the on-chip SRAM 360, providing a slave-side (completer-side) PAS filter 400 may be useful. This filter can perform completer-side filtering of memory accesses based on completer-side protection information that defines which physical address spaces are allowed to access a given physical address block. This completer-side information can be defined more coarsely than the GPT used by the requester-side PAS filter 20. For example, the slave-side information could simply indicate that an entire SRAM cell 361 can be dedicated to use by the neighborhood domain, another SRAM cell 362 can be dedicated to use by the root domain, and so on for other domains. Therefore, relatively coarsely defined physical address blocks can point to different SRAM cells. This completer-side protection information can be statically defined by bootloader code that loads the information into the completer-side PAS filter at boot time, which cannot be changed at runtime. Therefore, it is less flexible than the GPT used by the requester-side PAS filter 20. However, for use cases where the partitioning of physical addresses into specific regions accessible to each domain is known at boot time and will not change, and fine-grained partitioning is not required, using the slave-side PAS filter 400 instead of the requester-side PAS filter 20 may be more efficient. This is because it allows the power and performance costs of obtaining GPT entries and comparing the allocated PAS and shared attribute information with the information of the current memory access request to be eliminated on the requester side. Furthermore, if the pass-through indicator 158 can be indicated in the top-level GPT entry in the multi-level GPT structure (or in other table descriptor entries at a level other than the final level), access to other levels of the GPT structure (which could be performed to find finer-grained information about the allocated PAS so that the request can be accepted by the requester-side check) can be avoided for requests targeting a region of physical address mapped to the on-chip memory 360 managed by the completer-side PAS filter 400.

[0172] Therefore, supporting a hybrid approach that enables both the requester and completer sides to inspect protection information is useful for improving performance and power efficiency. System designers can define which approach should be used for specific regions of memory.

[0173] Figure 15A specific implementation of a usable simulator is illustrated. While the previously described embodiments implement the invention in terms of means and methods for operating specific processing hardware supporting the technologies involved, an instruction execution environment according to the embodiments described herein can also be provided, which is implemented using a computer program. Such computer programs are generally referred to as simulators, in part because they provide a software-based implementation of a hardware architecture. Types of simulator computer programs include emulators, virtual machines, models, and binary converters, including dynamic binary converters. Typically, the simulator implementation can run on a host processor 430 supporting the simulator program 410, which optionally runs a host operating system 420. In some arrangements, multiple emulation layers may exist between the hardware and the provided instruction execution environment and / or multiple different instruction execution environments provided on the same host processor. Historically, powerful processors were required to provide simulator implementations that execute at a reasonable speed, but this approach may be reasonable in certain situations, such as when it is desirable to run code native to another processor for compatibility or reuse reasons. For example, the simulator implementation may provide additional functionality to the instruction execution environment that is not supported by the host processor hardware, or provide an instruction execution environment that is typically associated with a different hardware architecture. An overview of the simulation is given in the following literature: “Some Efficient Architecture Simulation Techniques”, Robert Bedichek, Winter 1990 USENIX Conference, pp. 53-63.

[0174] With respect to embodiments previously described with reference to specific hardware constructions or features, in simulated embodiments, equivalent functionality may be provided by suitable software constructions or features. For example, specific circuitry may be implemented as computer program logic in simulated embodiments. Similarly, memory hardware such as registers or cache memory may be implemented as software data structures in simulated embodiments. One or more hardware elements referenced in the previously described embodiments are present in an arrangement on host hardware (e.g., host processor 430), and where appropriate, some simulated embodiments may utilize the host hardware.

[0175] The simulator program 410 may be stored on a computer-readable storage medium (which may be a non-transitory medium) and provides a program interface (instruction execution environment) to the target code 400 (which may include applications, operating systems, and management programs), the same as the interface of the hardware architecture modeled by the simulator program 410. Therefore, the simulator program 410 can be used to execute the program instructions of the target code 400 from within the instruction execution environment, enabling the host computer 430, which does not actually possess the hardware features of device 2 discussed above, to emulate these features. This is useful, for example, for allowing testing of the target code 400 being developed for a new version of the processor architecture before a hardware device that actually supports the architecture is available, since the target code can be tested by running it within a simulator executed on a host device that does not support the architecture.

[0176] The simulator code includes processing program logic 412 that simulates the behavior of processing circuitry 10. For example, it includes instruction decoding program logic that decodes the instructions of target code 400 and maps them to corresponding instruction sequences in the native instruction set supported by host hardware 430 to perform functions equivalent to the decoded instructions. Processing program logic 412 also simulates the processing of code in different exception levels and domains as described above. Register emulation program logic 413 maintains data structures in the host processor's host address space, emulating the architecture register states defined according to the target instruction set architecture associated with target code 400. Therefore, it is not as... Figure 1 Instead of storing this architectural state in hardware register 12 as in the example, it is stored in the memory of the host processor 430, where register emulation program logic 413 maps register references of the instructions of the target code 400 to the corresponding addresses to obtain the simulated architectural state data from the host memory. This architectural state may include the previously described current domain indicator 14 and current exception level indicator 15.

[0177] The simulation code includes address translation logic 414 and filtering logic 416, which respectively reference the same page table structure as described above and the functionality of the GPT 56 emulated address translation circuit 16 and PAS filter 20. Therefore, address translation logic 414 translates the virtual address specified by target code 400 into a simulated physical address in one of the PAS (from the target code's perspective, it refers to a physical location in memory), but in reality, these simulated physical addresses are mapped to the host processor's (virtual) address space by address space mapping logic 415. Filtering logic 416 performs a lookup of particle protection information in the same manner as the PAS filter described above to determine whether memory access triggered by the target code is allowed to proceed.

[0178] Other examples are illustrated in the following clauses:

[0179] (1) An apparatus comprising: an address translation circuit for translating a target virtual address specified by a memory access request issued by a requester circuit into a target physical address; and a requester-side filtering circuit for performing a granular protection lookup based on the target physical address and a selected physical address space associated with the memory access request to determine whether to pass the memory access request via an interconnect to a completer device for servicing the memory access request, wherein the selected physical address space is one of a plurality of physical address spaces; wherein: in the granular protection lookup, the requester-side filtering circuit is configured to: obtain granular protection information corresponding to a target granule including the target physical address, the granular protection information indicating at least one allowed physical address space associated with the target granule; and block the memory access request when the granular protection information indicates that the selected physical address space is not one of the at least one allowed physical address space.

[0180] (2) The apparatus according to clause (1), wherein the particle protection information specifies an allocated physical address space for the target particle to which the physical address is assigned; and the at least one allowed physical address space includes at least the allocated physical address space.

[0181] (3) The apparatus according to clause (2), wherein the particle protection information further includes shared attribute information indicating whether at least one other physical address space besides the allocated physical address space is one of the at least one allowed physical address spaces.

[0182] (4) The apparatus according to clause (3), wherein when the particle protection lookup determines that the selected physical address space is a physical address space other than the allocated physical address space of one of the at least one allowed physical address spaces indicated by the shared attribute information, the requester-side filtering circuit is configured to allow the memory access request to be passed to a cache or interconnect that specifies the allocated physical address space instead of the selected physical address space.

[0183] (5) The apparatus according to any of the preceding clauses, wherein the requester-side filtering circuit is configured to perform the particle protection lookup in at least one lookup cache configured to cache the particle protection information.

[0184] (6) The apparatus according to clause (5), wherein the at least one lookup cache is configured to store at least one combination of translation-granular protection entry specification information, the at least one combination of translation-granular protection entry specification information depending on the granular protection information and at least one page table entry of the address translation circuit for mapping the target virtual address to the target physical address.

[0185] (7) The apparatus according to any one of clauses (5) and (6), wherein the at least one lookup cache invalidates a lookup cache entry storing information in response to at least one lookup cache invalidation command specifying an invalid target physical address, the information depending on granular protection information associated with a physical address granularity including the invalid target physical address.

[0186] (8) The apparatus according to any of the preceding clauses includes a Physical Alias ​​Point (PoPA) memory system component configured to dealias a plurality of aliased physical addresses corresponding to the same memory system resource from different physical address spaces, mapping any one of the plurality of aliased physical addresses to a dealiased physical address to be provided to at least one downstream memory system component; and at least one upstream PoPA memory system component provided upstream of the PoPA memory system component, wherein the at least one PoPA memory system component is configured to treat the aliased physical addresses from different physical address spaces as aliased physical addresses corresponding to different memory system resources.

[0187] (9) The apparatus according to clause (8), wherein the alias physical address is represented using the same physical address value in the different physical address spaces.

[0188] (10) The apparatus according to any one of clauses (8) and (9), wherein the at least one pre-PoPA memory system component includes at least one pre-PoPA cache; and the apparatus includes processing circuitry that issues at least one invalidation command in response to a cache invalidation to PoPA instruction for a specified target address, to request the at least one pre-PoPA cache to invalidate one or more entries associated with a target physical address value corresponding to the target virtual address.

[0189] (11) The apparatus according to any of the preceding clauses, wherein at least one of the address translation circuit and the requester-side filtering circuit is configured to select the selected physical address space based at least on the current operating domain of the requester circuit that issued the memory access request, the current domain including one of a plurality of operating domains.

[0190] (12) The apparatus according to clause (11), wherein the address translation circuit is configured to translate the target virtual address into the target physical address based on at least one page table entry; and at least when the current domain is a subset of the plurality of domains, the at least one of the address translation circuit and the requester-side filtering circuit is configured to select the selected physical address space based on the current domain and physical address space selection information specified in the at least one page table entry.

[0191] (13) The apparatus according to any one of clauses (11) and (12), wherein the plurality of domains includes at least a secure domain associated with a secure physical address space and a less secure domain associated with a less secure physical address space; the less secure physical address space is selectable as the selected physical address space when the current domain is the less secure domain or the secure domain; and the secure physical address space is selectable as the selected physical address space when the current domain is the secure domain, the selected physical address space, and the secure physical address space is prohibited from being selected as the selected physical address space when the current domain is the less secure domain.

[0192] (14) The apparatus according to clause (13), wherein the plurality of domains further includes an additional domain associated with an additional physical address space; when the current domain is the additional domain, the less secure physical address space can be selected as the selected physical address space; when the current domain is the additional domain, the additional physical address space can be selected as the selected physical address space, but when the current domain is the secure domain or the less secure domain, the additional physical address space is prohibited from being selected as the selected physical address space; and when the current domain is the additional domain, the secure address space is prohibited from being selected as the selected physical address space.

[0193] (15) An apparatus according to any one of clauses (11) to (14), wherein the plurality of domains includes a root domain for managing switching between other domains, the root domain being associated with a root physical address space.

[0194] (16) The apparatus according to clause (15), wherein at least one of the following: when the current domain is the root domain, all of the physical address spaces are selectable as the selected physical address space; and when the current domain is a domain other than the root domain, the root physical address space is prohibited from being selected as the selected physical address space.

[0195] (17) The apparatus according to any one of clauses (15) and (16), wherein the particle protection information can be modified by software executed in the root domain.

[0196] (18) The apparatus according to any of the preceding clauses, wherein the particle protection information is defined at the page level granularity.

[0197] (19) The apparatus according to any of the preceding clauses, wherein the particle protection information is dynamically updated during operation.

[0198] (20) The apparatus according to any of the preceding clauses, wherein when the particle protection information specifies a pass-through indicator indicating that the at least one allowed physical address space will be resolved by the completer-side filter circuit, the requester-side filter circuit is configured to determine whether to pass the memory access request to the interconnect independently of checking whether the selected physical address space is one of the at least one allowed physical address spaces.

[0199] (21) The apparatus according to any of the preceding clauses includes a completer-side filtering circuit that, in response to a memory access request received from the interconnect with a specified target physical address and a selected physical address space, performs a completer-side protection lookup of completer-side protection information based on the target physical address and the selected physical address space to determine whether the memory access request is permitted to be served by the completer device.

[0200] (22) A data processing method comprising: translating a target virtual address specified by a memory access request issued by a requester circuit into a target physical address; and performing a granular protection lookup at a requester-side filtering circuit based on the target physical address and a selected physical address space associated with the memory access request to determine whether to pass the memory access request via an interconnect to a completer device for servicing the memory access request, wherein the selected physical address space is one of a plurality of physical address spaces; wherein: in the granular protection lookup, the requester-side filtering circuit: obtains granular protection information corresponding to a target granule including the target physical address, the granular protection information indicating at least one allowed physical address space associated with the target granule; and blocks the memory access request when the granular protection information indicates that the selected physical address space is not one of the at least one allowed physical address space.

[0201] (23) A computer program for controlling a host data processing device to provide an instruction execution environment for executing target code; the computer program comprising: address translation program logic for translating a target emulated virtual address specified by a memory access request into a target emulated physical address; and filtering program logic for performing a granular protection lookup based on the target emulated physical address and a selected emulated physical address space associated with the memory access request to determine whether the memory access request can be serviced, wherein the selected emulated physical address space is one of a plurality of emulated physical address spaces; wherein: in the granular protection lookup, the filtering program logic is configured to: obtain granular protection information corresponding to a target granule including the target emulated physical address, the granular protection information indicating at least one allowed emulated physical address space associated with the target granule; and prevent the memory access request from being serviced when the granular protection information indicates that the selected emulated physical address space is not one of the at least one allowed emulated physical address spaces.

[0202] (24) A computer-readable storage medium storing a computer program as described in Clause 23.

[0203] In this application, the phrase "configured as..." is used to mean that the elements of the device have a configuration capable of performing the defined operations. In this context, "configuration" means the arrangement or manner of interconnection of hardware or software. For example, the device may have dedicated hardware that provides the defined operations, or a processor or other processing device may be programmed to perform the function. "Configured as" does not mean that the elements of the device need to be changed in any way to provide the defined operations.

[0204] While exemplary embodiments of the invention have been described in detail herein with reference to the accompanying drawings, it should be understood that the invention is not limited to those precise embodiments, and various changes and modifications can be made therein by those skilled in the art without departing from the scope of the invention as defined by the appended claims.

Claims

1. An apparatus for data processing, the apparatus comprising: A processing circuit for performing processing in one of at least three domains; as well as Address translation circuitry, the address translation circuitry being used to translate a virtual address of a memory access performed from the current domain into a physical address in at least one of a plurality of physical address spaces selected based on the current domain; as well as At least one pre-Physical Alias ​​Point (PoPA) memory system component, provided upstream of the PoPA, to treat aliased physical addresses from different physical address spaces corresponding to the same memory system resource as aliased physical addresses corresponding to different memory system resources; wherein: The at least three domains include a root domain for managing switching between multiple other domains among the at least three domains; and The plurality of physical address spaces include a root physical address space associated with the root domain, and the root physical address space is separate from the physical address spaces associated with the plurality of other domains.

2. The apparatus of claim 1, wherein the root physical address space is exclusively accessible from the root domain.

3. The apparatus according to any one of claims 1 and 2, wherein all of the plurality of physical address spaces are accessible from the root domain.

4. The apparatus according to any one of claims 1 and 2, wherein the plurality of other domains comprises at least: Security domains associated with secure physical address spaces, and less secure domains associated with less secure physical address spaces; The less secure physical address space can be accessed from the less secure domain, the secure domain, and the root domain; and The secure physical address space can be accessed from the secure domain and the root domain, but not from the less secure domain.

5. The apparatus of claim 4, wherein the plurality of other domains further includes additional domains associated with additional physical address spaces; The less secure physical address space can also be accessed from the other domain; and The additional physical address space can be accessed from the additional domain and the root domain, but not from the less secure domain.

6. The apparatus of claim 5, wherein the additional physical address space is inaccessible from the security domain; and The secure physical address space cannot be accessed from the other domain.

7. The apparatus of claim 4, wherein the less secure physical address space is accessible from all of the at least three domains.

8. The apparatus according to any one of claims 1 and 2, wherein the address translation circuit is configured to translate the virtual address into the physical address based on at least one page table entry; and The address translation circuit is configured to select one of the plurality of physical address spaces based on the current domain and physical address space selection information specified in the at least one page table entry, at least when the current domain is a subset of the at least three domains.

9. The apparatus of claim 8, wherein when the current domain is the root domain, the address translation circuit is configured to translate the virtual address into the physical address based on a root domain page table entry, wherein for the root domain page table entry, the physical address space selection information includes at least two bits of physical address space selection information for selecting among at least three physical address spaces accessible from the root domain.

10. The apparatus of claim 6, wherein the address translation circuitry is configured to translate the virtual address into the physical address based on at least one page table entry; When the current domain is the secure domain, the address translation circuit is configured to select, based on a physical address space selection indicator specified in at least one page table entry, whether one of the plurality of physical address spaces is the secure physical address space or the less secure physical address space; and When the current domain is the other domain, the address translation circuit is configured to select, based on a physical address space selection indicator specified in the at least one page table entry, whether the other physical address space or the less secure physical address space is the other physical address space.

11. The apparatus of claim 10, wherein the physical address space selection indicator is encoded at the same location within the at least one page table entry, regardless of whether the current domain is the security domain or the other domain.

12. The apparatus according to any one of claims 1 and 2, wherein the alias physical address includes physical addresses represented using the same physical address value in the different physical address spaces.

13. The apparatus of any one of claims 1 and 2, comprising a PoPA memory system component configured to dealias the plurality of aliased physical addresses to obtain dealiased physical addresses to be provided to at least one downstream memory system component.

14. The apparatus according to any one of claims 1 and 2, wherein the at least one pre-PoPA memory system component includes at least one pre-PoPA cache; and In response to a cache invalidation to PoPA instruction for a specified target address, the processing circuitry is configured to issue at least one invalidation command to request the at least one pre-PoPA cache to invalidate one or more entries associated with a target physical address value corresponding to the target address.

15. The apparatus of claim 14, wherein when the processing circuit issues the at least one invalid command, at least one post-PoPA cache located downstream of the PoPA is allowed to retain one or more entries associated with the target physical address value.

16. The apparatus of claim 14, wherein in response to the at least one invalidation command, the at least one pre-PoPA cache is configured to invalidate the one or more entries associated with the target physical address value, regardless of which of the plurality of physical address spaces is associated with the one or more entries.

17. The apparatus of any one of claims 1 and 2, further comprising a memory encryption circuit that, in response to a memory access request specifying a selected physical address space and a target physical address within the selected physical address space, encrypts or decrypts data associated with the protected address space based on one of a plurality of encryption keys selected depending on the selected physical address space when the target physical address is within a protected address region.

18. A data processing method, the data processing method comprising: Perform processing in one of at least three domains; as well as The virtual address of a memory access performed from the current domain is translated into a physical address in at least one of a plurality of physical address spaces selected based on the current domain, providing that at least one pre-PoPA memory system component upstream of the physical alias point PoPA treats aliased physical addresses from different physical address spaces corresponding to the same memory system resource as aliased physical addresses corresponding to different memory system resources; wherein: The at least three domains include a root domain for managing switching between multiple other domains among the at least three domains; and The plurality of physical address spaces include a root physical address space associated with the root domain, and the root physical address space is separate from the physical address spaces associated with the plurality of other domains.

19. A computer program product comprising a computer program for controlling a host data processing device to: Simulate the processing of the target code in one of at least three domains; as well as The virtual address of a memory access performed in the current domain is translated into a physical address in at least one of a plurality of simulated physical address spaces selected based on the current domain; as well as Aliased physical addresses from different simulated physical address spaces corresponding to the same memory system resource are considered as aliases corresponding to different simulated memory system resources; wherein: The at least three domains include a root domain for managing switching between multiple other domains among the at least three domains; and The plurality of simulated physical address spaces include a root simulated physical address space associated with the root domain, and the root simulated physical address space is separate from the simulated physical address spaces associated with the plurality of other domains.

20. A computer-readable storage medium storing a computer program that, when executed by a host data processing device, causes the host data processing device to perform the data processing method according to claim 18.

Citation Information

Patent Citations

  • Flexible policy arbitration control suite

    US20140380405A1

  • Region fusing

    WO2019145667A1