This application claims priority under 35 U.S.C. 119(b) to Indian Patent Application Serial No. 5603/CHE/2013, entitled, “SYSTEM AND METHOD FOR PROVIDING CLIENT-SIDE ADDRESS TRANSLATION IN A MEMORY MANAGEMENT SYSTEM,” filed on Dec. 5, 2013 (Qualcomm Ref. No. 134615IN). The entire contents of this application are hereby incorporated by reference.
Memory management units (MMUs) are critical components for system-on-chip (SoC) functionality and performance for hardware in portable computing devices, such as mobile phones. Providing on-chip debug capability for system interprocessors (IPs) significantly increases software team productivity and decreases the bring-up time. Conventional SoCs with debug capabilities include a system memory management unit (SMMU) that uses a standard address translation system, such as, for example, those described in the Address Translation Services (ATS) 1.1 Specification provided by PCI-SIG, including any earlier or future versions (collectively referred to as “the ATS Specification”), which is hereby incorporated by reference in its entirety. With distributed memory management unit architectures becoming the preferred implementation of choice, hardware challenges make it difficult to support such debugging features.
Accordingly, there is a need in the art for improved architectures that enable chip debug and/or profiling functionality for distributed memory management unit systems.
Systems and methods are disclosed for providing memory address translation for a memory management system. One embodiment of such a system comprises a memory device and an application processor in communication via a system interconnect. The application processor comprises test code for testing one or more of a plurality of hardware devices. Each of the hardware devices has a corresponding system memory management unit (SMMU) for processing memory requests associated with the hardware device to the memory device. The system further comprises a client-side address translation system in communication with the system interconnect and the plurality of SMMUs. The client-side address translation system is configured to selectively route stimulus traffic associated with the test code to a client port on one or more of the plurality of SMMUs for testing the corresponding hardware devices.
Another embodiment is a method for providing client-side address translation in a memory management system. One such method comprises: an application processor initiating test code for testing one or more of a plurality of hardware devices, each hardware device having a corresponding system memory management unit (SMMU) for processing associated memory requests to a memory; selecting one or more of the hardware devices to be tested using the test code; and injecting stimulus traffic associated with the test code to a client port on the respective one or more SMMUs corresponding to the selected one or more hardware devices to be tested.
In the Figures, like reference numerals refer to like parts throughout the various views unless otherwise indicated. For reference numerals with letter character designations such as “102A” or “102B”, the letter character designations may differentiate two like parts or elements present in the same Figure. Letter character designations for reference numerals may be omitted when it is intended that a reference numeral to encompass all parts having the same reference numeral in all Figures.
As illustrated in
The system interconnect 110 may comprise one or more components, including, for example, a bus integrated memory controller and a system network on chip. The application processor 102 may comprise a central processing unit, which includes a test program for debugging and/or profiling hardware devices 108a, 108b, 108c, and 108d via memory address translation operations provided via CATS 112.
It should be appreciated that any processor in the system 100 may comprise the application processor 102 and be used to inject the stimulus traffic. A single source or multiple sources of data may be injected to the SMMUs 106a, 106b, 106c, and 106d by one or more of the processors incorporated in the system 100. In this manner, CATS 112 enables data translation from a virtual address space to a physical address space associated with memory 104. CATS 112 provides the infrastructure for enabling data injection to the SMMUs 106 and a means for validating that the data translated is the same data used for reference, which is known by the CPU. It should be appreciated that the validation may be performed in CATS 112, SMMUs 106, and/or in memory 104 for long consecutive blocks of data to track low probability error events.
In operation of system 100, the test program in application processor 102 may issue memory read and/or write requests to memory locations, use the SMMU traffic path to translate the virtual address of the read or write requests, and then check whether the data returned (or written) to memory 104 matches the expected data. As described below in more detail, CATS 112 provides a mechanism to implement these features in a way that tests the actual end-to-end path of the address translation. It should be appreciated that CATS 112 provides an SMMU address translation stimulus matrix that traverse the same data path as the client ports 107a, 107b, 107c, and 107d in SMMUs 106a, 106b, 106c, and 106d, respectively, which is referred to as client-side address translation. In contrast to conventional SMMU implementations that require configuration-side address translation operations, client-side address translation may provide a more effective or reliable means for simulating test scenarios. Furthermore, CATS 112 may provide a means for generating arbitrary traffic patterns, not just single beat read/write as used in conventional configuration-side implementations.
It should be further appreciated that system 100 may provide various debug, profiling, and/or testing features. For example, CATS 112 may verify SMMU functionality during bring-up. In existing configuration-side implementations, verification is completed using conventional address translation operation services, such as described in the ATS Specification identified above. CATS 112 may also generate traffic patterns based on test pattern data files on the application processor 102 to test the performance of the SMMUs 106a, 106b, 106c, and 106d.
CATS 112 may be incorporated in various types of SMMU architectures. For example, CATS 112 may be implemented in SMMU architectures that support direct virtual-to-physical address translation or two-stage memory address translation involving a first stage for translating a virtual address to an intermediate physical address (IPA) and a second stage for translating the IPA to a physical address in memory 104. Two-stage address translation may be implemented in systems that use hypervisors in the CPU, including, for example, server-type devices and high-end portable computing devices, such as, smart phones.
As further illustrated in
Each SMMU 106a, 106b, 106c, and 106d may manage memory resources for a separate hardware device. In the embodiment illustrated in
The test program may provide stimulus traffic to system interconnect 112. The stimulus traffic may comprise memory read and/or write requests to a memory location in a predetermined physical address range. CATS 112 receives the stimulus traffic via interface 120 and, at block 304, selects the hardware devices 108 to be tested. For example, CATS 112 may select mobile display 108d and/or the associated SMMU 106d. At block 306, CATS 112 injects the stimulus traffic to the traffic path associated SMMU 108d to translate the virtual address of the read or write requests associated with display 108d. It should be appreciated that the stimulus traffic may be injected to the SMMUs in various ways. For example, in one embodiment, memory mapping techniques may be used in the bus infrastructure to reroute the data differently during testing operation and runtime operation. At block 308, in response to the stimulus traffic, the associated memory operation(s) (e.g., read and/or write operations) may be performed by the memory 104. At block 310, the system 100 may verify address translation associated with the memory operation(s) by, for example, checking whether data returned or written to memory 104 matches the expected data.
As illustrated in
In this manner, CATS 112 may selectively inject the test traffic from application processor 105 to the selected TBU wrapper.
It should be appreciated that CATS 112 may form a logic matrix-topology for software to select which TBU wrapper to target, and whether to allow concurrency of test traffic with the mission mode traffic. The injection of a read or write transaction with a bit pattern, followed by verifying that the translation is correct based on the fact that the pattern gets read from or written to the memory cell of the correct physical address. CATS 112 facilitates the injection of software-initiated test traffic to the TBU wrapper 206.
As illustrated in the embodiment of
The two multiplexers 209 and 205 form a cross bar between the system interconnect 110 (via the shift register 207) and the plurality of SMMUs 106, which functions as the client-side address translation stimulus matrix. CATS traffic is sourced from system interconnect 110 based on an address range reserved for CATS 112 in the system interconnect 110. CATS traffic goes from the application processor 105 to one or more TBU wrappers 206 under test, as selected by the mux 209.
At the selected TBU wrapper 206, CATS traffic either replaces or augments traffic from the TBU master hardware or client. Augmenting refers to injecting both types of traffic into the TBU wrapper 206, provided the input address ranges do not overlap. This may enable greater flexibility in debug and profiling. In an embodiment, the total address range may be determined according to:
nTBU×mCB×rCB; where:
It should be appreciated that CATS 112 may provide various additional benefits over configuration-side address translation used in ARM-based architectures. The client-side address translation provided by CATS 112 is not limited to stage 1 context banks CATS 112 may also test stage 2 context configurations. CATS traffic may use a direct address in system interconnect 112 to derive the input address to the TBU wrapper 206.
As further illustrated in
As further illustrated in
As mentioned above, the system 100 may be incorporated into any desirable computing system.
A display controller 328 and a touch screen controller 330 may be coupled to the CPU 502. In turn, the touch screen display 506 external to the on-chip system 322 may be coupled to the display controller 328 and the touch screen controller 330.
Further, as shown in
As further illustrated in
As depicted in
It should be appreciated that one or more of the method steps described herein may be stored in the memory as computer program instructions, such as the modules described above. These instructions may be executed by any suitable processor in combination or in concert with the corresponding module to perform the methods described herein.
Certain steps in the processes or process flows described in this specification naturally precede others for the invention to function as described. However, the invention is not limited to the order of the steps described if such order or sequence does not alter the functionality of the invention. That is, it is recognized that some steps may performed before, after, or parallel (substantially simultaneously with) other steps without departing from the scope and spirit of the invention. In some instances, certain steps may be omitted or not performed without departing from the invention. Further, words such as “thereafter”, “then”, “next”, etc. are not intended to limit the order of the steps. These words are simply used to guide the reader through the description of the exemplary method.
Additionally, one of ordinary skill in programming is able to write computer code or identify appropriate hardware and/or circuits to implement the disclosed invention without difficulty based on the flow charts and associated description in this specification, for example.
Therefore, disclosure of a particular set of program code instructions or detailed hardware devices is not considered necessary for an adequate understanding of how to make and use the invention. The inventive functionality of the claimed computer implemented processes is explained in more detail in the above description and in conjunction with the Figures which may illustrate various process flows.
In one or more exemplary aspects, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that may be accessed by a computer. By way of example, and not limitation, such computer-readable media may comprise RAM, ROM, EEPROM, NAND flash, NOR flash, M-RAM, P-RAM, R-RAM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that may be used to carry or store desired program code in the form of instructions or data structures and that may be accessed by a computer.
Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (“DSL”), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium.
Disk and disc, as used herein, includes compact disc (“CD”), laser disc, optical disc, digital versatile disc (“DVD”), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
Alternative embodiments will become apparent to one of ordinary skill in the art to which the invention pertains without departing from its spirit and scope. Therefore, although selected aspects have been illustrated and described in detail, it will be understood that various substitutions and alterations may be made therein without departing from the spirit and scope of the present invention, as defined by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
5603/CHE/2013 | Dec 2013 | IN | national |