MMU configuration method, graphics processing system, electronic component and device
By defining custom doorbell commands in the graphics processing system, efficient configuration and management of MMU is realized, solving the MMU configuration efficiency and security problems in the prior art, and is suitable for heterogeneous computing environments.
Patent Information
- Application Number
- CN202410788354.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-06-18
AI Technical Summary
In the existing graphics processing system based on PCIe protocol, the MMU configuration efficiency and overhead at the device side are low, and the direct management of MMUs has security and flexibility problems.
By defining a MMU configuration method, the MMU identification information and configuration information are transmitted between the host and the device side by custom doorbell commands (DB commands), and the configuration and management of the MMU are realized, including the first doorbell command and the second doorbell command The use of doorbell commands and third doorbell commands ensures efficient and safe initialization of MMU and page table update operations.
It improves the efficiency and security of MMU configuration, reduces the overhead of the host-side CPU, and realizes flexible management of multi-MMU on the device-side, and is suitable for multi-MMU environments based on heterogeneous computing.
Smart Images

Figure CN118365506B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of integrated MMU configuration management, and in particular to an MMU configuration method, a graphics processing system, an electronic component, and an electronic device. Background Art
[0002] The memory management unit (MMU) is mainly responsible for memory mapping and memory protection. Taking the graphics processing system based on the PCIe protocol as an example, the system contains a variety of IP (Intellectual Property) modules, such as GPU (Graphics Processing Unit), VPU (Video Processing Unit), DMA (Direct Memory Access), DP (DisplayPort), NPU (Neural Network Processing Unit), etc. Each IP module has its own MMU, and the system uses the MMU to implement memory mapping management (implementing mapping of addresses of different widths, mapping of virtual addresses to physical addresses, etc.). In the existing solution: the MMU on the device side is mapped to the host side through the PCIe interface, and the MMU on the device side is directly configured and managed by the CPU on the host side. The efficiency and overhead of this implementation method need to be optimized. Summary of the invention
[0003] The purpose of the present disclosure is to provide an MMU configuration method, which is applied to a host side. The method includes:
[0004] Step 101: Send a first doorbell command to a device end, wherein the first doorbell command carries identification information and configuration information of the MMU to be configured;
[0005] Step 103 , in response to the completion of processing the first doorbell command, determine whether there are MMUs to be configured, and if so, return to step 101 .
[0006] Optionally, the first doorbell command includes:
[0007] A completion flag field, wherein the value of the completion flag field is used to indicate whether the first doorbell command is processed successfully;
[0008] A command type field, wherein a value of the command type field is used to indicate a command type of the first doorbell command, and the command type includes an MMU configuration command type;
[0009] An MMU identification field, wherein the MMU identification field carries identification information of the MMU to be currently configured;
[0010] Configuration information field, where the configuration information field carries configuration information of the MMU currently to be configured.
[0011] Optionally, the configuration information of the MMU to be configured includes the starting address of the mapped virtual address and page table size information.
[0012] Optionally, step 103 includes:
[0013] In response to the second doorbell command sent by the device end and corresponding to the completion of the processing of the first doorbell command, determine whether there is an MMU to be configured, and if so, return to step 101;
[0014] or,
[0015] In response to a second doorbell command sent by the device end corresponding to the completion of processing of the first doorbell command, determine the value of the completion flag field of the first doorbell command stored in the doorbell register of the device end; in response to the value of the completion flag field of the first doorbell command stored in the doorbell register of the device end indicating that processing of the first doorbell command is completed, determine whether there are any MMUs to be configured; if so, return to step 101.
[0016] According to one aspect of the present disclosure, there is provided an MMU configuration method, which is applied to a device side, and the method includes:
[0017] Step 200: In response to a first doorbell command sent by the host, the MMU to be configured is determined according to the identification information of the MMU to be configured currently carried in the first doorbell command, and the MMU to be configured currently is configured according to the configuration information of the MMU to be configured currently carried in the first doorbell command;
[0018] Step 202: Notify the host end that the first doorbell command processing is completed.
[0019] Optionally, step 200 includes:
[0020] Determining, according to a value of a command type field of the first doorbell command, that the command type of the first doorbell command is an MMU configuration command type;
[0021] Determine the MMU to be configured currently according to the identification information of the MMU to be configured currently carried by the MMU identification field of the first doorbell command;
[0022] The MMU to be configured is configured according to the configuration information of the MMU to be configured currently carried in the configuration information field of the first doorbell command.
[0023] Optionally, the configuration information of the MMU to be configured includes the starting address of the mapped virtual address and page table size information.
[0024] Optionally, step 202 includes:
[0025] Sending a second doorbell command corresponding to the completion of the processing of the first doorbell command to the host end; or,
[0026] A second doorbell command corresponding to the completion of the processing of the first doorbell command is sent to the host end, and a completion flag field of the first doorbell command stored in the doorbell register of the device end is assigned a value to indicate that the processing of the first doorbell command is completed.
[0027] According to one aspect of the present disclosure, there is provided an MMU configuration method, which is applied to a host side, and the method includes:
[0028] Step 301: storing a configuration command of at least one MMU to be configured into a device-side storage space, wherein the configuration command carries identification information and configuration information of the MMU to be configured;
[0029] Step 303: Send a third doorbell command corresponding to the configuration command to the device end, wherein the third doorbell command carries the storage address of the configuration command in the storage space of the device end.
[0030] Optionally, before step 301, the method further includes:
[0031] Apply for a first configuration command buffer in the host-side storage space; generate the configuration command in the first configuration command buffer; apply for a second configuration command buffer in the device-side storage space, and write the address of the second configuration command buffer into the third doorbell command as the storage address of the configuration command in the device-side storage space; copy the configuration command from the first configuration command buffer to the second configuration command buffer, and update the write pointer of the second configuration command buffer; or,
[0032] Apply for a configuration command buffer in the device-side storage space, and write the address of the configuration command buffer into the third doorbell command as the storage address of the configuration command in the device-side storage space; generate the configuration command in the configuration command buffer, and update the write pointer of the configuration command buffer.
[0033] Optionally, the configuration information includes the storage address of the page table to be updated and the page table size information.
[0034] According to another aspect of the present disclosure, the present disclosure provides an MMU configuration method, which is applied to a device side, and the method includes:
[0035] Step 400: In response to a third doorbell command sent by the host, determine a storage address of a configuration command of the MMU to be configured in a storage space of the device according to a storage address carried in the third doorbell command;
[0036] Step 402: Obtain a configuration command from the storage address, determine the MMU to be configured according to the identification information of the MMU to be configured carried in the configuration command, and configure the MMU to be configured according to the configuration information of the MMU to be configured carried in the configuration command.
[0037] Optionally, the configuration information includes the storage address of the page table to be updated and the page table size information.
[0038] Optionally, the configuration command is stored in a configuration command buffer in the device-side storage space, and the method further includes:
[0039] Step 404: Update the read pointer of the configuration command buffer, and determine whether there are configuration commands to be processed in the configuration command buffer by comparing the read pointer and the write pointer of the configuration command buffer. If yes, return to step 402.
[0040] According to another aspect of the present disclosure, the present disclosure provides a graphics processing system, which includes an MMU configuration module, and the MMU configuration module is configured to execute a device-side MMU configuration method.
[0041] According to another aspect of the present disclosure, an electronic component is provided, comprising the graphics processing system described in the above embodiment.
[0042] According to another aspect of the present disclosure, an electronic device is provided, comprising the electronic component described in the above embodiment and a processor, wherein the processor is configured to execute the MMU configuration method on the host side. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram of a host-side MMU configuration method flow chart provided by an embodiment of the present disclosure;
[0044] Figure 2 A schematic diagram of a method for configuring an MMU on a device side according to an embodiment of the present disclosure;
[0045] Figure 3 A schematic diagram of a flow chart of a host-side MMU configuration method provided by another embodiment of the present disclosure;
[0046] Figure 4 A schematic diagram of a flow chart of a method for configuring an MMU on a device side provided in accordance with another embodiment of the present disclosure. DETAILED DESCRIPTION
[0047] Before introducing the embodiments of the present disclosure, it should be noted that:
[0048] Some embodiments of the present disclosure are described as processing flows. Although the various operation steps of the flow may be given sequential step numbers, the operation steps therein may be implemented in parallel, concurrently or simultaneously.
[0049] In the embodiments of the present disclosure, the terms "first", "second", etc. may be used to describe various features, but these features should not be limited by these terms. These terms are used only to distinguish one feature from another.
[0050] The term “and / or” may be used in embodiments of the present disclosure. “And / or” includes any and all combinations of one or more of the associated features listed.
[0051] It should be understood that when describing the connection or communication relationship between two components, unless it is explicitly stated that the two components are directly connected or directly communicating, the connection or communication between the two components can be understood as direct connection or communication, or as indirect connection or communication through an intermediate component.
[0052] In order to make the technical solutions and advantages of the embodiments of the present disclosure more clearly understood, the exemplary embodiments of the present disclosure are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0053] The purpose of this disclosure is to provide an MMU configuration method, which is applied to the host side, such as Figure 1 As shown, the method includes:
[0054] Step 101: Send a first doorbell command to a device, where the first doorbell command carries identification information and configuration information of a MMU to be configured.
[0055] Furthermore, the configuration information may include but is not limited to: the starting address of the mapped virtual address, page table size information, etc.
[0056] Among them, the register offset of the first doorbell command can be customized.
[0057] The first doorbell commands corresponding to different MMUs can be stored in the same register position, and then the new first doorbell command will overwrite the processed first doorbell command. The first doorbell commands corresponding to different MMUs can also be stored in different register positions.
[0058] Step 103 , in response to the completion of processing the first doorbell command, determine whether there are MMUs to be configured, and if so, return to step 101 .
[0059] If there is no MMU to be configured, the process ends.
[0060] The above processing process can be, but is not limited to, implemented during the initialization process of the device side, and is used to configure the MMU in each IP module of the device side during the initialization process.
[0061] In the initialization phase, configuring the MMU specifically refers to mapping and configuring the MMU. For example, configuring the address mapping of the MMU involves several levels of page tables, the size of the page table, the storage address of the page table, etc. The specific configuration method can refer to the existing implementation method, which will not be repeated here.
[0062] The first doorbell command of the embodiment of the present disclosure is a customized DB (doorbell) command. In an optional implementation, the first doorbell command may include at least the following fields: an MMU identification field, which carries the identification information of the MMU currently to be configured; and a configuration information field, which carries the configuration information of the MMU currently to be configured.
[0063] In addition, the first doorbell command may further include a completion flag field, the value of which is used to indicate whether the first doorbell command has been processed. As an example and not a limitation, bit 0 of the first doorbell command is used as the completion flag field, and when the value of bit 0 is 1, it indicates that the first doorbell command has been processed, and when the value of bit 0 is 0, it indicates that the first doorbell command has not been processed.
[0064] The MMU configuration command may further include a command type field, the value of which is used to indicate the command type of the first doorbell command, and the command type at least includes the MMU configuration command type.
[0065] In one implementation, the MMU configuration command type specifically refers to an MMU configuration command in an initialization phase, to be distinguished from an MMU configuration command in an operation phase (ie, a page table update configuration command).
[0066] In the embodiment of the present disclosure, there are multiple implementations of the above step 103. In one feasible implementation, in response to the second doorbell command sent by the device side corresponding to the completion of the first doorbell command processing, it is determined whether there are any MMUs to be configured, and if so, it returns to step 101. In this implementation, the device side notifies the host side of the completion of the current first doorbell command processing through the second doorbell command. In another feasible implementation, in response to the second doorbell command sent by the device side corresponding to the completion of the first doorbell command processing, it is determined that the completion flag field value of the first doorbell command stored in the doorbell register of the device side is taken, and in response to the completion flag field value indicating that the first doorbell command processing is completed, it is determined whether there are any MMUs to be configured, and if so, it returns to step 101. In this implementation, the device side notifies the host side of the completion of the current first doorbell command processing through the second doorbell message and the completion flag field value.
[0067] Among them, the register offset of the second doorbell message can be customized.
[0068] The present disclosure also provides an MMU configuration method, which is applied to a device. Figure 2 As shown, the method includes:
[0069] Step 200, in response to a first doorbell command sent by the host, determine the MMU to be configured according to the identification information of the MMU to be configured carried in the first doorbell command, and configure the MMU to be configured according to the configuration information of the MMU to be configured carried in the first doorbell command.
[0070] Step 202: Notify the host end that the first doorbell command processing is completed.
[0071] The above processing can be implemented, but is not limited to, during the initialization process of the device side, and is used to configure the MMU in each IP module of the device side during the initialization process. In the initialization stage, configuring the MMU specifically refers to mapping and configuring the MMU. For example, configuring the address mapping of the MMU involves several levels of page tables, the size of the page table, the storage address of the page table, etc. The specific configuration method can refer to the existing implementation method, which will not be repeated here.
[0072] The first doorbell command of the embodiment of the present disclosure is a custom DB (doorbell) command. In a feasible implementation of step 200, the command type of the first doorbell command is determined to be an MMU configuration command type according to the value of the command type field of the first doorbell command; the MMU to be configured is determined according to the identification information of the MMU to be configured currently carried by the MMU identification field of the first doorbell command; and the MMU to be configured currently is configured according to the configuration information of the MMU to be configured currently carried by the configuration information field of the first doorbell command.
[0073] In addition, the first doorbell command may also include a completion flag field, the value of which is used to indicate whether the first doorbell command has been processed. As an example and not a limitation, bit 0 of the first doorbell command is used as the completion flag field, and when the value of bit 0 is 1, it indicates that the first doorbell command has been processed, and when the value of bit 0 is 0, it indicates that the first doorbell command has not been processed. Accordingly, in a feasible implementation of step 202, a second doorbell command corresponding to the completion of the first doorbell command is sent to the host end, and the completion flag field of the first doorbell command stored in the doorbell register of the device end is assigned a value indicating that the first doorbell command has been processed.
[0074] In another feasible implementation of step 202, a second doorbell command corresponding to the completion of processing the first doorbell command is sent to the host side.
[0075] Based on the same inventive concept, the present disclosure provides an MMU configuration method, which is applied to the host side, such as Figure 3 As shown, the method includes:
[0076] Step 301: Store a configuration command of at least one MMU to be configured into a device-side storage space, wherein the configuration command carries identification information and configuration information of the MMU to be configured.
[0077] The above configuration information may include, but is not limited to, the storage address of the page table to be updated and the page table size information.
[0078] Step 303: Send a third doorbell command corresponding to the configuration command to the device end, where the third doorbell command carries the storage address of the configuration command in the storage space of the device end.
[0079] Among them, the register offset of the third doorbell command can be customized.
[0080] The third doorbell command and the first doorbell command can be stored in the same register position, so they need to be distinguished by the command type of the doorbell command.
[0081] The above processing process can be implemented, but is not limited to, in the device-side running stage. If in the device-side running stage, the configuration of the MMU specifically refers to the updating of the page table.
[0082] In order to generate the above configuration commands, it is first necessary to apply for a cache space for storing configuration commands. In one feasible implementation, apply for a first configuration command buffer in the host-side storage space; generate the above configuration command in the first configuration command buffer; apply for a second configuration command buffer in the device-side storage space, and write the address of the second configuration command buffer into the third doorbell command as the storage address of the configuration command in the device-side storage space; copy the configuration command from the first configuration command buffer to the second configuration command buffer, and update the write pointer of the second configuration command buffer. In another feasible implementation, apply for a configuration command buffer in the device-side storage space, and write the address of the configuration command buffer into the third doorbell command as the storage address of the configuration command in the device-side storage space; generate a configuration command in the configuration command buffer, and update the write pointer of the configuration command buffer.
[0083] Based on the same inventive concept, the present disclosure provides an MMU configuration method, which is applied to a device side, such as Figure 4 As shown, the method includes:
[0084] Step 400: In response to a third doorbell command sent by the host, determine the storage address of the configuration command of the MMU to be configured in the device storage space according to the storage address carried in the third doorbell command.
[0085] Step 402: Obtain a configuration command from the storage address, determine the MMU to be configured according to the identification information of the MMU to be configured carried in the configuration command, and configure the MMU to be configured according to the configuration information of the MMU to be configured carried in the configuration command.
[0086] The above processing can be implemented but not limited to the device side running stage. If it is in the device side running stage, the configuration of the MMU specifically refers to the update of the page table. Optionally, the above configuration information includes the storage address of the page table to be updated and the page table size information.
[0087] In the above step 402, one configuration command is read and processed each time. If the host end stores two or more configuration commands at one time, then the process further includes step 404, updating the read pointer of the configuration command buffer, and comparing the read pointer and the write pointer of the configuration command buffer to determine whether there are configuration commands to be processed in the configuration command buffer, and if so, returning to step 402. The configuration commands are stored in the configuration command buffer of the storage space of the device end.
[0088] Based on the same inventive concept, the present disclosure provides a graphics processing system, which includes an MMU configuration module, and the MMU configuration module is configured to execute a device-side MMU configuration method. The graphics processing system can be, but is not limited to, a SOC (System on Chip) chip in an application. In some usage scenarios, the MMU configuration module is a CPU on the graphics processing system. In other usage scenarios, the MMU configuration module is dedicated hardware on the graphics processing system.
[0089] According to another aspect of the present disclosure, an electronic component is provided, including the graphics processing system of the above embodiment. In some usage scenarios, the product form of the electronic component is embodied as a graphics card; in other usage scenarios, the product form of the electronic component is embodied as a CPU motherboard.
[0090] According to another aspect of the present disclosure, an electronic device is provided, comprising the electronic components and a processor of the above-mentioned embodiment, wherein the processor is configured to execute the MMU configuration method on the host side. The processor may be, but is not limited to, the CPU of the host of the electronic device. In some usage scenarios, the product form of the electronic device is a portable electronic device, such as a smart phone, a tablet computer, a VR device, etc.; in some usage scenarios, the product form of the electronic device is a personal computer, a game console, etc.
[0091] Based on the problems existing in the existing solutions, the present disclosure proposes a new solution, defines a set of standard DB and CCB interfaces, and when the host-side CPU needs to configure the device-side MMU, the host-side CPU sends the corresponding commands to the device-side in a unified format, and the CPU or dedicated hardware module inside the device-side configures and manages the MMU unit. The technical solution provided by the embodiment of the present disclosure is more efficient because the device-side CPU directly reads and writes the MMU unit register, and reduces the host-side CPU overhead; the device-side register is not directly exposed to the host-side operation, which is safer and more flexible.
[0092] The MMU configuration scheme provided by the embodiment of the present disclosure is suitable for multi-MMU management based on heterogeneous computing. By defining a unified DB + CCB interface to implement the management of multiple MMUs on the device side, the read and write efficiency will be higher, and the operation will be safer and more flexible. The technical scheme provided by the embodiment of the present disclosure is introduced below in conjunction with specific examples.
[0093] In this embodiment, the technical solution provided by the embodiment of the present disclosure is used to manage multiple MMUs on the GPU SOC.
[0094] In the initialization phase, the CPU on the Host side will first load the driver of the GPU SOC to complete the initialization of the GPU SOC. During the initialization of the MMU on the GPU SOC, the GPU SOC Driver on the Host side sends a custom DB Cmd (i.e., the first doorbell command) to the GPU SOC (as the Device side) to complete the MMU initialization of each IP on the Device side in turn. Each MMU corresponds to a first doorbell command. The command format of the first doorbell command can refer to the above embodiment and will not be repeated here. After the CPU of the GPU SOC receives the doorbell command sent by the Host side, it will first determine the command type of the doorbell command. If it is an MMU configuration command, it will parse the doorbell command to obtain the MMUID (identification information of the MMU to be configured) and the configuration information of the MMU to be configured, and complete the initialization of the corresponding MMU. Finally, bit 0 of the received first doorbell command is set to 1, and the Host side is notified through the second doorbell command that the corresponding initialization has been completed. The host CPU responds to the second doorbell command, detects that bit0 of the sent first doorbell command is set to 1, and then initializes the next MMU until the initialization of the MMUs of all IPs is completed.
[0095] During the operation phase:
[0096] The GPU SOC Driver on the host side may need to switch page tables during operation. If page tables need to be switched, the GPU SOC Driver on the host side will first apply for a storage space to create CCB (Circular Command Buffer) and CCB Ctl, and initialize them. Among them, the configuration command is stored in CCB, and CCB Ctl is used to store the read pointer and write pointer of CCB. The address of the buffer obtained by the application is filled into the third doorbell command.
[0097] The GPU SOC Driver on the host side writes the page table information that needs to be updated to the corresponding CCB, and updates the WriteOffset (write pointer) in CCBCtl. After completion, it notifies the CPU of the GPU SOC through the third doorbell command. If there are multiple MMUs that need to update the page table, then each MMU corresponds to a CCB.
[0098] After the CPU of the GPU SOC receives the third doorbell command from the Host, it will first determine the command type of the doorbell command. If it is the third doorbell command (MMU configuration command used to update the page table), it will start a thread. In the thread, it will determine whether there is a new CCB (read pointer is not equal to write pointer) that needs to be processed. If so, it will parse the information in the corresponding CCB. If not, it will directly exit the thread.
[0099] The CPU of the GPU SOC obtains the starting address of the CCB from the third doorbell command through a thread, and then finds the current MMU configuration information according to the write pointer, obtains the address and size (Size) that need to be flushed, completes the flush operation of the page table, and updates the ReadOffset (read pointer) of the CCB after completion.
[0100] The CPU of the GPU SOC will complete the processing of all CCBs in sequence until the read pointer is equal to the write pointer (ReadOffset == WriteOffset), and then exit the thread.
[0101] Although the preferred embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present disclosure.
[0102] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.
Claims
1. A MMU configuration method, applied to a host side, the method comprising: Step 101: Send a first doorbell command to a device end, wherein the first doorbell command carries identification information and configuration information of a currently to-be-configured MMU, so that the device end determines the currently to-be-configured MMU according to the identification information of the currently to-be-configured MMU carried in the first doorbell command, and configures the currently to-be-configured MMU according to the configuration information of the currently to-be-configured MMU carried in the first doorbell command; Step 103 , in response to the completion of processing the first doorbell command, determine whether there are MMUs to be configured, and if so, return to step 101 .
2. The method according to claim 1, wherein the first doorbell command comprises: A completion flag field, wherein the value of the completion flag field is used to indicate whether the first doorbell command is processed successfully; A command type field, wherein a value of the command type field is used to indicate a command type of the first doorbell command, and the command type includes an MMU configuration command type; An MMU identification field, wherein the MMU identification field carries identification information of the MMU to be currently configured; Configuration information field, where the configuration information field carries configuration information of the MMU currently to be configured. 3 . The method according to claim 2 , wherein the configuration information of the MMU to be configured includes a start address of a mapped virtual address and page table size information.
4. According to the method of claim 2, step 103 comprises: In response to the second doorbell command sent by the device end and corresponding to the completion of the processing of the first doorbell command, determine whether there is an MMU to be configured, and if so, return to step 101; or, In response to a second doorbell command sent by the device end corresponding to the completion of processing of the first doorbell command, determine the value of the completion flag field of the first doorbell command stored in the doorbell register of the device end; in response to the value of the completion flag field of the first doorbell command stored in the doorbell register of the device end indicating that processing of the first doorbell command is completed, determine whether there are any MMUs to be configured; if so, return to step 101.
5. A method for configuring an MMU, applied to a device side, wherein the device side configures the MMU, the method comprising: Step 200: In response to a first doorbell command sent by the host, the MMU to be configured is determined according to the identification information of the MMU to be configured currently carried in the first doorbell command, and the MMU to be configured currently is configured according to the configuration information of the MMU to be configured currently carried in the first doorbell command; Step 202: Notify the host end that the first doorbell command processing is completed.
6. The method according to claim 5, step 200 comprises: Determining, according to a value of a command type field of the first doorbell command, that the command type of the first doorbell command is an MMU configuration command type; Determine the MMU to be configured currently according to the identification information of the MMU to be configured currently carried by the MMU identification field of the first doorbell command; The MMU to be configured is configured according to the configuration information of the MMU to be configured currently carried in the configuration information field of the first doorbell command. 7 . The method according to claim 6 , wherein the configuration information of the MMU to be configured comprises a start address of a mapped virtual address and page table size information.
8. The method according to claim 5, wherein step 202 comprises: Sending a second doorbell command corresponding to the completion of processing the first doorbell command to the host end; or, A second doorbell command corresponding to the completion of the processing of the first doorbell command is sent to the host end, and a completion flag field of the first doorbell command stored in the doorbell register of the device end is assigned to indicate that the processing of the first doorbell command is completed.
9. A MMU configuration method, applied to a host side, the method comprising: Step 301: storing a configuration command of at least one MMU to be configured into a device-side storage space, wherein the configuration command carries identification information and configuration information of the MMU to be configured; Step 303: Send a third doorbell command corresponding to the configuration command to the device side, wherein the third doorbell command carries a storage address of the configuration command in the storage space of the device side, so that the device side obtains the configuration command according to the storage address carried in the third doorbell command, determines the MMU to be configured according to the identification information of the MMU to be configured carried in the configuration command, and configures the MMU to be configured according to the configuration information of the MMU to be configured carried in the configuration command.
10. The method according to claim 9, before step 301, the method further comprises: Apply for a first configuration command buffer in the host storage space; generating the configuration command in the first configuration command buffer; Apply for a second configuration command buffer in the device-side storage space, and write the address of the second configuration command buffer into the third doorbell command as the storage address of the configuration command in the device-side storage space; copy the configuration command from the first configuration command buffer to the second configuration command buffer, and update the write pointer of the second configuration command buffer; or, Apply for a configuration command buffer in the device-side storage space, and write the address of the configuration command buffer into the third doorbell command as the storage address of the configuration command in the device-side storage space; generate the configuration command in the configuration command buffer, and update the write pointer of the configuration command buffer.
11. The method according to claim 9, wherein the configuration information includes a storage address of a page table to be updated and page table size information.
12. A method for configuring an MMU, applied to a device side, wherein the device side configures the MMU, the method comprising: Step 400: In response to a third doorbell command sent by the host, determine a storage address of a configuration command of the MMU to be configured in a storage space of the device according to a storage address carried in the third doorbell command; Step 402: Obtain a configuration command from the storage address, determine the MMU to be configured according to the identification information of the MMU to be configured carried in the configuration command, and configure the MMU to be configured according to the configuration information of the MMU to be configured carried in the configuration command. 13 . The method according to claim 12 , wherein the configuration information includes a storage address of the page table to be updated and page table size information.
14. The method according to claim 12, wherein the configuration command is stored in a configuration command buffer in the device-side storage space, and the method further comprises: Step 404: Update the read pointer of the configuration command buffer, and determine whether there are configuration commands to be processed in the configuration command buffer by comparing the read pointer and the write pointer of the configuration command buffer. If yes, return to step 402. 15 . A graphics processing system, comprising an MMU configuration module, wherein the MMU configuration module is configured to execute the method according to claim 5 or the method according to claim 12 .
16. An electronic assembly comprising the graphics processing system according to claim 15. 17 . An electronic device comprising a processor and the electronic component according to claim 16 , wherein the processor is configured to execute the method according to any one of claims 1 to 4 or the method according to any one of claims 9 to 11.
