Page table pointer verification method and system on chip

By introducing cyclic redundancy checksum passive deduplication grille functions into page table pointers, the problems of page table pointers tampering and repeating pointers are solved, ensuring the security and stability of the data access of the system on chip.

CN120523646APending Publication Date: 2025-08-22JINAN MAIWEI INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510549588.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

In a system on chip, tampering of page table pointers leads to incorrect data address access, causing system crashes and data security issues, and the prior art is difficult to effectively detect and prevent.

Method used

Add a first verification code to the page table pointer of the target storage shard, generate a second verification code through cyclic redundancy verification, and passive deduplication grid function to identify the duplicate page table pointer.

Benefits of technology

Effectively detect and prevent page table pointer tampering, avoid incorrect data address access, ensure the security and stability of the system on-chip data access, and prevent system crashes caused by duplicate page table pointer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120523646A_ABST
    Figure CN120523646A_ABST
Patent Text Reader

Abstract

The invention discloses a page table pointer checking method and a system on chip, and relates to the technical field of on-chip storage, and the page table pointer checking method comprises the steps that a first check code is added to a target page table pointer of a target storage fragment, the first check code is used for performing cyclic redundancy check on an address pointer of the target storage fragment, and the first check code is used for performing cyclic redundancy check on the address pointer of the target storage fragment; the first data is obtained based on the first data of the target position in the first verification result obtained through verification. And when a target page table pointer is obtained, performing cyclic redundancy check on an address pointer in the target page table pointer, and obtaining a second check code based on second data of a target position in a second check result obtained through check. Furthermore, whether the target page table pointer is tampered or not is determined based on the matching condition of the first check code and the second check code, so that the check problem of the page table pointer is solved, wrong data address access caused by the fact that the target page table pointer points to wrong address space is avoided, and the security and stability of data access of the system on chip are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of on-chip storage technology, and in particular to a page table pointer verification method and an on-chip system. Background Art

[0002] A system on a chip (SoC) is a high-performance, highly concurrent task system that often requires multiple relatively independent business systems to execute tasks concurrently to improve the efficiency of the entire system. To maximize the memory bandwidth of the entire SoC, each business system concurrently accesses multiple memory slices through the memory slice's page table pointer during business execution. Once the page table pointer is tampered with, it will point to the wrong address space, causing incorrect data address access. Therefore, a method for verifying page table pointers is urgently needed. Summary of the Invention

[0003] The present application provides a page table pointer verification method and a system on chip to at least solve the page table pointer verification problem in the related art.

[0004] The present application provides a page table pointer verification method applicable to a business system that can access multiple storage slices in a system on chip; the method includes:

[0005] Obtaining a target page table pointer for a target storage slice; wherein the target page table pointer includes an address pointer of the target storage slice and a first check code; the first check code is obtained by performing a cyclic redundancy check on the address pointer of the target storage slice and based on first data at the target location in a first check result obtained by the check;

[0006] Performing a cyclic redundancy check on the address pointer in the target page table pointer to obtain a second check result, and obtaining a second check code based on second data at the target position in the second check result;

[0007] A target verification result of the target page table pointer is obtained based on a matching condition between the first verification code and the second verification code.

[0008] The present application also provides a system on a chip, comprising:

[0009] Multiple storage shards;

[0010] One or more business systems include a storage management module, wherein the storage management module stores a computer program, wherein the computer program implements the steps of any of the above-mentioned page table pointer verification methods when executed by the storage management module.

[0011] Through this application, since a first check code is added to the target page table pointer of the target storage shard, wherein the first check code is obtained by performing a cyclic redundancy check on the address pointer of the target storage shard and based on the first data of the target position in the first check result obtained by the check, when the target page table pointer is obtained, the address pointer in the target page table pointer can be processed in a similar manner to obtain a second check code, and through the matching of the first check code and the second check code, it is determined whether the address pointer in the target page table pointer has been tampered with, and the tampered target page table pointer can be effectively detected to solve the page table pointer verification problem, thereby avoiding erroneous data address access caused by the target page table pointer pointing to the wrong address space, and ensuring the security and stability of data access in the on-chip system. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0013] Figure 1 A schematic diagram of a system on a chip provided in an embodiment of the present application;

[0014] Figure 2 A schematic diagram of a flow chart of a page table pointer verification method provided in an embodiment of the present application;

[0015] Figure 3 A flowchart of another page table pointer verification method provided in an embodiment of the present application;

[0016] Figure 4 A schematic diagram of a page table pointer provided in an embodiment of the present application;

[0017] Figure 5 A schematic diagram of a flow chart of a method for generating a page table pointer provided in an embodiment of the present application;

[0018] Figure 6 A schematic diagram of a processing flow for duplicate page table pointers provided in an embodiment of the present application;

[0019] Figure 7 A schematic diagram of another processing flow for duplicate page table pointers provided in an embodiment of the present application;

[0020] Figure 8 A structural block diagram of a page table pointer checking device provided in an embodiment of the present application;

[0021] Figure 9 This is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0023] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0024] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0025] A system on a chip (SoC) is a high-performance, highly concurrent task system that often requires multiple relatively independent business systems to execute tasks concurrently to improve overall system performance. To overcome storage performance bottlenecks, on-chip storage methods such as static random-access memory (SRAM) are typically used to provide storage services for data and control information. Compared to off-chip storage methods such as double data rate synchronous dynamic random access memory (DDR SDRAM), on-chip storage offers the advantages of extremely high access bandwidth (more than ten times the access bandwidth of DDR) and extremely low read and write latency (down to nanoseconds). However, SoC storage capacity is limited by cost. Therefore, within the SoC's operating system, a storage management module for on-chip storage is included, responsible for the dynamic allocation and recycling of on-chip storage resources. Furthermore, due to the high performance and limited resource characteristics of on-chip storage, the dynamic management module must efficiently manage on-chip storage resources.

[0026] like Figure 1 As shown, Figure 1It is a type of internal SoC chip system. Taking a SoC chip with a 512-bit bus width and a 1GHz bus clock frequency as an example, the maximum data bandwidth that a single interface can provide is 64GB / s. In order to achieve the ultra-high access bandwidth of hundreds or even thousands of GB / s required for on-chip storage, multiple storage slices are generally used to jointly provide the highest system storage access bandwidth. Figure 1 As shown in the figure, if each storage slice provides an access bandwidth of X GB / s, the maximum system storage access bandwidth is n*X GB / s.

