WO2020118567A1 - 字符设备驱动方法、装置、系统和计算机可读介质 - Google Patents

字符设备驱动方法、装置、系统和计算机可读介质 Download PDF

Info

Publication number
WO2020118567A1
WO2020118567A1 PCT/CN2018/120661 CN2018120661W WO2020118567A1 WO 2020118567 A1 WO2020118567 A1 WO 2020118567A1 CN 2018120661 W CN2018120661 W CN 2018120661W WO 2020118567 A1 WO2020118567 A1 WO 2020118567A1
Authority
WO
WIPO (PCT)
Prior art keywords
character
data packet
interface
operating system
linux operating
Prior art date
Application number
PCT/CN2018/120661
Other languages
English (en)
French (fr)
Inventor
宗靖国
周晶晶
柳辛
Original Assignee
西安诺瓦电子科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西安诺瓦电子科技有限公司 filed Critical 西安诺瓦电子科技有限公司
Priority to PCT/CN2018/120661 priority Critical patent/WO2020118567A1/zh
Publication of WO2020118567A1 publication Critical patent/WO2020118567A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices

Definitions

  • the present application relates to the technical field of embedded systems, in particular to a method and device for driving a character device based on a Linux operating system, a computer-readable medium, and an embedded system based on a Linux operating system.
  • the drivers of Linux operating system are mainly divided into three types, namely: character device driver, network device driver and block device driver.
  • Each character device driver in the Linux operating system corresponds to a device.
  • the system call is the interface between the operating system kernel and the application program.
  • the device driver is the interface between the operating system kernel and the machine hardware.
  • the device driver shields the details of the hardware for the application program. In this way, in the eyes of the application program, the hardware device driver is only A device file, the application program can operate the hardware device like an ordinary file.
  • the device driver is part of the kernel, which completes the following functions: 1. Initialize and release the device; 2. Drive the device and the kernel to transfer data; 3. Provide a data transmission interface for the application; 4. Monitor the operating status of the equipment and deal with equipment problems.
  • An example method for managing and controlling these devices is to write a corresponding device driver for each device and provide a corresponding interface for the application program.
  • each I2C device in an embedded system All need to write an I2C device driver separately, and the application layer also needs to write the corresponding application program for each (class) device.
  • the corresponding device drivers must be written one by one.
  • the interface between each device driver and the upper-layer application program that is, the user-layer application program
  • is also not unified which greatly increases the difficulty and complexity of managing and controlling I2C devices. It can be seen that such a method will make the embedded system more complicated and bloated with the increase of various devices, and is very unfavorable for the management and control of the device.
  • Each (class) device must write a corresponding device driver separately, thereby increasing the complexity of the embedded system, poor reuse, and inconvenient access;
  • the interface with the upper layer is not unified, and the upper layer application is not used to access and control the device;
  • Embodiments of the present application provide a character device driving method, device, system, and computer-readable medium based on a Linux operating system, which can achieve the technical effects of strong device driver multiplexing, convenient user layer access, and low maintenance difficulty.
  • a method for driving a character device based on a Linux operating system includes: providing an operation interface to a user layer through a Linux operating system kernel to receive and package user layer data to obtain a device data packet, and The device data packet is stored in a linked list; the device data packet is obtained from the linked list, and a registration interface with a callback function is provided to pass in the device data packet through a data pointer; and the incoming device data packet Perform parsing to obtain the business content, and control the character device through the bus interface according to the business content.
  • the character device driving method further includes: acquiring device information of the character device and the mode and requirements of data transmission, and providing it to the Linux operating system kernel.
  • the parsing the incoming device data packet to obtain the business content specifically includes: extracting a general driving instruction corresponding to the character device in the device data packet; extracting the The personalized drive instruction corresponding to the character device in the device data packet.
  • the bus interface is selected from a serial interface or a parallel interface.
  • the serial interface includes an SPI bus interface connected to an SPI device or an I2C bus interface connected to an I2C device.
  • the embodiment of the present application also provides a character device driving device based on the Linux operating system, including: an interface function driving module for providing an operating interface to the user layer through the Linux operating system kernel to receive and package user layer data Obtain the device data packet, and store the device data packet in the linked list; a data distribution driver module is used to obtain the device data packet from the linked list, and provides a registration interface with a callback function to pass in through the data pointer The device data packet; and a device driver module, used to parse the incoming device data packet to obtain business content, and control the character device through the bus interface according to the business content.
  • an interface function driving module for providing an operating interface to the user layer through the Linux operating system kernel to receive and package user layer data Obtain the device data packet, and store the device data packet in the linked list
  • a data distribution driver module is used to obtain the device data packet from the linked list, and provides a registration interface with a callback function to pass in through the data pointer The device data packet
  • a device driver module used to parse
  • the character device driving device further includes: a hardware device initialization driver module, configured to obtain device information of the character device and data transmission modes and requirements, and provide it to the Linux operating system Kernel.
  • a hardware device initialization driver module configured to obtain device information of the character device and data transmission modes and requirements, and provide it to the Linux operating system Kernel.
  • the device driver module includes: a first extraction unit for extracting a general drive instruction corresponding to the character device in the device data packet; and a second extraction unit for extraction The personalized drive instruction corresponding to the character device in the device data packet.
  • the device driver module is selected from a serial interface device driver module or a parallel interface device driver module.
  • the serial interface device driver module is selected from an SPI device driver module or an I2C device driver module, the SPI device driver module is used to connect an SPI device through an SPI bus interface, and the I2C device driver The module is used to connect I2C devices through the I2C bus interface.
  • a character device driving system based on a Linux operating system includes a memory and a processor, the memory stores a computer program, and the processor executes the foregoing character device when the computer program is running Drive method.
  • a computer-readable medium provided by an embodiment of the present application stores computer-executable instructions; wherein the computer-executable instructions are used to execute the foregoing character device driving method.
  • the character device driving method, device, system and computer-readable medium of the embodiments of the present application can drive multiple character devices connected in a bus manner, and each type of device only needs to be driven, and the device driver has strong multiplexing , Avoiding repeated development work, saving a lot of human resource costs and development costs; moreover, multiple devices provide only a unified interface upwards, and the user layer can access different devices; in addition, the software responsible for the user layer Developers do not need to understand how to implement the driver internally, which reduces the difficulty of development and maintenance of user-level software engineers and improves work efficiency. Therefore, the embodiments of the present application can achieve the technical effects of strong device driver reuse, convenient user layer access, and low difficulty in development and maintenance.
  • FIG. 1 is a schematic structural diagram of a serial interface device driver provided by the first embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of the device driving module in FIG. 1.
  • FIG. 3 is a schematic flowchart of a method for driving a character device based on a Linux operating system according to a second embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another character device driving method based on a Linux operating system provided by a second embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a character device driving device based on a Linux operating system according to a third embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of the device driving module in FIG. 5.
  • FIG. 7 is a schematic structural diagram of a character device driving system based on a Linux operating system according to a fourth embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a computer-readable medium according to a fifth embodiment of the present application.
  • 10-serial interface device driver 11-interface function driver module; 13-data distribution driver module; 15-device driver module; 151-universal driver extraction unit; 153-personalized driver extraction unit; 17-hardware device initialization driver module ; 20-Linux operating system kernel; 21-serial bus interface; 30-serial interface device;
  • 300-character device driver 310-interface function driver module; 330-data distribution driver module; 350-device driver module; 351-first extraction unit; 353-second extraction unit; 37-hardware device initialization driver module
  • a character device driver based on a Linux operating system such as a serial interface device driver 10, provided in the first embodiment of the present application includes: an interface function driver module 11, a data distribution driver module 13, and multiple device drivers Module 15 and hardware device initialize drive module 17.
  • the serial interface device driver 10 is used to drive a target serial interface device among multiple serial interface devices 30.
  • the interface function driving module 11 is used to provide an operation interface to the user layer through the Linux operating system kernel 20 to receive and package user layer data to obtain a device data packet (that is, a comif_ioctl_burst_t structure described later), and transfer the device data packet
  • the linked list is stored for the lower device driver module 15 to call.
  • the device data packet is typically a structure that defines multiple data variables to store data of the target serial interface device, including, for example, the address, data type, and read and write length of the target serial interface device.
  • the linked list is a non-continuous and non-sequential storage structure on the physical storage unit, and the logical order of the data elements, such as the device data packet, is implemented through the pointer linking order in the linked list. This structure of the linked list can make full use of the memory space of the computer to achieve flexible dynamic memory management. Use a linked list to centrally manage the data of multiple serial interface devices.
  • the interface function driving module 11 is a character device driving module.
  • the data distribution driving module 13 connects the interface function driving module 11 and a plurality of device driving modules 15 for obtaining the device data packet from the linked list and for providing a registration interface with a callback function to the plurality of device driving modules 15 2.
  • the device data packet is transferred to the target device driver module in the plurality of device driver modules 15 through the data pointer, such as the target serial interface device address and data type in the device data packet.
  • a plurality of device driver modules 15 are used to connect a plurality of serial interface devices 30 through, for example, a serial bus interface 21, wherein the target device driver module is used to communicate according to the target serial interface device address and data type in the device data packet
  • the incoming device data packet is parsed, for example, various parameters and instructions in the device data packet are extracted to obtain business content, and the serial bus interface 21 is used to drive and control multiple serial interface devices 30 according to the business content.
  • Target serial interface device is used to connect a plurality of serial interface devices 30 through, for example, a serial bus interface 21, wherein the target device driver module is used to communicate according to the target serial interface device address and data type in the device data packet
  • the incoming device data packet is parsed, for example, various parameters and instructions in the device data packet are extracted to obtain business content, and the serial bus interface 21 is used to drive and control multiple serial interface devices 30 according to the business content.
  • Target serial interface device is used to drive and control multiple serial interface devices 30 according to the business content.
  • the hardware device initialization driver module 17 is used to connect the Linux operating system kernel 20 and a plurality of serial interface devices 30 (for example, the hardware device initialization driver module 17 is connected to the plurality of serial interface devices 30 through the serial bus interface 21, for example), and In order to obtain the device information of multiple serial interface devices 30 and the mode and requirements of data transmission, and provide them to the Linux operating system kernel 20.
  • the device driving module 15 includes a general driving extraction unit 151 and a personalized driving extraction unit 153.
  • the universal driver extraction unit 151 and the personalized driver extraction unit 153 are divided by the switch statement in the device driver module 15, that is, the part before the switch statement in the device driver module 15 is the universal driver extraction unit 151, after the switch statement The part of is the personalized drive extraction unit 153.
  • the universal drive extraction unit 151 is used to extract a universal drive instruction corresponding to the serial interface device 30 connected to the device drive module 15.
  • the personalized drive extraction unit 153 is used to extract a personalized drive instruction corresponding to the serial interface device 30 connected to the device drive module 15.
  • the personalized drive extraction unit 153 differentiates and executes corresponding instructions to drive different serial interface devices through the data type parameters in the device data packet.
  • the device driver module 15 may be selected from, for example, a serial interface device driver module, a parallel interface device driver module, or a virtual bus device driver module such as a platform bus device driver.
  • the universal driving instruction is an instruction common to the serial interface device driving module, the parallel interface device driving module, and the virtual bus device driving module. More specifically, the serial interface device driver module is selected from the SPI device driver module or the I2C device driver module.
  • the SPI device driver module is used to connect multiple SPI devices through a serial bus interface 21 such as an SPI bus interface
  • the I2C device driver module is used to connect multiple I2C devices through a serial bus interface 21 such as an I2C bus interface, for example equipment.
  • the multiple device driver modules 15 are multiple serial interface device driver modules
  • the multiple device driver modules 15 include one SPI device driver module and the multiple serial interface devices 30 include multiple connectors connected to the SPI Multiple SPI devices for device driver modules.
  • the common part of the multiple SPI device driver modules is located in the universal drive extraction unit 151, and the personalized part of each SPI device driver module is located in the personalized drive extraction unit 153.
  • the common part of the driver module of the SPI device is completed in the probe (drive processing function) of the driver.
  • Each SPI device will be executed once it is matched to the driver module of the SPI device; and the personalized part is determined by the driver module of the SPI device.
  • the switch statement in the attach function in the probe function is completed according to the serial number of the target serial interface device.
  • serial interface device driver 10 for example, it is implemented by a device driver located on the kernel layer of the Linux operating system.
  • the interface function driver module 11 (or comifdev driver) mainly provides a unified interface ioctl for the user layer (or application layer), so that the user can connect multiple serials connected to the same bus through the unified interface
  • the interface device 30 performs operations such as open and ioctl.
  • the data distribution driver module 13 (or comifstub driver) obtains the data sent from the user layer in the comifdev driver, and provides a registration interface to multiple device driver modules 15; and the multiple device driver modules 15 are used, for example, through a serial bus interface (For example, SPI interface or I2C interface)
  • a plurality of serial interface devices 30 are connected to drive and control a target serial interface device among the plurality of serial interface devices 30.
  • the hardware device initialization driver module 17 (or sysinit driver) is used to connect the Linux operating system kernel and the plurality of serial interface devices 30 respectively, and to obtain device information and data of the plurality of serial interface devices 30
  • the transmission mode and requirements are provided to the Linux operating system kernel 20.
  • the software implementation of the device driver includes data transmission and device matching.
  • the comifdev driver has nothing to do with the device. It is used to provide an interface to the user layer.
  • the user layer sends the data to the ioctl function of comifdev.
  • the ioctl function packages the data of the user layer and sends it to the comifstub driver.
  • the driver provides a registration interface for the underlying device driver such as the spidev driver.
  • the registration interface has a callback function, and the data is passed to the spidev driver through the data pointer.
  • the spidev driver parses the data and according to the data issued by the user layer A serial interface device related to business content execution operations.
  • the character device driving method, device, system and computer-readable medium of the embodiments of the present application can drive and control multiple character devices connected in a bus manner, and each type of device only needs one driver to implement, and the device driver is reusable Strong, avoiding duplication of development work, saving a lot of human resource costs and development costs; moreover, multiple devices only provide a unified interface, and the user layer can access different devices; in addition, the user layer is responsible for Software developers do not need to understand how to implement the driver internally, which reduces the difficulty of development and maintenance of user-level software engineers and improves work efficiency. Therefore, the embodiments of the present application can achieve the technical effects of strong device driver reuse, convenient user layer access, and low difficulty in development and maintenance.
  • the serial interface device driver 10 may include only one I2C device driver module.
  • the common parts of multiple I2C device driver modules can be integrated into the common driver extraction unit of the I2C device driver module, and then differentiated according to the personalized part of each I2C device to obtain a personalized driver extraction unit, so that only one serial interface device
  • the driver 10 can drive multiple I2C devices.
  • each I2C device is connected to the sysinit driver.
  • the function of the sysinit driver is to manage and register each device in the system. All device resource information is integrated into this driver module, and it is uniformly registered into the system when needed. When adding or uninstalling an I2C device, you only need to add or delete the I2C device information in the corresponding position of the I2C device driver module.
  • the upper layer application accesses the comif driver through open, write, read, ioctl, close and other functions, and packages the device parameter information and data to be passed into the comif_ioctl_burst_t structure, and then through the Linux operating system
  • the standard interface function ioctl provided by the kernel is passed to the comif driver, and then the comif driver calls its own ioctl function comifioctl to pass the passed structure to the comifstub driver.
  • the comifstub driver passes the structure to the comif_stub_call_ioctl to I2C device driver module, the i2cdev_core_ioctl function in the I2C device driver module analyzes the structure, extracts the I2C device information, instructions and data to be accessed, and drives the target serial interface device.
  • the main function of the comif driver is to provide standard ioctl and other access interfaces for upper-layer applications.
  • the function of the comifstub driver is to provide the operating interface from the top to the bottom, and it can be extended to connect to other types of bus drivers.
  • the character device driving method based on the Linux operating system includes the following steps:
  • S11 Provide an operation interface to the user layer through the Linux operating system kernel to receive and package user layer data to obtain a device data packet, and store the device data packet in a linked list;
  • S13 Obtain the device data packet from the linked list, and provide a registration interface with a callback function to pass in the device data packet through a data pointer;
  • the bus interface is selected from a serial interface or a parallel interface.
  • the serial interface includes an SPI bus interface connected to an SPI device or an I2C bus interface connected to an I2C device.
  • the character device driving method provided in this embodiment further includes steps:
  • a character device driving device 300 based on a Linux operating system provided by the third embodiment of the present application.
  • the character device driving apparatus 300 includes: an interface function driving module 310, which is used to provide an operation interface to the user layer through the Linux operating system kernel to receive and package user layer data to obtain a device data packet, and store the device data packet Into the linked list; the data distribution driver module 330 is used to obtain the device data packet from the linked list and provide a registration interface with a callback function to pass in the device data packet through the data pointer; and the device driver module 350, used Yu analyzes the incoming data packet of the device to obtain service content, and controls the character device through the bus interface according to the service content.
  • an interface function driving module 310 which is used to provide an operation interface to the user layer through the Linux operating system kernel to receive and package user layer data to obtain a device data packet, and store the device data packet Into the linked list
  • the data distribution driver module 330 is used to obtain the device data packet from the linked list and provide a registration interface with a
  • the character device driving apparatus 300 provided in this embodiment further includes: a hardware device initialization driver module 370, configured to obtain device information of the character device and data transmission modes and requirements, and provide the Linux operating system kernel.
  • a hardware device initialization driver module 370 configured to obtain device information of the character device and data transmission modes and requirements, and provide the Linux operating system kernel.
  • the device driver module 350 includes, for example, a first extraction unit 351 for extracting a general drive instruction corresponding to the character device in the device data packet; and a second extraction unit 353 for Extracting a personalized driving instruction corresponding to the character device in the device data packet.
  • the fourth embodiment of the present application provides a character device driving system 500 based on a Linux operating system.
  • the character device driving system 500 includes a memory 510 and a processor 530 connected to the memory 510.
  • the memory 510 may be, for example, a non-volatile memory on which a computer program 511 is stored.
  • the processor 530 may include, for example, an embedded processor. When the processor 530 runs the computer program 511, the character device driving method based on the Linux operating system in the foregoing embodiment is executed.
  • the fifth embodiment of the present application provides a computer-readable medium 80.
  • the computer-readable medium 80 stores computer-executable instructions 81.
  • the computer-readable medium 80 may include, for example, magnetic media (such as hard disks, floppy disks, and magnetic tapes), optical media (such as CDROM disks, and DVDs), magneto-optical media (such as optical disks), and specially constructed to store and execute computer-executable instructions Hardware devices (such as read only memory (ROM), random access memory (RAM), flash memory, etc.).
  • magnetic media such as hard disks, floppy disks, and magnetic tapes
  • optical media such as CDROM disks, and DVDs
  • magneto-optical media such as optical disks
  • Hardware devices such as read only memory (ROM), random access memory (RAM), flash memory, etc.
  • the computer executable instructions 81 may be executed by one or more processors to drive character devices such as serial interface devices. Specifically, the computer executable instructions 81 are used to: provide an operation interface to the user layer through the Linux operating system kernel to receive and package user layer data to obtain a device data packet, and store the device data packet in a linked list; from the linked list Obtain the device data packet, and provide a registration interface with a callback function to pass in the device data packet through a data pointer; and parse the incoming device data packet to obtain business content, and according to the business content Control the character device through the bus interface.
  • the computer executable instructions 81 are used to: provide an operation interface to the user layer through the Linux operating system kernel to receive and package user layer data to obtain a device data packet, and store the device data packet in a linked list; from the linked list Obtain the device data packet, and provide a registration interface with a callback function to pass in the device data packet through a data pointer; and parse the incoming device data packet to obtain business content,
  • the parsing the incoming device data packet to obtain the business content specifically includes: extracting the general driving instruction corresponding to the character device in the device data packet; and extracting the Describe the personalized drive instruction corresponding to the character device.
  • the bus interface is selected from a serial interface or a parallel interface.
  • the serial interface includes an SPI bus interface connected to an SPI device or an I2C bus interface connected to an I2C device.
  • the computer executable instructions 81 are also used to obtain the device information of the character device and the data transmission mode and requirements, and provide them to the Linux operating system kernel.
  • the disclosed system, device, and/or method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit/module is only a division of logical functions.
  • there may be another division manner for example, a multi-channel unit or module may The combination can either be integrated into another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units/modules described as separate components may or may not be physically separated, and the components displayed as units/modules may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple channels On the network unit. Some or all of the units/modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit/module in each embodiment of the present application may be integrated into one processing unit/module, or each unit/module may exist alone physically, or two or more units/modules may be integrated into one Unit/module.
  • the above integrated units/modules can be implemented in the form of hardware, or in the form of hardware plus software functional units/modules.

