USB implementation system and method based on the polling mode of the microkernel user program
By implementing the USB main control function in the user state of the microkernel operating system, establishing virtual memory and physical memory mapping, and using thread polling USB register status values, the problem of excessive CPU resource occupation in interrupt-driven mode is solved, and the system's real-time and stability are improved.
Patent Information
- Application Number
- CN202510356169.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-03-25
AI Technical Summary
The existing USB data transmission technology mainly relies on interrupt driving mode, which leads to excessive CPU resource utilization, affecting the real-time and stability of the system.
The USB implementation system is implemented based on the microkernel user program polling mode. By implementing the USB main control function in the user state of the microkernel operating system, the mapping relationship between virtual memory and physical memory is established, and the register status value of the USB main controller is polled by threads to dynamically allocate CPU resources, and detect and process USB events.
It improves the system's response speed and data processing efficiency, reduces the negative impact on system performance, simplifies the interaction between user state and hardware, and reduces the burden on the operating system kernel.
Smart Images

Figure CN119884004B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of industrial Internet of Things, and particularly to a USB implementation system and method based on the polling mode of a microkernel user program. Background Art
[0002] In the fields of modern industrial automation and intelligent manufacturing, the real-time transmission and processing of data are crucial for improving production efficiency and equipment performance. SuperSpeed USB (hereinafter referred to as USB 3.0) as a key data transmission interface technology plays a core role in the industrial Internet of Things (IIoT). It is widely used in device connection, data transmission, system integration, etc. Its characteristics of high speed, stability, and compatibility make it the preferred solution for communication between industrial devices. With the increasing demand for data transmission rate, USB 3.0 and its subsequent versions provide a transmission rate of up to 5 Gbps to 10 Gbps, greatly meeting the needs of industrial applications.
[0003] Existing USB data transmission technologies mainly rely on the interrupt-driven mode. In this mode, when a USB device needs to communicate with the host, it triggers an interrupt signal, and the host's CPU responds to this interrupt and calls the corresponding driver program function to process data reception or transmission. The USB 3.0 specification defines the concept of the Maximum Packet Size (MPS), usually 512 bytes. At a transmission rate of 5 Gbps, about 1,250,000 packets need to be processed per second, which requires the CPU to be able to quickly respond to interrupts and process a large number of packets. Since interrupt handling occupies a large amount of CPU resources, it may lead to an increase in system response time, thus affecting the real-time performance and stability of the entire system. Summary of the Invention
[0004] Embodiments of this application provide a USB implementation system based on the polling mode of a microkernel user program. To provide a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary part is not a general review, nor is it intended to identify key / important constituent elements or delineate the protection scope of these embodiments. Its sole purpose is to present some concepts in a simple form as a preface to the subsequent detailed description.
[0005] In a first aspect, embodiments of this application provide a USB implementation system based on the polling mode of a microkernel user program. The system includes:
[0006] An industrial Internet of Things service platform, a microkernel operating system, and a USB host controller; wherein,
[0007] The microkernel operating system and the USB host controller are integrated into the industrial Internet of Things service platform, and the microkernel operating system includes a USB driver in the user space;
[0008] The industrial Internet of Things service platform is used to initialize the USB driver when powered on;
[0009] The USB driver is used to establish a mapping relationship between virtual memory and physical memory during the initialization process and create a thread; in the created thread, based on the mapping relationship, poll the status value of the register in the USB host controller;
[0010] The USB host controller is used to respond to the polling instruction of the USB driver, obtain the status value of the register, and feedback it to the USB driver;
[0011] The USB driver is also used to receive the status value of the register feedback by the USB host controller, detect the target read / write event that occurs according to the status value of the register, and call the corresponding event handling function to handle the target read / write event.
[0012] Optionally, the physical memory corresponds to the physical address of the register, and the physical address includes the xHCI register address;
[0013] Establishing the mapping relationship between virtual memory and physical memory includes:
[0014] Determine the base address of the xHCI register address according to the memory mapping address provided by the CPU chip;
[0015] Determine the offset address of the xHCI register address according to the preset xHCI standard protocol;
[0016] Create the mapping memory size based on the range of the offset address;
[0017] Through the system function and the mapping memory size, map the base address to the kernel virtual address area to establish the mapping relationship between the virtual address and the physical address corresponding to the kernel virtual address area, and obtain the mapping relationship between virtual memory and physical memory.
[0018] Optionally, the physical address also includes the xHCI memory address;
[0019] The USB driver is also used to dynamically obtain the xHCI memory address and the virtual address corresponding to the xHCI memory address through the system function; establish the mapping relationship between the xHCI memory address and the virtual address corresponding to the xHCI memory address.
[0020] Optionally, the register in the USB host controller is a USB status register;
[0021] Poll the status value of the register in the USB host controller based on the mapping relationship, including:
[0022] When the duration between the current moment and the previous polling moment is equal to the preset period, obtain the target virtual address of the USB status register;
[0023] Query the target physical address corresponding to the target virtual address from the mapping relationship;
[0024] Access the target physical address through the target virtual address to read the status value of the register in the USB host controller.
[0025] Optionally, detect the target read / write event according to the status value of the register, including:
[0026] Analyze the status value of the register to check whether a preset bit in the register is set, and obtain the check result;
[0027] Determine the type of event that occurred according to the preset bit set in the register;
[0028] Take the event corresponding to the event type as the target read / write event.
[0029] Optionally, determine the type of event that occurred according to the preset bit set in the register, including:
[0030] When the register is the USBSTS register and the preset bit set in the register is the EINT bit, determine that an interrupt has occurred, and take the occurred interrupt as the type of event that occurred.
[0031] Optionally, call the corresponding event handling function to handle the target read / write event, including:
[0032] When the event type of the target read / write event is the event type of an interrupt occurring, clear the interrupt flag of USBSTS and clear the IP pending status in the register IMAN;
[0033] Call the xHCI event handling function to handle the target read / write event.
[0034] Optionally, determine the type of event that occurred according to the preset bit set in the register, including:
[0035] When the register is the PORTSC register and the preset bit set in the register is the CONNECT bit, determine that a new device is connected to the port, and take that a new device is connected to the port as the type of event that occurred.
[0036] Optionally, the industrial Internet of Things service platform is a product platform based on the RK3568 chip, the microkernel operating system is the XiZi microkernel operating system, and the main control function of the USB host controller is implemented in the user state.
[0037] In a second aspect, a USB implementation method based on the microkernel user program polling mode includes:
[0038] When the industrial Internet of Things service platform is powered on, it initializes the USB driver program;
[0039] During the initialization process of the USB driver program, a mapping relationship between virtual memory and physical memory is established, and a thread is created; in the created thread, based on the mapping relationship, the status values of the registers in the USB host controller are polled;
[0040] The USB host controller responds to the polling instruction of the USB driver program, obtains the status value of the register and feeds it back to the USB driver program;
[0041] The USB driver program receives the status value of the register fed back by the USB host controller, detects the target read / write event that occurs according to the status value of the register, and calls the corresponding event processing function to process the target read / write event.
[0042] In the embodiments of the present application, on the one hand, by creating a thread to poll the status values of the xHCI registers, this solution realizes real-time monitoring of USB events. Through the polling mechanism in the user program, CPU resources can be dynamically allocated, thereby reducing the negative impact on system performance. On the other hand, by implementing the USB main control function in the user state of the microkernel operating system, the response speed and data processing efficiency of the system can be improved. During the initialization process, the USB driver program establishes a mapping relationship between virtual memory and physical memory, enabling the user-state program to directly access the registers of the USB host controller. This mapping mechanism not only simplifies the interaction between the user state and the hardware but also reduces the burden on the operating system kernel.
[0043] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit this application. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.
[0045] Figure 1 is a schematic structural diagram of a USB implementation system based on the microkernel user program polling mode provided by the embodiments of this application;
[0046] Figure 2It is a schematic flowchart of a USB implementation method based on the polling mode of a microkernel user program provided by an embodiment of the present application. Detailed implementation manners
[0047] The following description and the accompanying drawings fully disclose specific implementation manners of the present application, enabling those skilled in the art to practice them.
[0048] It should be clear that the described embodiments are only a part of the embodiments of the present application, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts belong to the scope of protection of the present application.
[0049] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are only examples of systems and methods consistent with some aspects of the present application as detailed in the appended claims.
[0050] In the description of the present application, it should be understood that terms such as "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific circumstances. In addition, in the description of the present application, unless otherwise specified, "a plurality of" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0051] The present application provides a USB implementation system and method based on the polling mode of a microkernel user program. In an embodiment of the present application, on the one hand, by creating a thread to poll the status value of the xHCI register, this solution realizes real-time monitoring of USB events. Through the polling mechanism in the user program, CPU resources can be dynamically allocated, thereby reducing the negative impact on system performance. On the other hand, by implementing the USB host control function in the user state of the microkernel operating system, the response speed and data processing efficiency of the system can be improved. During the initialization process, the USB driver establishes a mapping relationship between virtual memory and physical memory, enabling the user-state program to directly access the registers of the USB host controller. This mapping mechanism not only simplifies the interaction between the user state and the hardware but also reduces the burden on the operating system kernel. The following uses exemplary embodiments for detailed description.
[0052] Please refer to Figure 1 , Figure 1It is a schematic diagram of the system structure of a USB implementation system based on the polling mode of the microkernel user program provided by an embodiment of the present application. The system includes: an industrial Internet of Things service platform, a microkernel operating system, and a USB host controller; the microkernel operating system and the USB host controller are integrated in the industrial Internet of Things service platform, and the microkernel operating system includes a USB driver in the user state.
[0053] Among them, the industrial Internet of Things service platform is a service platform designed for industrial Internet of Things (IIoT) applications. It usually includes hardware (such as processors, sensors, communication modules, etc.) and software (such as operating systems, middleware, application programs, etc.) to support device connection, data collection, processing, and analysis in industrial environments. The industrial Internet of Things service platform can realize remote monitoring, control, and management of devices, improving production efficiency and automation levels. The microkernel operating system is an operating system architecture whose core (kernel) only includes the most basic functions, such as process management, memory management, etc. Other functions, such as file systems, network protocols, device drivers, etc., are implemented in the user state. The advantages of this architecture include modularity, security, flexibility, and scalability. The microkernel operating system is suitable for embedded systems and real-time systems that require high security and stability. The USB host controller is a hardware component responsible for managing and controlling USB devices (such as keyboards, mice, storage devices, etc.). It implements the USB protocol and processes data transmission and control of USB devices. In USB 3.0, the host controller usually adopts the xHCI (eXtensible Host Controller Interface) standard, supporting high-speed data transmission and more complex device management functions. xHCI (eXtensible Host Controller Interface) is a USB host controller interface standard led by Intel. In terms of hardware, the xHCI controller is usually integrated in the motherboard chipset or exists as an independent USB 3.0 / 3.1 / 3.2 controller chip. In terms of software, the operating system needs to include an xHCI driver to communicate with the xHCI controller. These drivers are responsible for initializing the controller, configuring the device, processing data transmission requests, and managing the power state, etc. The USB driver in the user state is a software module running in the user state of the microkernel operating system, responsible for interacting with the USB host controller to implement the functions of USB devices. Different from traditional kernel-state drivers, user-state drivers have higher flexibility and portability, while reducing the switching overhead between the kernel state and the user state. User-state drivers interact with the kernel state through system calls to access and control the USB host controller.
[0054] In some embodiments of the present application, an industrial Internet of Things service platform is used to initialize a USB driver program when powered on; the USB driver program is used to establish a mapping relationship between virtual memory and physical memory and create a thread during the initialization process; in the created thread, based on the mapping relationship, poll the status value of the register in the USB host controller; the USB host controller is used to respond to the polling instruction of the USB driver program, obtain the status value of the register, and feedback it to the USB driver program; the USB driver program is further used to receive the status value of the register feedback by the USB host controller, detect the target read / write event that occurs according to the status value of the register, and call the corresponding event handling function to handle the target read / write event.
[0055] In the embodiments of the present application, on the one hand, by creating a thread to poll the status value of the xHCI register, this solution realizes the real-time monitoring of USB events. Through the polling mechanism in the user program, CPU resources can be dynamically allocated, thereby reducing the negative impact on system performance. On the other hand, by implementing the USB host control function in the user state of the microkernel operating system, the response speed and data processing efficiency of the system can be improved. During the initialization process, the USB driver program establishes a mapping relationship between virtual memory and physical memory, enabling the user-state program to directly access the registers of the USB host controller. This mapping mechanism not only simplifies the interaction between the user state and the hardware but also reduces the burden on the operating system kernel.
[0056] Among them, the physical memory corresponds to the physical address of the register, and the physical address includes the xHCI register address.
[0057] In some embodiments of the present application, the specific process of establishing a mapping relationship between virtual memory and physical memory includes: determining the base address of the xHCI register address according to the memory mapping address provided by the CPU chip; determining the offset address of the xHCI register address according to the preset xHCI standard protocol; creating the size of the mapped memory based on the range of the offset address; mapping the base address to the kernel virtual address area through the system function and the size of the mapped memory to establish a mapping relationship between the virtual address and the physical address corresponding to the kernel virtual address area, and obtaining the mapping relationship between virtual memory and physical memory.
[0058] For example, the base address is mapped to the kernel virtual address area through a system function (such as the ioremap function in Linux) and the size of the mapped memory.
[0059] Among them, the physical address also includes the xHCI memory address. The xHCI memory address refers to the memory required by xHCI, including the memory corresponding to DCBAAP, the command memory, the event memory, and the scratchpad memory. The xHCI standard protocol requires that the memory address written to the register is the physical address. Therefore, in the user program, it is necessary to call the system function to dynamically obtain the physical address and the corresponding virtual address, and write the physical address to the corresponding register of xHCI.
[0060] In some embodiments of the present application, the USB driver is further configured to dynamically obtain the xHCI memory address and the virtual address corresponding to the xHCI memory address through the system function; establish a mapping relationship between the xHCI memory address and the virtual address corresponding to the xHCI memory address.
[0061] Among them, the register in the USB host controller is the USB status register.
[0062] In some embodiments of the present application, based on the mapping relationship, the specific process of polling the status value of the register in the USB host controller includes: when the duration between the current moment and the previous polling moment is equal to the preset period, obtaining the target virtual address of the USB status register; querying the target physical address corresponding to the target virtual address from the mapping relationship; accessing the target physical address through the target virtual address to read the status value of the register in the USB host controller.
[0063] In some embodiments of the present application, the specific process of detecting the target read / write event according to the status value of the register includes: parsing the status value of the register to check whether a preset bit in the register is set, obtaining the check result; determining the type of the event that occurs according to the preset bit set in the register; taking the event corresponding to the event type as the target read / write event.
[0064] In some embodiments of the present application, the specific process of determining the type of the event that occurs according to the preset bit set in the register includes: when the register is the USBSTS register and the preset bit set in the register is the EINT bit, determining that an interrupt occurs, and taking the occurred interrupt as the type of the event that occurs.
[0065] In some embodiments of the present application, calling the corresponding event handling function to handle the target read / write event specifically includes: when the event type of the target read / write event is the event type of an interrupt occurring, clearing the interrupt flag of USBSTS and clearing the IP pending status in the register IMAN; calling the xHCI event handling function to handle the target read / write event.
[0066] Among them, the xHCI standard protocol provides a USB status register (USBSTS), where the Event Interrupt (EINT) bit represents the interrupt status. The xHCI standard protocol also provides an interrupt management register (IMAN), which can configure whether the interrupt is enabled (IE) and set the interrupt pending status (IP).
[0067] In some embodiments of the present application, the specific process of determining the type of event that occurs according to the preset bits set in the register includes: when the register is the PORTSC register and the preset bit set in the register is the CONNECT bit, it is determined that a new device is connected to the port, and that a new device is connected to the port is used as the type of event that occurs.
[0068] Specifically, the industrial Internet of Things service platform is a product platform based on the RK3568 chip, the microkernel operating system is the XiZi microkernel operating system, and the main control function of the USB host controller is implemented in the user state.
[0069] In the embodiments of the present application, taking advantage of the fact that the microkernel operating system can implement peripheral drivers in the user state, the status of specific registers of the USB host controller (xHCI) is detected through a polling mechanism. When an event is detected, an event handling task is called. Through the polling mechanism in the user program, CPU resources can be dynamically allocated, thereby reducing the negative impact on system performance.
[0070] Please refer to Figure 2 , which is a schematic flow diagram of a USB implementation method based on the polling mode of the microkernel user program provided by the embodiments of the present application. As Figure 2 shown, the method may include the following steps:
[0071] S101, when the industrial Internet of Things service platform is powered on, initialize the USB driver program;
[0072] S102, during the initialization process of the USB driver program, establish a mapping relationship between virtual memory and physical memory, and create a thread; in the created thread, based on the mapping relationship, poll the status value of the register in the USB host controller;
[0073] S103, the USB host controller responds to the polling instruction of the USB driver program, obtains the status value of the register, and feeds it back to the USB driver program;
[0074] S104, the USB driver program receives the status value of the register fed back by the USB host controller, detects the target read / write event that occurs according to the status value of the register, and calls the corresponding event handling function to handle the target read / write event.
[0075] Among them, the mapping relationship between virtual memory and physical memory is a mechanism created by the operating system that allows software components to access actual physical memory addresses through virtual addresses. A thread is a program fragment that executes concurrently and is used to perform specific tasks, such as polling hardware registers. The register status value is the value stored in the USB host controller register, which reflects the status of the controller and the events that have occurred. Target read / write events refer to specific events that occur in the USB device, such as device connection, disconnection, data transfer completion, etc., and these events require special handling by the driver.
[0076] In some embodiments, when the industrial Internet of Things service platform starts, the microkernel operating system loads and initializes the USB driver in the user state. The USB driver uses system calls to establish the mapping relationship between virtual memory and physical memory in order to access the registers of the USB host controller. The driver creates one or more threads to poll the status register of the USB host controller. In the polling thread, the driver periodically reads the status register of the USB host controller to check if any events have occurred. The USB host controller responds to the polling instructions of the driver and feeds back the status value of the register to the driver. The driver detects the events that have occurred based on the status value of the register and calls the corresponding event handling functions. According to the detected event type, the driver calls the corresponding handling functions to handle the events, such as initializing the device, processing data transfer, etc.
[0077] In the embodiments of the present application, on the one hand, by creating a thread to poll the status value of the xHCI register, this solution realizes real-time monitoring of USB events. Through the polling mechanism in the user program, CPU resources can be dynamically allocated, thereby reducing the negative impact on system performance. On the other hand, by implementing the USB host control function in the user state of the microkernel operating system, the response speed and data processing efficiency of the system can be improved. During the initialization process, the USB driver establishes the mapping relationship between virtual memory and physical memory, enabling the user-state program to directly access the registers of the USB host controller. This mapping mechanism not only simplifies the interaction between the user state and the hardware but also reduces the burden on the operating system kernel.
[0078] The present application also provides a computer-readable medium, on which program instructions are stored. When the program instructions are executed by a processor, they implement the USB implementation method based on the microkernel user program polling mode provided by each of the above method embodiments.
[0079] The present application also provides a computer program product containing instructions. When it runs on a computer, it causes the computer to execute the USB implementation method based on the microkernel user program polling mode of each of the above method embodiments.
[0080] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program implemented based on the USB of the microkernel user program polling mode can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium implemented based on the USB of the microkernel user program polling mode can be a magnetic disk, an optical disk, a read-only memory, or a random access memory, etc.
[0081] The above-disclosed are only the preferred embodiments of the present application. Of course, the scope of rights of the present application cannot be limited thereby. Therefore, equivalent changes made according to the claims of the present application still fall within the scope covered by the present application.
Claims
1. A USB implementation system based on the polling mode of the microkernel user program, characterized in that The system includes: An industrial Internet of Things service platform, a microkernel operating system, and a USB host controller; wherein, The microkernel operating system and the USB host controller are integrated in the industrial Internet of Things service platform, and the microkernel operating system includes a USB driver in the user space; The industrial Internet of Things service platform is used to initialize the USB driver when powered on; The USB driver is used to establish a mapping relationship between virtual memory and physical memory and create a thread during initialization; in the created thread, based on the mapping relationship, poll the status value of the register in the USB host controller; The USB host controller is used to respond to the polling instruction of the USB driver, obtain the status value of the register, and feedback it to the USB driver; The USB driver is further used to receive the status value of the register feedback by the USB host controller, detect the target read / write event that occurs according to the status value of the register, and call the corresponding event handling function to handle the target read / write event.
2. The system according to claim 1, wherein The physical memory corresponds to the physical address of the register, and the physical address includes the xHCI register address; Establishing a mapping relationship between virtual memory and physical memory includes: Determining the base address of the xHCI register address according to the memory mapping address provided by the CPU chip; Determining the offset address of the xHCI register address according to the preset xHCI standard protocol; Creating the size of the mapped memory based on the range of the offset address; Mapping the base address to the kernel virtual address area through a system function and the size of the mapped memory to establish a mapping relationship between the virtual address corresponding to the kernel virtual address area and the physical address, so as to obtain a mapping relationship between virtual memory and physical memory.
3. The system according to claim 2, wherein The physical address further includes the xHCI memory address; The USB driver is further used to dynamically obtain the xHCI memory address and the virtual address corresponding to the xHCI memory address through a system function; establish a mapping relationship between the xHCI memory address and the virtual address corresponding to the xHCI memory address.
4. The system according to claim 2, wherein The register in the USB host controller is a USB status register; Polling the status value of the register in the USB host controller based on the mapping relationship includes: When the duration between the current moment and the previous polling moment is equal to the preset period, obtaining the target virtual address of the USB status register; Querying the target physical address corresponding to the target virtual address from the mapping relationship; Accessing the target physical address through the target virtual address to read the status value of the register in the USB host controller.
5. The system according to claim 1, characterized in that, Detecting the target read / write event that occurs according to the status value of the register includes: Parsing the status value of the register to check whether a preset bit in the register is set, and obtaining a check result; Determining the type of event that occurs according to the preset bit set in the register; Taking the event corresponding to the event type as the target read / write event.
6. The system according to claim 5, wherein Determining the type of event that occurred according to the preset bits set in the register includes: When the register is the USBSTS register and the preset bit set in the register is the EINT bit, it is determined that an interrupt has occurred, and the occurred interrupt is used as the type of event that occurred.
7. The system according to claim 6, wherein Invoking the corresponding event handling function to handle the target read / write event includes: When the type of the target read / write event is the type of event where an interrupt has occurred, clear the interrupt flag of USBSTS and clear the IP pending status in the register IMAN; Invoke the xHCI event handling function to handle the target read / write event.
8. The system according to claim 5, wherein Determining the type of event that occurred according to the preset bits set in the register includes: When the register is the PORTSC register and the preset bit set in the register is the CONNECT bit, it is determined that a new device is connected to the port, and that a new device is connected to the port is used as the type of event that occurred.
9. The system according to claim 1, characterized in that The industrial Internet of Things service platform is a product platform based on the RK3568 chip, the microkernel operating system is the XiZi microkernel operating system, and the main control function of the USB host controller is implemented in the user state.
10. A USB implementation method based on the polling mode of a microkernel user program, characterized in that, The method includes: When the industrial Internet of Things service platform is powered on, initialize the USB driver; During the initialization process, the USB driver establishes a mapping relationship between virtual memory and physical memory and creates a thread; in the created thread, based on the mapping relationship, poll the status value of the register in the USB host controller; The USB host controller responds to the polling instruction of the USB driver, obtains the status value of the register, and feeds it back to the USB driver; The USB driver receives the status value of the register fed back by the USB host controller, detects the target read / write event that occurred according to the status value of the register, and invokes the corresponding event handling function to handle the target read / write event.
Citation Information
Patent Citations
Device authentication
CN110069439A
Direct memory access testing method and device based on virtual kernel environment
CN117311896A