[0027] Accordingly, each business system (such as Figure 1 To maximize the overall system's storage bandwidth, the m business systems (shown in the figure) will concurrently access multiple storage shards during business execution. Therefore, when allocating storage on the system chip, one or more storage shards are not exclusively assigned to a single business system. Instead, the storage space of each storage shard is divided and allocated to all business systems, ensuring that each business system receives the maximum storage bandwidth of the entire system.

[0028] However, this method of storage sharding and on-chip resharding and sharing can lead to data page table pointer contamination, which primarily manifests as two types of errors: illegal page table pointers and duplicate page table pointers. An illegal page table pointer refers to a page table pointer pointing to an incorrect address space, potentially causing illegal data address access. Any reserved and protected address space may be read or written, potentially causing a system crash. A duplicate page table pointer refers to duplicate page table pointers being assigned to two or more concurrent tasks simultaneously, leading to system crashes and customer data loss.

[0029] Page table pointer corruption can sometimes occur silently, requiring the client to wait until the data is read again before discovering the data corruption. Once such a problem occurs, it is extremely difficult to locate the root cause in a highly concurrent task system.

[0030] Furthermore, page table pointer contamination can also cause data security issues. Specifically, multiple business systems share storage resources, and any anomaly in any business system can spread to other business systems, causing the entire system to crash. At the same time, the central processing unit (CPU) system can also access these on-chip memories. If there are defects in the system software, the control data and business data of the business system may be destroyed, causing data consistency issues. Furthermore, when unpredictable anomalies occur in external devices such as the host, unexpected access to on-chip memory through external interface modules can also cause system crashes.

[0031] Therefore, effective protection measures need to be taken for page table pointers to ensure system stability and data security.

[0032] In view of this, according to an embodiment of the present application, a page table pointer verification method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] The embodiments of the present application provide a page table pointer verification method that can be used in a system on chip, which includes a CPU system, an external IO interface system, one or more business systems, and multiple storage slices. Among them, the IO interface system includes high-speed peripheral component interconnection Express (PCIe), DDR, network and other interface systems. The CPU system, IO interface system and business system access the storage slices stored on the chip through the system bus. A storage management module is provided in the business system, which is responsible for the dynamic allocation and recovery of on-chip storage resources.

[0034] The page table pointer verification method provided by the embodiment of the present application is specifically used in a storage management module of a business system, and the business system can access multiple storage slices in a system on chip. Figure 2 is a flow chart of a page table pointer checking method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0035] Step S201, obtain the target page table pointer of the target storage slice; wherein the target page table pointer includes the address pointer of the target storage slice and a first check code; the first check code is obtained by performing a cyclic redundancy check on the address pointer of the target storage slice and based on the first data of the target position in the first check result obtained by the check.

[0036] Optionally, the target page table pointer further includes a valid identifier of the target page table pointer.

[0037] Specifically, during the initialization process of the system on chip, the system software of the system on chip performs initialization configuration to obtain multiple storage slices. The system software performs a cyclic redundancy check on the address pointers of each storage slice, and obtains the check code corresponding to each storage slice based on the data of the target position in the cyclic redundancy check result. According to the preset page table pointer format, the address pointers of each storage slice and the corresponding check code are spliced ​​to obtain the page table pointer of each storage slice. Then, the page table pointers of the storage slices in the system on chip that are in an idle state (i.e., a state to be allocated) are stored in a preset page table pointer list of the on-chip storage. When the business system receives a storage slice allocation task for the target business, it can read the target page table pointer of the idle target storage slice from the page table pointer list.

[0038] Furthermore, based on the purpose of the storage shards, the storage shards can be divided into two categories: structure pages and data pages. Among them, the structure pages sequentially store the page table pointers of the data pages, and the data pages are scattered in a discrete form throughout the on-chip storage space for storing business data. If the target storage shard is a target structure page, then after the business system assigns the target storage shard to the target business, it will store the target page table pointer of the target storage shard in the control page, so that the subsequent data processing module can read and write the business data of the target business accordingly. If the target storage shard is a target data page, then after the business system assigns the target storage shard to the target business, it will store the target page table pointer of the target storage shard in the target structure page, so that the business data of the target business can be read and written in the target data page according to the target page table pointer of the target data page in the target structure page. Therefore, the target page table pointer can be obtained from the control page or the target structure page.

[0039] It should be noted that the number of target storage shards is not unique. It can be one or more, and needs to be determined based on the specific business scenario.

[0040] Step S202 , performing a cyclic redundancy check on the address pointer in the target page table pointer to obtain a second check result, and obtaining a second check code based on the second data at the target position in the second check result.

[0041] The target position is determined based on the data position of the information of the original data verified by the cyclic redundancy check (CRC) in the check result obtained by the cyclic redundancy check (CRC).

[0042] Specifically, based on the cyclic redundancy check calculation process, the bits of the original data involved in the cyclic redundancy check process for the data at each position in the cyclic redundancy check result are determined. A predetermined number of check code bits is obtained. Based on the number of check code bits and the bits of the original data involved in the data at each position in the cyclic redundancy check result, a target position in the cyclic redundancy check result is determined that has information consistent with the check code bits and contains all the original data. The original data is the data to be verified by the cyclic redundancy check.

[0043] For example, taking CRC32 as an example for cyclic redundancy check, the 17th, 18th, 19th, 20th, and 27th bits in the check result obtained by CRC32 contain information of the original data. Therefore, the 17th, 18th, 19th, 20th, and 27th bits can be used as target positions.

[0044] Step S203 : obtaining a target verification result of the target page table pointer based on the matching status of the first verification code and the second verification code.

[0045] Optionally, if the first check code is inconsistent with the second check code, the target check result of the target page table pointer is determined to be check failure. If the first check code is consistent with the second check code, the target check result of the target page table pointer is determined to be check success.

[0046] The page table pointer verification method provided in this embodiment adds a first verification code to the target page table pointer of the target storage shard, wherein the first verification code is obtained by performing a cyclic redundancy check on the address pointer of the target storage shard and based on the first data of the target position in the first verification result obtained by the verification. Therefore, when the target page table pointer is obtained, the address pointer in the target page table pointer can be processed in a similar manner to obtain a second verification code. By matching the first verification code with the second verification code, it is determined whether the address pointer in the target page table pointer has been tampered with, and the tampered target page table pointer can be effectively detected to solve the verification problem of the page table pointer, thereby avoiding erroneous data address access caused by the target page table pointer pointing to the wrong address space, and ensuring the security and stability of data access in the on-chip system.