Abstract

一种基于Linux操作系统的字符设备驱动方法及装置、一种计算机可读介质和一种嵌入式系统。所述字符设备驱动方法包括:通过Linux操作系统内核向用户层提供操作接口,以接收和打包用户层数据得到设备数据包,并将所述设备数据包存入链表(S11);从所述链表获取所述设备数据包,并提供带有回调函数的注册接口以通过数据指针传入所述设备数据包(S13);以及对传入的所述设备数据包进行解析得到业务内容,并根据所述业务内容通过总线接口控制字符设备(S15)。

Description

字符设备驱动方法、装置、系统和计算机可读介质 技术领域
本申请涉及嵌入式系统技术领域,尤其涉及一种基于Linux操作系统的字符设备驱动方法及装置、一种计算机可读介质以及一种基于Linux操作系统的嵌入式系统。
背景技术
Linux操作系统的驱动主要分为三种,即:字符设备驱动、网络设备驱动和块设备驱动。Linux操作系统中的每一个字符设备驱动对应一个设备。系统调用是操作系统内核和应用程序之间的接口,设备驱动是操作系统内核和机器硬件之间的接口,设备驱动为应用程序屏蔽了硬件的细节,这样在应用程序看来,硬件设备驱动只是一个设备文件,应用程序可以像操作普通文件一样对硬件设备进行操作,设备驱动是内核的一部分,它完成以下的功能:1、对设备进行初始化和释放;2、驱动设备与内核进行数据传输;3、为应用程序提供数据传输接口;4、监控设备的运行状态及对设备问题的处理。
较大型的嵌入式系统会用到很多外围设备,管理控制这些设备的示例方法是为每一个设备编写对应的设备驱动并为应用程序提供相应的接口,例如,嵌入式系统中的每一个I2C设备都需要单独编写一个I2C设备驱动,并且应用层也需要针对每一个(类)设备编写对应的应用程序,当一个嵌入式系统中具有很多个(类)设备时,要逐个编写相应的设备驱动,并且每一个设备驱动与上层应用程序(即用户层的应用程序)的接口也不统一,这就大大增加了管理和控制I2C设备的难度和复杂度。可见这样的方法会使得嵌入式系统随着各种各样的设备的增多而愈加复杂和臃肿,并且非常不利于设备的管理和控制。
总之,目前的嵌入式系统具有一下缺点:
1、每个(类)设备都要单独编写一个对应的设备驱动,从而增加了嵌入式系统的复杂性,复用性差,访问不方便;
2、与上层的接口不统一,不利用上层应用对设备进行访问和控制;
3、设备增删需要修改嵌入式系统的内核文件,并需要重新编译和烧写嵌入式系统的内核,从而不便于嵌入式系统的维护。
申请内容
本申请的实施例提供一种基于Linux操作系统的字符设备驱动方法、装置、系统以及计算机可读介质,其可达成设备驱动复用性强、用户层访问方便、维护难度低的技术效果。
一方面,本申请实施例提供的一种基于Linux操作系统的字符设备驱动方法,包括:通过Linux操作系统内核向用户层提供操作接口,以接收和打包用户层数据得到设备数据包,并将所述设备数据包存入链表;从所述链表获取所述设备数据包,并提供带有回调函数的注册接口以通过数据指针传入所述设备数据包;以及对传入的所述设备数据包进行解析得到业务内容,并根据所述业务内容通过总线接口控制字符设备。
在本申请的一个实施例中,所述字符设备驱动方法还包括:获取所述字符设备的设备信息以及数据传输的模式和需求、并提供给所述Linux操作系统内核。
在本申请的一个实施例中,所述对传入的所述设备数据包进行解析得到业务内容,具体包括:提取所述设备数据包中与所述字符设备对应的通用驱动指令;提取所述设备数据包中与所述字符设备对应的个性化驱动指令。
在本申请的一个实施例中,所述总线接口选自串行接口或并行接口。
在本申请的一个实施例中,所述串行接口包括连接SPI设备的SPI总线接口或连接I2C设备的I2C总线接口。
另一方面,本申请实施例还提供一种基于Linux操作系统的字符设备驱动装置,包括:接口函数驱动模块,用于通过Linux操作系统内核向用户层提供操作接口,以接收和打包用户层数据得到设备数据包,并将所述设备数据包存入链表;数据分发驱动模块,用于从所述链表获取所述设备数据包,并提供带有回调函数的注册接口以通过数据指针传入所述设备数据包;以及设备驱动模块,用于对传入的所述设备数据包进行解析得到业务内容,并根据所述业务内容通过总线接口控制字符设备。
在本申请的一个实施例中,所述字符设备驱动装置还包括:硬件设备初始化驱动模块,用于获取所述字符设备的设备信息以及数据传输的模式和需求、并提供给所述Linux操作系统内核。
在本申请的一个实施例中,所述设备驱动模块包括:第一提取单元,用于提取所述设备数据包中与所述字符设备对应的通用驱动指令;以及第二提取单元,用于提取所述设备数据包中与所述字符设备对应的个性化驱动指令。
在本申请的一个实施例中,所述设备驱动模块选自串行接口设备驱动模块或并行接口设备驱动模块。
在本申请的一个实施例中,所述串行接口设备驱动模块选自SPI设备驱动模块或I2C设备驱动模块,所述SPI设备驱动模块用于通过SPI总线接口连接SPI设备,所述I2C设备驱动模块用于通过I2C总线接口连接I2C设备。
再一方面,本申请实施例提供的一种基于Linux操作系统的字符设备驱动系统,包括存储器和处理器,所述存储器存储计算机程序,所述处理器运行所述计算机程序时执行前述的字符设备驱动方法。
又一方面,本申请实施例提供的一种计算机可读介质,存储有计算机可执行指令;其中,所述计算机可执行指令用于执行前述的字符设备驱动方法。
本申请实施例的字符设备驱动方法、装置、系统和计算机可读介质,可以驱动以总线方式连接的多个字符设备,并且每一类设备只需要一个驱动即可实现,设备驱动复用性强,避免了重复开发的工作,节省了大量的人力资源成本和开发成本;再者,多个设备向上只提供一个统一的接口,用户层即可针对不同设备进行访问;此外,负责用户层的软件开发人员完全不用了解驱动内部如何实现,降低了用户层软件工程师的开发和维护的难度,提高了工作效率。因此,本申请实施例可以达成设备驱动复用性强、用户层访问方便、开发和维护难度低的技术效果。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请第一实施例提供的串行接口设备驱动器的结构示意图。
图2为图1中的设备驱动模块的结构示意图。
图3为本申请第二实施例提供的一种基于Linux操作系统的字符设备驱动方法的流程示意图。
图4为本申请第二实施例提供的另一种基于Linux操作系统的字符设备驱动方法的流程示意图。
图5为本申请第三实施例提供的一种基于Linux操作系统的字符设备驱动装置的结构示意图。
图6为图5中的设备驱动模块的结构示意图。
图7为本申请第四实施例提供的一种基于Linux操作系统的字符设备驱动系统的结构示意图。
图8为本申请第五实施例提供的一种计算机可读介质的结构示意图。
【附图标记说明】
10-串行接口设备驱动器;11-接口函数驱动模块;13-数据分发驱动模块;15-设备驱动模块;151-通用驱动提取单元;153-个性化驱动提取单元;17-硬件设备初始化驱动模块;20-Linux操作系统内核;21-串行总线接口;30-串行接口设备;
300-字符设备驱动装置;310-接口函数驱动模块;330-数据分发驱动模块;350-设备驱动模块;351-第一提取单元;353-第二提取单元;37-硬件设备初始化驱动模块
500-字符设备驱动系统;510-存储器;530-处理器;
80-计算机可读介质;81-计算机可执行指令。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
第一实施例
如图1所示,本申请第一实施例提供的一种基于Linux操作系统的字符设备驱动器例如串行接口设备驱动器10,包括:接口函数驱动模块11、数据分发驱动模块13、多个设备驱动模块15和硬件设备初始化驱动模块17。串行接口设备驱动器10用于驱动多个串行接口设备30中的目标串行接口设备。
其中,接口函数驱动模块11用于通过Linux操作系统内核20向用户层提供操作接口,以接收和打包用户层数据得到设备数据包(即后述的comif_ioctl_burst_t结构体),并将所述设备数据包存入链表以供下层设备驱动模块15调用。所述设备数据包典型地为一结构体,其定义了多个数据变量来存储目标串行接口设备的数据,例如包括目标串行接口设备的地址、数据类型、读写长度等信息。链表为一种物理存储单元上非连续、非顺序的存储结构,其中的数据元素例如所述设备数据包的逻辑顺序是通过所述链表中的指针链接次序实现的。链表的这种结构可以充分利用计算机内存空间,实现灵活的内存动态管理。利用链表集中管理多个串行接口设备的数据。进一步地,接口函数驱动模块11为字符设备驱动模块。
数据分发驱动模块13连接接口函数驱动模块11和多个设备驱动模块15,用于从所述链表获取所述设备数据包,以及用于向多个设备驱动模块15提供带有回调函数的注册接口、以通过数据指针例如所述设备数据包中的目标串行接口设备地址和数据类型将所述设备数据包传入多个设备驱动模块15中的目标设备驱动模块。
多个设备驱动模块15用于例如通过串行总线接口21连接多个串行接口设备30,其中目标设备驱动模块用于根据所述设备数据包中的目标串行接口设备地址和数据类型对传入的所述设备数据包进行解析例如提取所述设备数据包中各种参数、指令等得到业务内容、并根据所述业务内容通过串行总线接口21驱动控制多个串行接口设备30中的目标串行接口设备。
硬件设备初始化驱动模块17用于分别连接Linux操作系统内核20和多个串行接口设备30(例如硬件设备初始化驱动模块17例如通过串行总线接口21连接多个串行接口设备30),以及用于获取多个串行接口设备30的设备信息以及数据传输的模式和需求、并提供给所述Linux操作系统内核20。
进一步地,如图2所示,所述设备驱动模块15包括通用驱动提取单元151以及个性化驱动提取单元153。典型地,以设备驱动模块15中的switch语句为界来划分通用驱动提取单元151和个性化驱动提取单元153,即设备驱动模块15中switch语句之前的部分为通用驱动提取单元151,switch语句之后的部分为个性化驱动提取单元153。通用驱动提取单元151用于提取与所述设备驱动模块15连接的所述串行接口设备30 对应的通用驱动指令。个性化驱动提取单元153用于提取与所述设备驱动模块15连接的所述串行接口设备30对应的个性化驱动指令。另外,个性化驱动提取单元153通过所述设备数据包中的数据类型参数来区分执行相应指令以驱动不同的串行接口设备。具体地,设备驱动模块15可例如选自串行接口设备驱动模块、并行接口设备驱动模块、或虚拟总线设备驱动模块例如platform总线设备驱动。所述通用驱动指令为串行接口设备驱动模块、并行接口设备驱动模块以及虚拟总线设备驱动模块共用的指令。更具体地,串行接口设备驱动模块选自于SPI设备驱动模块或I2C设备驱动模块。其中,所述SPI设备驱动模块用于例如通过串行总线接口21如SPI总线接口连接多个SPI设备,所述I2C设备驱动模块用于例如通过串行总线接口21如I2C总线接口连接多个I2C设备。举例来说,当多个设备驱动模块15为多个串行接口设备驱动模块时,多个设备驱动模块15包括一个SPI设备驱动模块且多个串行接口设备30包括多个连接到所述SPI设备驱动模块的多个SPI设备。多个SPI设备驱动模块中通用的部分位于通用驱动提取单元151内,各个SPI设备驱动模块中个性化部分位于个性化驱动提取单元153中。具体地,SPI设备的驱动模块中通用的部分在驱动的probe(驱动处理函数)中完成,各个SPI设备匹配到SPI设备的驱动模块后都会执行一遍;而个性化部分由在SPI设备驱动模块的probe函数中的attach函数中的switch语句根据目标串行接口设备序号来完成。
对于本实施例的串行接口设备驱动器10,其例如是由位于Linux操作系统的内核层上的设备驱动实现。具体地,接口函数驱动模块11(或称comifdev驱动)主要为用户层(或称应用层)提供一个统一的接口ioctl,从而用户可以通过该统一接口对挂接在同一总线上的多个串行接口设备30进行open、ioctl等操作。数据分发驱动模块13(或称comifstub驱动)获取comifdev驱动中从用户层发下来的数据、并提供注册接口给多个设备驱动模块15;而多个设备驱动模块15用于例如通过串行总线接口(例如SPI接口或者I2C接口)连接多个串行接口设备30以便驱动、控制连接多个串行接口设备30中的目标串行接口设备。硬件设备初始化驱动模块17(或称sysinit驱动)例如用于分别连接Linux操作系统内核和所述多个串行接口设备30,以及用于获取所述多个串行接口设备30的设备信息以及数据传输的模式和需求、并提供给Linux操作系统内核20。
更具体来说,以SPI接口设备为例,其设备驱动的软件实现包括数据的传输和设备的匹配两方面。
其中,【数据传输】:comifdev驱动与设备无关,其用于给用户层提供接口,用户层将数据发送到comifdev的ioctl函数,ioctl函数对用户层的数据进行打包后发送到comifstub驱动中,comifstub驱动给底层设备驱动例如spidev驱动提供了注册接口,在注册接口中带有回调函数,通过数据指针将数据传入spidev驱动,由spidev驱动对数据进行解析,并根据用户层下发的数据中的业务内容执行操作相关的串行接口设备。
【设备匹配】:由于不同的串行接口设备有不同的属性与需求,因此将设备与驱动进行了分离,但其并没有使用串行总线接口核例如spi core提供的注册函数例如match函数去进行设备匹配,而是例如直接使用bus_for_each_dev()函数将串行接口设备例如SPI接口设备的串行接口设备驱动模块注册到Linux操作系统内核20中的SPI虚拟总线驱动链表上,在硬件设备初始化驱动模块17中使用spi_register_board_info()函数将SPI接口设备的硬件信息注册到SPI虚拟总线的设备链表上,SPI虚拟总线会自动遍历其设备链表进行设备匹配。
本申请实施例的字符设备驱动方法、装置、系统和计算机可读介质,可以驱动控制以总线方式连接的多个字符设备,并且每一类设备只需要一个驱动即可实现,设备驱动复用性强,避免了重复开发的工作,节省了大量的人力资源成本和开发成本;再者,多个设备向上只提供一个统一的接口,用户层即可针对不同设备进行访问;此外,负责用户层的软件开发人员完全不用了解驱动内部如何实现,降低了用户层软件工程师的开发和维护的难度,提高了工作效率。因此,本申请实施例可以达成设备驱动复用性强、用户层访问方便、开发和维护难度低的技术效果。
为了更清楚地理解本申请实施例,特举多个串行接口设备中的一个I2C设备的具体实例进行说明如下:
(1)I2C设备的管理
由于I2C设备都是遵循I2C协议来进行通信的,串行接口设备驱动器10可只包括一个I2C设备驱动模块。多个I2C设备驱动模块的通用部分可以整合到I2C设备驱动模块的通用驱动提取单元,再根据每个I2C设备的个性化部分进行区分处理得到个性 化驱动提取单元,这样仅通过一个串行接口设备驱动器10便可驱动多个I2C设备。当系统需要添加I2C设备时,只需要在I2C设备驱动模块中增加要添加的设备的个性化驱动指令即可,从而大大增加了I2C设备驱动的开发效率。另外,各个I2C设备分别连接sysinit驱动,sysinit驱动的作用是对系统中每个设备进行管理和注册,所有的设备的资源信息均集成于这个驱动模块中,由其统一注册进系统中,当需要添加或卸载某个I2C设备时,只需要在I2C设备驱动模块的相应位置添加或删除I2C设备的信息即可。
(2)I2C设备的访问
上层应用程序(即用户层的应用程序)通过open,write,read,ioctl,close等函数访问到comif驱动,并把所要传递的设备参数信息和数据打包到comif_ioctl_burst_t结构体中,然后通过Linux操作系统内核提供的标准接口函数ioctl传给comif驱动,之后comif驱动调用自身的ioctl函数comifioctl把传来的结构体传递给comifstub驱动,comifstub驱动根据获得的设备参数信息和数据,将结构体通过comif_stub_call_ioctl传递给I2C设备驱动模块,在I2C设备驱动模块中的i2cdev_core_ioctl函数对结构体进行解析,提取出所要访问的I2C设备信息、指令和数据等,对目标串行接口设备进行驱动控制。其中,comif驱动主要的作用是为上层应用程序提供标准的ioctl等访问接口。comifstub驱动的作用是承上启下,向下向上提供操作接口,并且可扩展连接其他类型的总线驱动。
第二实施例
如图3所示,本申请第二实施例提供的基于Linux操作系统的字符设备驱动方法,包括步骤:
S11:通过Linux操作系统内核向用户层提供操作接口,以接收和打包用户层数据得到设备数据包,并将所述设备数据包存入链表;
S13:从所述链表获取所述设备数据包,并提供带有回调函数的注册接口以通过数据指针传入所述设备数据包;
S15:对传入的所述设备数据包进行解析得到业务内容,并根据所述业务内容通过总线接口控制字符设备。具体地,所述对传入的所述设备数据包进行解析得到业务内容 具体包括:提取所述设备数据包中与所述字符设备对应的通用驱动指令;以及提取所述设备数据包中与所述字符设备对应的个性化驱动指令。所述总线接口选自于串行接口或并行接口。串行接口包括连接SPI设备的SPI总线接口或连接I2C设备的I2C总线接口。
此外,如图4所示,本实施例提供的字符设备驱动方法还包括步骤:
S17:获取所述字符设备的设备信息以及数据传输的模式和需求、并提供给所述Linux操作系统内核。
本实施例中的字符设备驱动方法的具体工作过程参见前述实施例,此处不再赘述。
第三实施例
如图5所示,本申请第三实施例提供的基于Linux操作系统的字符设备驱动装置300。具体地,字符设备驱动装置300包括:接口函数驱动模块310,用于通过Linux操作系统内核向用户层提供操作接口,以接收和打包用户层数据得到设备数据包,并将所述设备数据包存入链表;数据分发驱动模块330,用于从所述链表获取所述设备数据包,并提供带有回调函数的注册接口以通过数据指针传入所述设备数据包;以及设备驱动模块350,用于对传入的所述设备数据包进行解析得到业务内容,并根据所述业务内容通过总线接口控制字符设备。
此外,本实施例提供的字符设备驱动装置300还包括:硬件设备初始化驱动模块370,用于获取所述字符设备的设备信息以及数据传输的模式和需求、并提供给所述Linux操作系统内核。
此外,如图6所示,设备驱动模块350例如包括:第一提取单元351,用于提取所述设备数据包中与所述字符设备对应的通用驱动指令;以及第二提取单元353,用于提取所述设备数据包中与所述字符设备对应的个性化驱动指令。
本实施例中的字符设备驱动装置300的具体工作过程参见前述实施例,此处不再赘述。
第四实施例
如图7所示,本申请第四施例提供一种基于Linux操作系统的字符设备驱动系统500。字符设备驱动系统500包括存储器510和与存储器510连接的处理器530。存储器510可例如为非易失性存储器,其上存储有计算机程序511。处理器530可例如包 括嵌入式处理器。处理器530运行计算机程序511时执行前述实施例中的基于Linux操作系统的字符设备驱动方法。
第五实施例
如图7所示,本申请第五实施例提供一种计算机可读介质80。计算机可读介质80存储有计算机可执行指令81。
计算机可读介质80可例如包括:磁介质(如硬盘、软盘和磁带),光介质(如CDROM盘和DVD),磁光介质(如光盘)以及专门构造为用于存储和执行计算机可执行指令的硬件装置(如只读存储器(ROM)、随机存取存储器(RAM)、闪存等)。
计算机可执行指令81可由一个或多个处理器执行以驱动字符设备例如串行接口设备。具体地,计算机可执行指令81用于:通过Linux操作系统内核向用户层提供操作接口,以接收和打包用户层数据得到设备数据包,并将所述设备数据包存入链表;从所述链表获取所述设备数据包,并提供带有回调函数的注册接口以通过数据指针传入所述设备数据包;以及对传入的所述设备数据包进行解析得到业务内容,并根据所述业务内容通过总线接口控制字符设备。具体地,所述对传入的所述设备数据包进行解析得到业务内容具体包括:提取所述设备数据包中与所述字符设备对应的通用驱动指令;以及提取所述设备数据包中与所述字符设备对应的个性化驱动指令。所述总线接口选自于串行接口或并行接口。串行接口包括连接SPI设备的SPI总线接口或连接I2C设备的I2C总线接口。
另外,计算机可执行指令81还用于获取所述字符设备的设备信息以及数据传输的模式和需求、并提供给所述Linux操作系统内核。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和/或方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元/模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多路单元或模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元/模块可以是或者也可以不是物理上分开的,作为单元/模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多路网络单元上。可以根据实际的需要选择其中的部分或者全部单元/模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元/模块可以集成在一个处理单元/模块中,也可以是各个单元/模块单独物理存在,也可以两个或两个以上单元/模块集成在一个单元/模块中。上述集成的单元/模块既可以采用硬件的形式实现,也可以采用硬件加软件功能单元/模块的形式实现。
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (12)

  1. 一种基于Linux操作系统的字符设备驱动方法,包括:
    通过Linux操作系统内核向用户层提供操作接口,以接收和打包用户层数据得到设备数据包,并将所述设备数据包存入链表;
    从所述链表获取所述设备数据包,并提供带有回调函数的注册接口以通过数据指针传入所述设备数据包;以及
    对传入的所述设备数据包进行解析得到业务内容,并根据所述业务内容通过总线接口控制字符设备。
  2. 如权利要求1所述的字符设备驱动方法,还包括:
    获取所述字符设备的设备信息以及数据传输的模式和需求、并提供给所述Linux操作系统内核。
  3. 如权利要求1所述的字符设备驱动方法,所述对传入的所述设备数据包进行解析得到业务内容,具体包括:
    提取所述设备数据包中与所述字符设备对应的通用驱动指令;以及
    提取所述设备数据包中与所述字符设备对应的个性化驱动指令。
  4. 如权利要求1所述的字符设备驱动方法,其中,所述总线接口选自串行接口或并行接口。
  5. 如权利要求4所述的字符设备驱动方法,其中,所述串行接口包括连接SPI设备的SPI总线接口或连接I2C设备的I2C总线接口。
  6. 一种基于Linux操作系统的字符设备驱动装置,包括:
    接口函数驱动模块,用于通过Linux操作系统内核向用户层提供操作接口,以接收和打包用户层数据得到设备数据包,并将所述设备数据包存入链表;
    数据分发驱动模块,用于从所述链表获取所述设备数据包,并提供带有回调函数的注册接口以通过数据指针传入所述设备数据包;以及
    设备驱动模块,用于对传入的所述设备数据包进行解析得到业务内容,并根据所述业务内容通过总线接口控制字符设备。
  7. 如权利要求6所述的字符设备驱动装置,还包括:
    硬件设备初始化驱动模块,用于获取所述字符设备的设备信息以及数据传输的模式和需求、并提供给所述Linux操作系统内核。
  8. 如权利要求6所述的字符设备驱动装置,其中,所述设备驱动模块包括:
    第一提取单元,用于提取所述设备数据包中与所述字符设备对应的通用驱动指令;以及
    第二提取单元,用于提取所述设备数据包中与所述字符设备对应的个性化驱动指令。
  9. 如权利要求6所述的字符设备驱动装置,其中,所述设备驱动模块选自串行接口设备驱动模块或并行接口设备驱动模块。
  10. 如权利要求9所述的字符设备驱动装置,其中,所述串行接口设备驱动模块选自SPI设备驱动模块或I2C设备驱动模块,所述SPI设备驱动模块用于通过SPI总线接口连接SPI设备,所述I2C设备驱动模块用于通过I2C总线接口连接I2C设备。
  11. 一种基于Linux操作系统的字符设备驱动系统,包括存储器和处理器,所述存储器存储计算机程序,所述处理器运行所述计算机程序时执行如权利要求1至5任意一项所述的字符设备驱动方法。
  12. 一种计算机可读介质,存储有计算机可执行指令;其中,所述计算机可执行指令用于执行如权利要求1至5任意一项所述的字符设备驱动方法。
