摘要 |
Provided are a mapping processing method and device for a cache address. The embodiment of the method comprises: acquiring a physical address corresponding to an access address which is sent by a processing core, the physical address comprising a physical page number (PPN) and a page offset (301); and mapping the physical address into a cache address, the cache address comprising a cache set index 1, a cache tag, a cache set index 2 and a cache block offset in sequence, wherein a cache set index is formed by the cache set index 1 located at a high bit and the cache set index 2 located at a low bit together, and the cache set index 1 is located within the coverage range of the PPN (302). By mapping some bits of a large-page PPN in the set index of a cache, an operating system can use same to conduct colouring, thereby satisfying the requirement of simultaneously using the large page technology and the page-colouring cache-partitioning technology, and improving the large-page and page-colouring cache-partitioning performance. |