[0047] In some optional embodiments, obtaining the target page table pointer of the target storage slice in step S201 includes: responding to a storage slice allocation task of a first storage space size, reading the target page table pointer from a page table pointer list based on the first storage space size; wherein the page table pointer list includes page table pointers of storage slices to be allocated from multiple storage slices; and the storage space size of the target storage slice satisfies the first storage space size. Alternatively, responding to a storage slice reclaim task of a second storage space size, reading the target page table pointer from a target page of the system-on-chip based on the second storage space size; wherein the target page of the system-on-chip records page table pointers of allocated storage slices from multiple storage slices.

[0048] Specifically, before processing the target business, the business system generates a storage shard allocation task based on the first storage space size required by the target business. Then, the storage management module responds to the storage shard allocation task and reads the target page table pointer of the target storage shard that meets the first storage space size in the page table pointer list. It should be noted that the number of target storage shards is not unique. The number of storage shards required can be determined based on the first storage space size and the storage space size corresponding to each storage shard, and the target page table pointers of the corresponding number of target storage shards can be read from the page table pointer list. For example, the number of data pages to be allocated can be determined based on the first storage space size and the storage space size corresponding to each data page, and the number of structure pages to be allocated can be determined based on the number of page table pointers of data pages that can be stored in each structure page, and the target page table pointers of the corresponding number of target structure pages and the target page table pointers of the target data pages can be read from the page table pointer list.

[0049] Optionally, the storage space size of the target storage slice and the other storage slices is 4 KB, which can be determined according to the sharding mechanism of the system on chip.

[0050] Optionally, the pointer size of the target page table pointer and other page table pointers is 4 bytes, which can be adjusted according to actual conditions.

[0051] Optionally, the target page includes a control page and a structure page (such as a target structure page). The control page is used to store the page table pointer of the allocated structure page, and the structure page is used to store the page table pointer of the allocated data page. Figure 3 As shown in the figure, assuming that a structure page can store page table pointers of up to 1024 data pages, these 1024 data pages point to 4MB of storage space. If the storage space pointed to by the page table pointer of the data page to be stored is greater than 4MB, the structure pages need to be cascaded. At this time, the last pointer (No. 1023) of the previous structure page points to the next structure page, and so on.

[0052] Specifically, after the target page table pointer is verified, the target page table pointer of the target structure page is written into the control page, and the target page table pointer of the target data page is written into the corresponding target structure page. After the target business processing is completed, the business system can use the first storage space size as the second storage space size to generate a storage shard recovery task. Alternatively, a storage shard recovery task is generated based on a storage shard recovery strategy pre-set by the business system. Then, in response to the storage shard recovery task, the storage management module reads the target page table pointer of the target storage shard that meets the second storage space size in the target page.

[0053] It should be noted that the number of target storage shards is not unique. The number of allocated storage shards that need to be recovered can be determined based on the second storage space size and the storage space size of each storage shard, and the target page table pointers of the corresponding number of target storage shards can be read from the target page. For example, based on the second storage space size and the storage space size of each data page, the number of target data pages that need to be recovered is determined, and based on the number of page table pointers of data pages that can be stored in each structure page, the number of target structure pages that need to be recovered is determined, and the target page table pointers of the corresponding number of target structure pages are read in the control page, and the target page table pointers of the corresponding number of target data pages are read in the corresponding target structure page to recover the target structure page and the target data page. After the target structure page and the target data page are recovered, the corresponding target page table pointer can be rewritten into the page table pointer list to wait for reallocation.

[0054] The page table pointer verification method provided in this embodiment uses a page table pointer list to store the page table pointers of the storage slices to be allocated. Therefore, when a storage slice allocation task is received, the target page table pointers for allocation can be quickly read, preventing the duplicate allocation of the page table pointers of the already allocated storage slices. The page table pointers of the already allocated storage slices are recorded in the target page, and the allocated target page table pointers can be quickly read from the target page, avoiding the ineffective recycling of the page table pointers of unallocated storage slices.

[0055] In some optional implementations, the first check code is obtained by:

[0056] Step a1: determine the number of bits of the first check code.

[0057] Optionally, when CRC32 is used for cyclic redundancy check, the first check code has 5 bits, specifically the lower 5 bits of the target page table pointer.

[0058] In practical applications, the number of bits of the check code in the page table pointer can be preset to obtain the number of bits of the first check code.

[0059] Step a2: padding the address pointer of the target storage slice based on the number of bits to obtain the first data to be verified.

[0060] It should be noted that padding is a technology for formatting data, which is used to add specific characters before or after a string (such as an address pointer).

[0061] Specifically, based on the preset address pointer and the position of the check code in the page table pointer, the address pointer is supplemented with preset characters of corresponding bits according to the corresponding position to obtain the first data to be checked.

[0062] Furthermore, a valid flag is defined in the page table pointer. Based on the preset valid flag, the address pointer and the position of the check code in the page table pointer, the address pointer is supplemented with the valid flag and preset characters of the corresponding number of bits according to the corresponding position to obtain the first data to be checked.

[0063] Optionally, the preset character is 0, which can be adjusted according to actual conditions.

[0064] For example, taking the preset character as 0 and the number of digits as 5 as an example, Figure 4 The definition of the page table pointer shown is based on the valid flag and the address pointer to form the original page table pointer, and then the lower 5 bits of the original page table pointer are padded with 0 to form a 32-bit first data to be verified.

[0065] Step a3: Perform a cyclic redundancy check on the first data to be checked to obtain a first check result.

[0066] Optionally, a cyclic redundancy check is performed on the first data to be checked using CRC32 to obtain a first check result, wherein a generator polynomial of the cyclic redundancy check is 0x04C11DB7 and an initial value is 0xFFFFFFFF.

[0067] In addition, other cyclic redundancy check methods may be selected to check the first data to be checked according to actual conditions, which is not limited here.

[0068] Step a4: obtaining a first verification code based on the first data at the target position in the first verification result; wherein the first data at the target position includes information of the first data to be verified.

[0069] Optionally, when CRC32 is used for cyclic redundancy check, the target position includes bits 17, 18, 19, 20, and 27.

[0070] Among them, the target page table pointer is 4 bytes, the highest bit (1 bit wide) of the target page table pointer is the valid flag, the lower 5 bits are the first check code, and the remaining 26 bits are the address pointer of the target storage segment.