PCT/CN2018/120661 2018-12-12 2018-12-12 字符设备驱动方法、装置、系统和计算机可读介质 WO2020118567A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/120661 WO2020118567A1 (zh) 2018-12-12 2018-12-12 字符设备驱动方法、装置、系统和计算机可读介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/120661 WO2020118567A1 (zh) 2018-12-12 2018-12-12 字符设备驱动方法、装置、系统和计算机可读介质

Publications (1)

Publication Number Publication Date
WO2020118567A1 true WO2020118567A1 (zh) 2020-06-18

Family

ID=71076179

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/120661 WO2020118567A1 (zh) 2018-12-12 2018-12-12 字符设备驱动方法、装置、系统和计算机可读介质

Country Status (1)

Country Link
WO (1) WO2020118567A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030101290A1 (en) * 2001-11-29 2003-05-29 Chieng-Hwa Lin System and method for dynamic device driver support in an open source operating system
CN101630305A (zh) * 2008-07-16 2010-01-20 中国人民解放军信息工程大学 高效能计算机中可重构部件的柔性管理方法
CN102866966A (zh) * 2012-08-28 2013-01-09 大唐移动通信设备有限公司 一种Linux操作系统的设备驱动控制方法和装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030101290A1 (en) * 2001-11-29 2003-05-29 Chieng-Hwa Lin System and method for dynamic device driver support in an open source operating system
CN101630305A (zh) * 2008-07-16 2010-01-20 中国人民解放军信息工程大学 高效能计算机中可重构部件的柔性管理方法
CN102866966A (zh) * 2012-08-28 2013-01-09 大唐移动通信设备有限公司 一种Linux操作系统的设备驱动控制方法和装置