[0071] Specifically, based on the data sequence corresponding to the target positions, the first data of each target position are spliced ​​together to obtain a first check code. The data sequence of the target positions in the first check code can be adjusted according to actual conditions. The first data can be spliced ​​together in order from high to low target positions, or in order from low to high target positions. The order of the spliced ​​data is not limited here.

[0072] Specifically, the address pointer of the target storage slice is a relative address pointer.

[0073] The page table pointer verification method provided in this embodiment pads the address pointer of the target storage slice based on the number of bits of a first verification code to obtain first data to be verified. The first data at the target location is then selected from the first data to be verified as the first verification code, wherein the first data at the target location contains information about the first data to be verified. Therefore, when the target page table pointer is tampered with, the first verification code can be used to effectively detect errors in the target page table pointer.

[0074] For ease of understanding, Figure 4 The page table pointer definition shown is used as an example. In a 4-byte page table pointer definition, the most significant bit (1 bit wide) of the page table pointer is a valid flag, the lower 5 bits are a checksum, and the remaining 26 bits are the address pointer to the storage partition. At a 4KB management granularity, the supported addressing bit width is 38 bits, which can cover and manage a maximum address space of 256GB. Similarly, at 512B and 16KB management granularities, the maximum address space that can be covered and managed is 32GB and 1TB, respectively.

[0075] This application targets illegal page table pointers and introduces a simplified checksum based on CRC that occupies limited data resources in the page table pointer to detect page table pointer errors. Compared with the parity check in related technologies, it can detect any two erroneous data.

[0076] The following uses CRC32 as an example for explanation. The initial value of CRC32 is 0xFFFFFFFF, and the generating polynomial is 0x04C11DB7. CRC32 calculation is performed on each bit of the original data. Specifically, it is first bitwise XORed with the initial value 0xFFFFFFFF, and then the high and low bits of the 32 bits are swapped. For example, the 0th bit[0] and the 31st bit

[31] are swapped, the 1st bit[1] and the 30th bit

[30] are swapped, the 2nd bit[2] and the 29th bit

[29] are swapped, and so on, to obtain the 0th bit crc_bit[0], the 1st bit crc_bit[1], the 2nd bit crc_bit[2], etc. Then, the generating polynomial 0x04C11DB7 is used to perform calculations to obtain the calculation results, wherein the calculation formulas for the 4th bit new_bit[4], the 11th bit new_bit

[11] , the 12th bit new_bit

[12] , the 13th bit new_bit

[13] , and the 14th bit new_bit

[14] of the calculation results are as follows:

[0077] new_bit

[14] =crc_bit

[29] ^crc_bit

[26] ^crc_bit

[23] ^crc_bit

[20] ^crc_bit

[19] ^crc_bit

[17] ^crc_bit[1 5]^crc_bit

[14] ^crc_bit

[11] ^crc_bit[8]^crc_bit[7]^crc_bit[6]^crc_bit[4]^crc_bit[3]^crc_bit[2];

[0078] new_bit

[13] =crc_bit

[31] ^crc_bit

[28] ^crc_bit

[25] ^crc_bit

[22] ^crc_bit

[19] ^crc_bit

[18] ^crc_bit

[16] ^crc _bit

[14] ^crc_bit

[13] ^crc_bit

[10] ^crc_bit[7]^crc_bit[6]^crc_bit[5]^crc_bit[3]^crc_bit[2]^crc_bit[1];

[0079] new_bit

[12] =crc_bit

[31] ^crc_bit

[30] ^crc_bit

[27] ^crc_bit

[24] ^crc_bit

[21] ^crc_bit

[18] ^crc_bit

[17] ^crc_bit[ 15]^crc_bit

[13] ^crc_bit

[12] ^crc_bit[9]^crc_bit[6]^crc_bit[5]^crc_bit[4]^crc_bit[2]^crc_bit[1]^crc_bit[0];

[0080] new_bit

[11] =crc_bit

[31] ^crc_bit

[28] ^crc_bit

[27] ^crc_bit

[26] ^crc_bit

[25] ^crc_bit

[24] ^crc_bit

[20] ^crc_bit[1 7]^crc_bit

[16] ^crc_bit

[15] ^crc_bit

[14] ^crc_bit

[12] ^crc_bit[9]^crc_bit[4]^crc_bit[3]^crc_bit[1]^crc_bit[0];

[0081] new_bit[4]=crc_bit

[31] ^crc_bit

[30] ^crc_bit

[29] ^crc_bit

[25] ^crc_bit

[24] ^crc_bit

[20] ^crc_bit

[19] ^crc_bit[1 8]^crc_bit

[15] ^crc_bit

[12] ^crc_bit

[11] ^crc_bit[8]^crc_bit[6]^crc_bit[4]^crc_bit[3]^crc_bit[2]^crc_bit[0];

[0082] After all new_bits are calculated, the high and low bits of the 32 bits of new_bit are swapped back to get the final CRC value, for example, new_bit[0] and new_bit

[31] are swapped, new_bit[1] and new_bit

[30] are swapped, new_bit[2] and new_bit

[29] are swapped, and so on.

[0083] From the above expression of new_bit, it can be seen that the 4th, 11th, 12th, 13th, and 14th bits of new_bit contain the information of the 32-bit original data, that is, the 27th, 20th, 19th, 18th, and 17th bits of the final check data contain the information of the 32-bit original data. Therefore, the data of the 17th, 18th, 19th, 20th, and 27th bits of the check result obtained by CRC calculation can be used as the check code, and this 5-bit check code is introduced into the page table pointer. Furthermore, using this 5-bit check code, the page table pointer can achieve 100% coverage of the detection of any one-bit error. At the same time, compared with the parity check, it can also achieve 98% coverage of the detection of any two-bit error.

[0084] As one of the specific application examples, Figure 5 As shown, to identify an erroneous page table pointer, the lower 5 bits of the original page table pointer, consisting of a valid identifier and an address pointer, are padded with 0s to form a 32-bit first check data. A CRC32 calculation is performed on the check data using the initial value 0xFFFFFFFF and the generator polynomial 0x04C11DB7 to obtain a first check result. From the first check result, the 17th, 18th, 19th, 20th, and 27th bits are extracted as check codes and sequentially filled into the lower 5 bits of the page table pointer to obtain the target page table pointer.

[0085] In some optional implementations, the step S202 of performing a cyclic redundancy check on the address pointer in the target page table pointer to obtain a second check result, and obtaining a second check code based on the second data at the target location in the second check result, includes:

[0086] Step b1: replacing the first check code in the target page table pointer based on the preset character used in the padding process to obtain second data to be checked.

[0087] For example, taking the preset character as 0 and the lower 5 bits of the target page table pointer as the first verification code, the lower 5 bits of the target page table pointer are replaced with 0 to obtain the second data to be verified.

[0088] Step b2: performing a cyclic redundancy check on the second data to be checked to obtain a second check result.

[0089] Optionally, a cyclic redundancy check is performed on the second data to be checked using CRC32 to obtain a second check result, wherein a generator polynomial of the cyclic redundancy check is 0x04C11DB7 and an initial value is 0xFFFFFFFF.

[0090] Step b3: obtaining a second verification code based on the second data at the target position in the second verification result; wherein the second data at the target position includes information of the second data to be verified.

[0091] Specifically, based on the data sequence corresponding to the target position, the second data of each target position is spliced ​​to obtain the second check code.

[0092] The page table pointer verification method provided in this embodiment processes the target page table pointer using a cyclic redundancy check (CRC) method similar to the first verification code to obtain a second verification code, wherein the second data at the target location includes information about the second data to be verified. Therefore, when the target page table pointer is tampered with, the first and second verification codes can be used to effectively detect errors in the target page table pointer.

[0093] In some optional implementations, obtaining a target verification result of the target page table pointer based on the matching between the first verification code and the second verification code in step S203 includes:

[0094] Step c1: obtaining an initial verification result of the target page table pointer based on the matching status of the first verification code and the second verification code.

[0095] Specifically, if the first check code is inconsistent with the second check code, the initial check result of the target page table pointer is determined to be failed. If the first check code is consistent with the second check code, the initial check result of the target page table pointer is determined to be passed.

[0096] Step c2: if the initial verification result indicates that the target page table pointer verification has passed, obtain the target allocation status of the target storage slice from the allocation status record table; wherein the allocation status record table is used to record the allocation status of multiple storage slices.

[0097] In this application, if Figure 6 As shown, a passive deduplication fence (PDF) function is added to the storage management module to address duplicate page table pointer errors. The purpose is to immediately identify and isolate duplicate page table pointers introduced by shared on-chip storage. Although this method cannot prevent page table pointer pollution, it can immediately filter and identify duplicate pointers, thereby preventing internal duplicate page table pointers from being distributed through the allocation logic. It also prevents external duplicate page table pointers from entering the page table pointer list through the recycling logic.

[0098] Since the passive de-duplication grid function is aimed at on-chip storage management, the passive de-duplication grid function needs to be added without affecting the original high performance. At the same time, it is also necessary to consider using the smallest possible hardware cost to implement it.

[0099] Based on this, for the passive deduplication grid function of duplicate page table pointers, an allocation status record table is built inside the storage management module. The allocation status of storage slices of different sizes such as 512B, 1KB, 2KB, 4KB, and 8KB can be identified by one bit of data. For example, "1" represents that the storage slice is in the waiting state, and "0" represents that the storage slice is in the allocated state.

[0100] Specifically, when configuring the allocation status record table, the relative address pointer and configurable address offset of the allocation status record table are recorded. The storage management module uses the following formula: "relative address pointer - configurable address offset = address of allocation status record table" to obtain the address of the allocation status record table. Based on this address, the storage management module queries the allocation status record table for the target storage shard's target allocation status.

[0101] In some optional implementations, the allocation status record table includes multiple sub-record tables, each sub-record table has a corresponding relationship with a storage shard, and the sub-record table is used to record the allocation status of the corresponding storage shard.

[0102] Obtaining the target allocation status of the target storage shard from the allocation status record table in step c2 includes:

[0103] Step c21: determining a target sub-record table corresponding to the target storage shard from the multiple sub-record tables based on the corresponding relationship.

[0104] Alternatively, as Figure 7 As shown, in the specific implementation process of the allocation status record table, several sub-record tables are divided, and each sub-record table corresponds to a storage shard.

[0105] Step c22: Obtain the operation status of the target sub-record table.

[0106] It should be noted that because deduplication check 1 in the allocation logic and deduplication check 2 in the recycling logic may need to read and write to the same table, they need to maintain mutual exclusion through polling arbitration. Therefore, to improve efficiency, segmented locking and mutual exclusion can be implemented based on sub-record tables.

[0107] Step c23: If the operation status indicates that the target sub-record table is in a locked state, wait for the operation status to switch to an unlocked state.

[0108] It should be noted that if the same sub-record table needs to be operated, the two deduplication check logics need to be mutually exclusive, for example, Figure 7 In the "Scenario 1" shown, when deduplication check 1 locks sub-record table table1, deduplication check 2 needs to wait until sub-record table table1 is unlocked before it can operate on sub-record table table1.

[0109] Step c24: If the operation status indicates that the target sub-record table is in an unlocked state, the target sub-record table is locked, and the target allocation state of the target storage slice is queried from the target sub-record table.

[0110] It is understandable that operations on different sub-record tables can be executed concurrently, for example, Figure 7 In the "Scenario 2" shown, when deduplication check 1 locks sub-record table table2, deduplication check 2 can concurrently lock sub-record table tablen to perform operations on sub-record table table2 and sub-record table tablen in parallel.

[0111] The page table pointer verification method provided in this embodiment divides multiple sub-record tables into multiple sub-record tables based on storage shards. Therefore, concurrent operations can be performed on multiple storage shards to concurrently query the allocation status of different storage shards, improving allocation status query efficiency. Furthermore, if the target sub-record table to be operated on is locked, operations on the target sub-record table must wait until it is unlocked. This prevents access conflicts caused by multiple access logics operating on the same target sub-record table simultaneously.

[0112] Step c3: obtaining a target verification result of the target page table pointer based on a match between the target allocation state and the acquisition purpose of the target page table pointer; wherein the acquisition purpose includes allocating a target storage slice or reclaiming a target storage slice.

[0113] Specifically, if the target page table pointer is obtained in response to a storage slice allocation task, the purpose of obtaining it is to allocate the target storage slice. If the target page table pointer is obtained in response to a storage slice reclaim task, the purpose of obtaining it is to reclaim the target storage slice.

[0114] Two types of deduplication checks are performed in the allocation logic and recycling logic of storage shards: deduplication check 1 in the allocation logic and deduplication check 2 in the recycling logic. The specific operation definitions of deduplication check 1 and deduplication check 2 are shown in Table 1:

[0115] Table 1

[0116]