Similar Documents

Publication Publication Date Title
US20200278880A1 (en) Method, apparatus, and system for accessing storage device
US10579305B2 (en) Method and apparatus for processing read/write request in physical machine
JP5363017B2 (ja) ゲスト処理システムの入出力処理を促進するための方法およびシステム
WO2018120986A1 (zh) 转发报文的方法和物理主机
WO2021000717A1 (zh) 一种io处理的方法和装置
JP6004608B2 (ja) ホストusbアダプタを仮想化するための方法、装置、およびコンピュータ・プログラム(ホストusbアダプタの仮想化)
US10515043B2 (en) Smart interface card control method and apparatus through a virtualized management interface
US8719843B2 (en) Virtualizable and forward-compatible hardware-software interface
US9747240B2 (en) Dynamic connection of PCIe devices and functions to an array of hosts
WO2022143714A1 (zh) 服务器系统、虚拟机创建方法及装置
WO2022001808A1 (zh) 一种系统以及中断处理方法
CN113312143A (zh) 云计算系统、命令处理方法及虚拟化仿真装置
CN107278294A (zh) 输入设备实现方法及其实现装置
WO2024007510A1 (zh) 服务器管理方法、装置、系统、电子设备及可读存储介质
CN113419845A (zh) 计算加速方法和装置、计算系统、电子设备及计算机可读存储介质
US10922110B2 (en) Method for storing data in a virtualized storage system
WO2020118567A1 (zh) 字符设备驱动方法、装置、系统和计算机可读介质
US9354911B2 (en) Method and system for logging into a virtual environment executing on a host
US20220050795A1 (en) Data processing method, apparatus, and device
CN111274184B (zh) 串行接口设备驱动器、嵌入式处理器和视频控制器
CN111090427A (zh) 一种嵌入式系统中运行时构建usb复合设备的方法
US8095715B1 (en) SCSI HBA management using logical units
US20230214337A1 (en) Methods and systems for extablishing direct communications between a server computer and a smart network interface controller
CN112306912B (zh) 串行接口设备驱动装置、嵌入式处理器和视频控制器
CN111857943B (zh) 数据处理的方法、装置与设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18942869

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18942869

Country of ref document: EP

Kind code of ref document: A1