[0117]

[0118] In some optional implementations, if the acquisition purpose is to allocate a target storage shard, step c3 includes:

[0119] Step c311: when the target allocation state is in the pending allocation state, it is determined that the target allocation state matches the acquisition purpose, and the target verification result is determined to be that the target page table pointer verification has passed.

[0120] Step c312: when the target allocation state is the allocated state, it is determined that the target allocation state does not match the acquisition purpose, and the target verification result is determined to be that the target page table pointer verification fails.

[0121] Understandably, for the allocation logic, if the target allocation status is Pending, it means that no other business is using the target storage shard at this time, and the target storage shard can be allocated to the current target business. If the target allocation status is Allocated, it means that the target storage shard or the data page it points to is currently being used by other businesses, and therefore, the target storage shard cannot be re-allocated to the current target business.

[0122] The page table pointer verification method provided in this embodiment, for the logic of allocating the target storage slice, if the target allocation state of the target storage slice is the allocated state, it is determined that the target page table pointer verification fails. Therefore, it is possible to effectively detect the target page table pointer of the allocated target storage slice, and avoid repeated allocation of the same target page table pointer and target storage slice.

[0123] In some optional implementations, if the acquisition purpose is to reclaim the target storage shard, the above step c3 includes:

[0124] Step c321: when the target allocation state is the pending allocation state, it is determined that the target allocation state does not match the acquisition purpose, and the target verification result is determined to be that the target page table pointer verification fails.

[0125] Step c322: when the target allocation state is the allocated state, determine that the target allocation state matches the acquisition purpose, and determine that the target verification result is that the target page table pointer verification passes.

[0126] Understandably, for the reclamation logic, if the target allocation state is pending allocation, it means that the target storage slice has been reclaimed, but there is a duplicate page table pointer waiting to be reclaimed, which indicates a reclamation logic error. If the target allocation state is allocated, it means that the target storage slice has not been reclaimed yet, so the target storage slice can be reclaimed.

[0127] The page table pointer verification method provided in this embodiment, for the logic of reclaiming the target storage slice, if the target allocation state of the target storage slice is the pending allocation state, it is determined that the target page table pointer verification fails. Therefore, it can effectively detect the target page table pointer of the reclaimed target storage slice and avoid repeated recycling of the same target storage slice.

[0128] It is worth noting that, after the target page table pointer is preliminarily verified using the first check code and the second check code, this embodiment further obtains the target allocation status of the target storage segment in the allocation status record table. Therefore, the matching between the target allocation status and the acquisition purpose of the target page table pointer can be used to further identify duplicate target page table pointers, thereby avoiding the target page table pointer from being repeatedly allocated or recycled.

[0129] In some optional embodiments, the page table pointer verification method disclosed herein also includes: if the target page table pointer is obtained in response to a storage shard allocation task, then when the target verification result indicates that the target page table pointer verification has passed, the target storage shard is allocated to the target business corresponding to the storage shard allocation task to store the business data of the target business.

[0130] Specifically, the target storage shard is a target structure page or a target data page. If the target storage shard is a target structure page, the target page table pointer of the target structure page is written into the control page, wherein the target structure page is used to store the page table pointer of the target data page of the target business corresponding to the above storage shard allocation task. If the target storage shard is a target data page, the target page table pointer of the target data page is written into the target structure page corresponding to the target business, so that the business data of the target business is written into the target data page through the control page and the target structure page.

[0131] It can be understood that the target data page is used to store the business data of the target business.

[0132] The page table pointer verification method provided in this embodiment allocates the target storage shard to the target service only if the target page table pointer verification result indicates that the verification has passed. This prevents multiple services from reusing the same storage shard, thus avoiding system-on-chip crashes and service data loss, thereby ensuring data security.

[0133] In some optional embodiments, the page table pointer verification method of the present disclosure further includes: if the target page table pointer is obtained in response to a storage shard reclaim task, reclaiming the target storage shard if the target verification result indicates that the target page table pointer verification passes, and writing the target page table pointer into a page table pointer list.

[0134] In some optional implementations, the page table pointer verification method disclosed herein further includes: when the target verification result indicates that the verification fails, writing the target page table pointer to a register for problem debugging.

[0135] As one of the specific application examples, taking the 4KB storage granularity as an example, the specific implementation operation process of the allocation function and the recovery function of the storage management module is explained. Of course, the page table pointer verification method of this application can be extended to on-chip storage management of different granularities such as 512B, 1KB, 2KB, 8KB, 16KB, etc., which is not limited here.

[0136] like Figure 3 As shown, the system-on-chip (SoC) system control information and business data are stored in the on-chip storage space. The business system's storage management module manages a page table pointer list on the on-chip storage. This page table pointer list contains page table pointers for idle, pending allocation memory slices in the current SoC. Each page table pointer is 32 bits long and points to a specific 4KB memory slice in the on-chip storage. During system initialization, the system software performs initialization configuration and generates a first checksum, placing the page table pointers for multiple memory slices into the same page table pointer list.

[0137] After receiving the storage shard allocation task for allocating the first storage space size issued by the business system, the storage management module first reads out the available target page table pointer from the on-chip storage through the "read 1" path, and performs a validity check on the read 32-bit target page table pointer (i.e., the relevant verification process of the cyclic redundancy check) to obtain the initial verification result. If the initial verification result indicates that the verification fails, an error is reported. If the initial verification result indicates that the verification passes, the allocation logic first performs a deduplication check on all read target page table pointers through the verification logic of "deduplication check 1" to obtain the target verification result. If the target verification result indicates that the verification fails, an error is reported. If the target verification result indicates that the verification passes, the target page table pointer (i.e., the entry address of the data structure) pointing to the target structure page in the target storage shard is stored in the control page of the system task through the "write 2" path, and the target page table pointer as the target data page in the target storage shard is filled into the structure page in sequence through the "write 3" path, so that the subsequent data processing module can read and write data accordingly.

[0138] After receiving the storage shard recovery task of recovering the second storage space size issued by the business system, the storage management module first reads the target page table pointer of the target structure page in the control page of the system task through the "read 2" path, and performs a validity check (i.e., the relevant verification process of the cyclic redundancy check) and the verification logic of "deduplication check 2" on it in sequence to obtain the target verification result of the target structure page. If the target verification result of the target structure page indicates that the verification fails, an error is reported. If the target verification result of the target structure page indicates that the verification passes, the target page table pointers of all valid target data pages in the target structure page are read through the "read 3" path, and a validity check and the verification logic of "deduplication check 2" are performed on them in sequence to obtain the target verification result of the target data page. If the target verification result of the target data page indicates that the verification fails, an error is reported. If the target verification result of the target data page indicates that the verification passes, the target storage shard is recovered, and the target page table pointer of the recovered target storage shard is stored in the page table pointer list through the "write 1" path.

[0139] It is worth noting that the page table pointer verification method of the present application, on the one hand, can significantly improve the verification capability of the page table pointer by introducing a simplified check code based on the CRC algorithm into the page table pointer to optimize the page table pointer definition, ensure the integrity and reliability of the page table pointer, and thus improve data security. At the same time, at different management granularities, it can effectively manage and address a larger storage space. For example, at a 4KB granularity, a maximum address space of 256GB can be managed. On the other hand, in order to identify and isolate duplicate page table pointers, a passive deduplication grid function is added to the storage management module, and an allocation status record table is established within the storage management module to record the allocation status of the storage shards. Thus, through the deduplication check and error detection mechanism, errors or abnormal situations can be quickly identified and handled, avoiding the internal duplicate pointers from being incorrectly allocated or the external duplicate pointers from being incorrectly recovered, thereby improving the stability and robustness of the on-chip system.

[0140] The page table pointer verification method of the present application is not only applicable to a specific storage granularity, but can also be extended to a variety of different granularities, for example, 512B, 1KB, 2KB, 8KB, 16KB, etc., providing flexibility and scalability for page table pointer verification.

[0141] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0142] The embodiments of the present application also provide a page table pointer check device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0143] This embodiment provides a page table pointer verification device suitable for a business system that can access multiple storage slices in a system on chip. Figure 8 As shown, the device includes:

[0144] Pointer acquisition module 801 is used to obtain a target page table pointer of a target storage slice; wherein the target page table pointer includes an address pointer of the target storage slice and a first check code; the first check code is obtained by performing a cyclic redundancy check on the address pointer of the target storage slice and is based on the first data at the target location in the first check result obtained by the check;

[0145] The data processing module 802 is configured to perform a cyclic redundancy check on the address pointer in the target page table pointer to obtain a second check result, and obtain a second check code based on the second data at the target location in the second check result;

[0146] The pointer check module 803 is configured to obtain a target check result of the target page table pointer based on a matching condition between the first check code and the second check code.

[0147] In some optional embodiments, the first check code is obtained by: determining the number of bits of the first check code; padding the address pointer of the target storage segment based on the number of bits to obtain the first data to be checked; performing a cyclic redundancy check on the first data to be checked to obtain a first check result; obtaining the first check code based on the first data at the target position in the first check result; wherein the first data at the target position contains information about the first data to be checked.

[0148] In some optional implementations, the pointer acquisition module 801 includes:

[0149] a first acquiring unit, configured to respond to a storage slice allocation task of a first storage space size and read a target page table pointer from a page table pointer list based on the first storage space size; wherein the page table pointer list includes page table pointers of storage slices to be allocated from the plurality of storage slices; and the storage space size of the target storage slice satisfies the first storage space size;

[0150] Or, a second acquisition unit is used to respond to a storage slice recovery task of a second storage space size, and read a target page table pointer in a target page of the on-chip system based on the second storage space size; wherein the target page of the on-chip system records page table pointers of allocated storage slices in multiple storage slices.

[0151] In some optional implementations, the data processing module 802 includes:

[0152] A first processing unit is configured to replace a first check code in a target page table pointer based on a preset character used in a padding process to obtain second data to be checked;

[0153] A second processing unit is configured to perform a cyclic redundancy check on the second data to be checked to obtain a second check result;

[0154] The third processing unit is configured to obtain a second verification code based on the second data at the target position in the second verification result; wherein the second data at the target position includes information of the second data to be verified.

[0155] In some optional implementations, the pointer checking module 803 includes:

[0156] A first verification unit, configured to obtain an initial verification result of the target page table pointer based on a matching condition between the first verification code and the second verification code;

[0157] a state acquisition unit, configured to acquire a target allocation state of the target storage slice from an allocation state record table when the initial verification result indicates that the target page table pointer has passed verification; wherein the allocation state record table is configured to record the allocation states of multiple storage slices;

[0158] The second verification unit is used to obtain a target verification result of the target page table pointer based on the matching between the target allocation state and the acquisition purpose of the target page table pointer; wherein the acquisition purpose includes allocating the target storage slice or reclaiming the target storage slice.

[0159] In some optional implementations, the allocation status record table includes multiple sub-record tables, each of which corresponds to a storage shard, and is used to record the allocation status of the corresponding storage shard. The status acquisition unit includes:

[0160] A record table determination subunit, configured to determine a target sub-record table corresponding to a target storage shard from among multiple sub-record tables based on a corresponding relationship;

[0161] A first acquiring subunit is used to acquire the operation status of the target sub-record table;

[0162] a waiting processing subunit, configured to wait for the operation state to be switched to the unlocked state if the operation state indicates that the target sub-record table is in the locked state;

[0163] The second acquiring sub-unit is configured to lock the target sub-record table if the operation status indicates that the target sub-record table is in an unlocked state, and query the target allocation state of the target storage slice from the target sub-record table.

[0164] In some optional implementations, the second verification unit includes:

[0165] A first allocation check subunit is configured to, if the acquisition purpose is to allocate a target storage slice, determine that the target allocation state matches the acquisition purpose when the target allocation state is in a pending allocation state, and determine that the target check result is that the target page table pointer check passes;

[0166] The second allocation check subunit is used to determine that the target allocation state does not match the acquisition purpose if the acquisition purpose is to allocate the target storage slice and the target allocation state is in the allocated state, and determine that the target check result is that the target page table pointer check fails.

[0167] In some optional implementations, the second verification unit further includes:

[0168] A first recycling check subunit is configured to, if the acquisition purpose is to reclaim the target storage slice, determine that the target allocation state does not match the acquisition purpose when the target allocation state is in the pending allocation state, and determine that the target check result is a target page table pointer check failure;

[0169] The second recycling verification subunit is used to determine that the target allocation state matches the acquisition purpose if the acquisition purpose is to recycle the target storage slice and the target allocation state is in the allocated state, and determine that the target verification result is that the target page table pointer verification passes.

[0170] In some optional implementations, the page table pointer checking device of the present disclosure further includes:

[0171] The shard allocation module is used to allocate the target storage shard to the target business corresponding to the storage shard allocation task to store the business data of the target business if the target page table pointer is obtained in response to the storage shard allocation task and the target verification result indicates that the target page table pointer verification has passed.

[0172] For the description of the features in the embodiment corresponding to the page table pointer checking device, reference can be made to the relevant description of the embodiment corresponding to the page table pointer checking method, which will not be repeated here.

[0173] The embodiment of the present application also provides an electronic device, such as Figure 9As shown, it includes a memory 901 and a processor 902. The memory 901 stores a computer program, and the processor 902 is configured to run the computer program to execute the steps in any of the above-mentioned page table pointer checking method embodiments.

[0174] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned page table pointer checking method embodiments when running.

[0175] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0176] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned page table pointer verification method embodiments are implemented.

[0177] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned page table pointer verification method embodiments are implemented.

[0178] Embodiments of the present application further provide a system on a chip (SoC) comprising multiple storage shards and one or more service systems. The service systems include a storage management module storing a computer program, wherein the computer program, when executed by the storage management module, implements the steps of any of the aforementioned page table pointer verification method embodiments.

[0179] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0180] The above is a detailed introduction to a page table pointer verification method, device, electronic device, storage medium, program product and system on chip provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A page table pointer verification method, characterized in that: Applicable to a business system, wherein the business system can access multiple storage slices in a system on chip; the method includes: Obtaining a target page table pointer for a target storage slice; wherein the target page table pointer includes an address pointer of the target storage slice and a first check code; the first check code is obtained by performing a cyclic redundancy check on the address pointer of the target storage slice and based on first data at the target location in a first check result obtained by the check; Performing a cyclic redundancy check on the address pointer in the target page table pointer to obtain a second check result, and obtaining a second check code based on second data at the target position in the second check result; A target verification result of the target page table pointer is obtained based on a matching condition between the first verification code and the second verification code.

2. The page table pointer checking method according to claim 1, wherein: The first verification code is obtained by: Determining the number of digits of the first check code; Performing bit padding processing on the address pointer of the target storage slice based on the number of bits to obtain first data to be verified; Performing a cyclic redundancy check on the first data to be checked to obtain a first check result; The first verification code is obtained based on the first data at the target position in the first verification result; wherein the first data at the target position includes information of the first data to be verified.

3. The page table pointer checking method according to claim 2, wherein: The performing a cyclic redundancy check on the address pointer in the target page table pointer to obtain a second check result, and obtaining a second check code based on second data at the target position in the second check result, includes: Replacing the first check code in the target page table pointer based on a preset character used in the padding process to obtain second data to be checked; Performing a cyclic redundancy check on the second data to be checked to obtain a second check result; The second verification code is obtained based on the second data at the target position in the second verification result; wherein the second data at the target position includes information of the second data to be verified.

4. The page table pointer checking method according to claim 1, wherein: The step of obtaining a target page table pointer of a target storage segment includes: In response to a storage slice allocation task of a first storage space size, reading the target page table pointer from a page table pointer list based on the first storage space size; wherein the page table pointer list includes page table pointers of storage slices to be allocated from the plurality of storage slices; and the storage space size of the target storage slice satisfies the first storage space size; or, In response to a storage slice recovery task of a second storage space size, the target page table pointer is read in a target page of the on-chip system based on the second storage space size; wherein the target page of the on-chip system records page table pointers of the allocated storage slices among the multiple storage slices.

5. The page table pointer checking method according to any one of claims 1 to 4, characterized in that: The obtaining a target verification result of the target page table pointer based on a matching condition between the first verification code and the second verification code includes: Obtaining an initial verification result of the target page table pointer based on a match between the first verification code and the second verification code; When the initial verification result indicates that the target page table pointer verification has passed, obtaining the target allocation status of the target storage slice from the allocation status record table; wherein the allocation status record table is used to record the allocation status of the multiple storage slices; Based on the matching between the target allocation state and the acquisition purpose of the target page table pointer, a target verification result of the target page table pointer is obtained; wherein the acquisition purpose includes allocating the target storage slice or reclaiming the target storage slice.

6. The page table pointer checking method according to claim 5, wherein: The allocation status record table includes a plurality of sub-record tables, each of which corresponds to the storage shards and is used to record the allocation status of the corresponding storage shards; The acquiring the target allocation status of the target storage slice in the allocation status record table includes: Determine, based on the corresponding relationship, a target sub-record table corresponding to the target storage shard in the multiple sub-record tables; Obtaining the operation status of the target sub-record table; If the operation state indicates that the target sub-record table is in a locked state, waiting for the operation state to switch to an unlocked state; If the operation status indicates that the target sub-record table is in an unlocked state, the target sub-record table is locked, and the target allocation status of the target storage slice is queried from the target sub-record table.

7. The page table pointer checking method according to claim 5, wherein: If the acquisition purpose is to allocate the target storage slice, then obtaining a target verification result of the target page table pointer based on a match between the target allocation state and the acquisition purpose of the target page table pointer includes: When the target allocation state is in a pending allocation state, determining that the target allocation state matches the acquisition purpose, and determining that the target verification result is that the target page table pointer verification has passed; When the target allocation state is the allocated state, it is determined that the target allocation state does not match the acquisition purpose, and the target verification result is determined to be that the target page table pointer verification fails.

8. The page table pointer checking method according to claim 5, wherein: If the acquisition purpose is to reclaim the target storage slice, obtaining a target verification result of the target page table pointer based on a match between the target allocation state and the acquisition purpose of the target page table pointer includes: When the target allocation state is in a pending allocation state, determining that the target allocation state does not match the acquisition purpose, and determining that the target verification result is that the target page table pointer verification fails; When the target allocation state is the allocated state, it is determined that the target allocation state matches the acquisition purpose, and the target verification result is determined to be that the target page table pointer verification has passed.

9. The page table pointer checking method according to claim 4, wherein: The method further comprises: If the target page table pointer is obtained in response to the storage shard allocation task, then when the target verification result indicates that the target page table pointer verification has passed, the target storage shard is allocated to the target business corresponding to the storage shard allocation task to store the business data of the target business.

10. A system on chip, characterized in that: include: Multiple storage shards; One or more business systems include a storage management module, in which a computer program is stored, wherein when the computer program is executed by the storage management module, the steps of the page table pointer verification method according to any one of claims 1 to 9 are implemented.

Citation Information

Cited By

  • Data acquisition method and device, equipment, chip, storage medium and program product

    CN121919009A