WO2016150098A1 - PCIe设备和PCIe总线的管理方法及装置 - Google Patents

PCIe设备和PCIe总线的管理方法及装置 Download PDF

Info

Publication number
WO2016150098A1
WO2016150098A1 PCT/CN2015/088177 CN2015088177W WO2016150098A1 WO 2016150098 A1 WO2016150098 A1 WO 2016150098A1 CN 2015088177 W CN2015088177 W CN 2015088177W WO 2016150098 A1 WO2016150098 A1 WO 2016150098A1
Authority
WO
WIPO (PCT)
Prior art keywords
pcie
pcie device
enumeration
scan
function
Prior art date
Application number
PCT/CN2015/088177
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 中兴通讯股份有限公司
Publication of WO2016150098A1 publication Critical patent/WO2016150098A1/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 invention relates to the field of communications, and in particular to a method and apparatus for managing a PCIe device and a PCIe bus of the latest peripheral component expansion interface.
  • PCIe Peripheral Component Interconnect Express
  • PCIe Peripheral Component Interconnect Express
  • PCIe bus Interconnection between multiple processors or interconnection between a processor and a device controller can be implemented.
  • the implementation of the PCIe architecture is slightly different in different processor architectures. However, in most processor systems, the basic modules of RC, Switch, and PCIe-to-PCI bridges are used to connect PCIe and PCI devices.
  • PCIe initialization is usually in the firmware Fireware phase or the Linux system initialization phase. Its main job is to traverse all PCIe devices in the current processor system and initialize them. In the traversal process, the Depth First Search (DFS) algorithm is usually used to perform traversal search on the PCIe bus tree, and allocate the relevant bus number and address resource of the bus.
  • DFS Depth First Search
  • the PCIe initialization mechanism in the Linux kernel is not perfect. It contains a lot of redundant code and extra steps. This affects the efficiency of Linux PCIe initialization.
  • the PCIe initialization scan is static. After the system is powered on, only the PCIe bus tree is initialized and scanned. If you need to scan again, you must reload the Linux system. Of course, this approach is understandable, especially when the Linux operating system is in a stable application phase.
  • the main purpose of the embodiments of the present invention is to provide a PCIe device and a PCIe bus management method and apparatus, so as to at least solve the problem that the initialization scan of PCIe in the related art is static.
  • a method for managing a peripheral component expansion interface PCIe device and a PCIe bus including: performing an enumeration scan operation on a PCIe device tree of a latest peripheral component extension interface, and according to the PCIe The location of the device in the PCIe bus generates a structure corresponding to the scanned PCEe device; adding the structure to the linked list of the PCIe device; and exporting the PCIe device control file according to the linked list and the specified file system And managing the dynamic enumeration scan of the PCIe device and the PCIe bus, wherein the control file is used to indicate the PCIe device resource information.
  • the managing the dynamic scanning of the PCIe device and the PCIe bus according to the linked list and the PCIe device control file exported by the specified file system comprises: the PCIe device file exported according to the linked list and the specified file system to the PCIe Performing a write operation on the bus for performing a dynamic enumeration scan on the PCIe bus; performing a read operation on the PCIe device according to the linked list and a PCIe device control file exported by the specified file system, for acquiring the PCIe device Resource information.
  • the method includes: when the specified file system is initialized, and Establishing a control file under the specified file system, wherein the control file is provided with a first function and a second function, where the first function is used to indicate how to operate the control file to complete dynamics on the PCIe bus Enumeration scan, the second function is for indicating a start position of performing an enumeration scan; performing a dynamic enumeration scan on the PCIe device bus according to the first function and the second function.
  • performing an enumeration scan operation on the PCIe device tree includes performing an enumeration scan on the entire PCIe device tree from the PCIe controller according to a depth-first algorithm.
  • the method before performing the enumeration scan operation on the PCIe device tree, includes: turning off an enumeration scan operation function carried by the self, and triggering an operation of performing an enumeration scan on the PCIe device tree according to the depth priority algorithm.
  • a management device for a recent peripheral component expansion interface PCIe device and a PCIe bus comprising: an execution module configured to perform an enumeration scan operation on a PCIe device tree of a latest peripheral component extension interface And generating, according to the location of the PCIe device in the PCIe bus, a structure corresponding to the scanned PCEe device; adding a module, being configured to add the structure to a linked list of the PCIe device; and managing a module, And managing the dynamic enumeration scan of the PCIe device and the PCIe bus according to the linked list and the PCIe device control file exported by the specified file system, wherein the control file is used to indicate the PCIe device resource information.
  • the management module includes: a scanning unit configured to perform a write operation on the PCIe bus according to the linked list and a PCIe device file exported by the specified file system, to perform dynamic enumeration scanning on the PCIe bus
  • the obtaining unit is configured to perform a read operation on the PCIe according to the PCIe device control file that is exported according to the linked list and the specified file system, and is used to acquire resource information of the PCIe device.
  • the device before the managing the dynamic scanning of the PCIe device and the PCIe bus according to the linked list and the PCIe device file exported by the specified file system, the device further includes: an establishing module, configured to be in the specified file system And performing a initialization, and establishing a control file under the specified file system, wherein the control file is provided with a first function and a second function, where the first function is used to indicate how to operate the control file to complete the a dynamic enumeration scan of the PCIe bus, the second function is for indicating a start position of performing an enumeration scan; and the scan module is configured to perform dynamic on the PCIe device bus according to the first function and the second function Enumeration scan.
  • an establishing module configured to be in the specified file system And performing a initialization, and establishing a control file under the specified file system, wherein the control file is provided with a first function and a second function, where the first function is used to indicate how to operate the control file to complete the a dynamic en
  • the execution module is further configured to perform an enumeration scan on the entire PCIe device tree from the PCIe controller according to a depth-first algorithm.
  • the device before performing the enumeration scan operation on the PCIe device tree, the device further includes: a shutdown module, configured to disable the enumeration scan operation function carried by itself, triggering the PCIe device according to the depth priority algorithm The tree performs an enumeration scan operation.
  • a shutdown module configured to disable the enumeration scan operation function carried by itself, triggering the PCIe device according to the depth priority algorithm The tree performs an enumeration scan operation.
  • the scanned PCEe device when the PCIe device tree is subjected to the enumeration scan, the scanned PCEe device generates a corresponding structure according to the location of the PCEe device in the PCIe bus, and adds the structure to the linked list.
  • the dynamic enumeration scan management of the PCIe device and the PCIe bus is further performed according to the linked list and the PCIe device file exported by the specified file system.
  • the invention realizes the dynamic scanning of PCIe, and solves the problem that the initial scanning of PCIe in the related art is static, and achieves the effect of improving the debugging efficiency of the system.
  • FIG. 1 is a flowchart of a method for managing a PCIe device and a PCIe bus according to an embodiment of the present invention
  • FIG. 2 is a structural block diagram of a management apparatus of a PCIe device and a PCIe bus according to an embodiment of the present invention
  • FIG. 3 is a block diagram 1 of an optional structure of a management device for a PCIe device and a PCIe bus according to an embodiment of the present invention
  • FIG. 4 is a block diagram 2 of an optional structure of a management device for a PCIe device and a PCIe bus according to an embodiment of the present invention
  • FIG. 5 is a block diagram 3 of an optional structure of a management device for a PCIe device and a PCIe bus according to an embodiment of the present invention
  • FIG. 6 is a flow chart of a dynamic enumeration scan PCIe device and management method in accordance with an alternative embodiment of the present invention.
  • FIG. 1 is a flowchart of a PCIe device and a PCIe bus management method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step S102 Perform an enumeration scan operation on the PCIe device tree, and generate a structure corresponding to the scanned PCEe device according to the location of the PCIe device in the PCIe bus;
  • Step S104 adding the structure to the linked list of the PCIe device
  • Step S106 Perform dynamic enumeration scan management on the PCIe device and the PCIe bus according to the linked list and the PCIe device file exported by the specified file system;
  • the file is used to indicate PCIe device resource information.
  • the scanned PCEe device when performing an enumeration scan on the PCIe device tree, the scanned PCEe device generates a corresponding structure according to the location of the PCEe device in the PCIe bus, and adds the structure to the linked list; Management of dynamic enumeration scans of PCIe devices and PCIe buses based on the linked list and PCIe device files exported by the specified file system.
  • the dynamic scanning of the PCIe is implemented by the embodiment, and the initialization scan of the PCIe in the related art is solved statically, and the effect of improving the debugging efficiency of the system is achieved.
  • the sys file system may be used, and the embodiment will be correspondingly described below through the sys file system;
  • the manner of managing the dynamic scanning of the PCIe device and the PCIe bus according to the PCIe device control file exported by the linked list and the specified file system in the foregoing step S106 may be as follows: Way to achieve:
  • Manner 1 Perform a write operation on the PCIe bus according to the linked list and the PCIe device control file exported by the specified file system, for performing dynamic enumeration scan on the PCIe bus;
  • Method 2 Perform a read operation on the PCIe device according to the linked list and the PCIe device control file exported by the specified file system, and obtain the resource information of the PCIe device.
  • control file write operation under the sys file system can complete the dynamic enumeration scan of the PCIe bus, and the PCIe device file can be obtained when the PCIe device file under the sys file system is read. Resource information.
  • the method in this embodiment may further include:
  • Step S11 When the specified file system is initialized, and the control file is established under the specified file system, wherein the control file is provided with a first function and a second function, and the first function is used to indicate how to operate the control file to complete the PCIe bus. Dynamic enumeration scan, the second function is used to indicate the start position of the execution of the enumeration scan;
  • Step S12 Perform a dynamic enumeration scan on the PCIe device bus according to the first function and the second function.
  • the PCIe device bus is configured to perform dynamic enumeration scanning by setting the first function and the second function in the control file.
  • the first function may be a show.
  • the second function can be a store function, that is, when reading the control file, the system will call the show function to display some strings, which are used to explain how to operate the control file to complete the dynamic enumeration scan of the PCIe device tree;
  • the implementation of the show function is a kind of illustrative use, can not afford the function; when writing the control file, the system will call the store function.
  • the entire PCIe device tree is enumerated and scanned from the PCIe controller according to the depth-first algorithm.
  • the enumeration scan operation function carried by the self needs to be turned off, and the operation of enumerating the PCIe device tree according to the depth-first algorithm is triggered. In other words, the initialization of the PCIe device is not required by the built-in enumeration scanning process.
  • a management device for the PCIe device and the PCIe bus is provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein.
  • the term “module” "unit” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • the apparatus includes an execution module 22 configured to perform an enumerated scan operation on the latest peripheral component expansion interface PCIe device tree, and generate a structure corresponding to the scanned PCEe device according to the location of the PCIe device in the PCIe bus.
  • the adding module 24 is coupled to the execution module 22 and configured to add the structure to the linked list of the PCIe device.
  • the management module 26 is coupled to the adding module 24 and configured to be a PCIe device file pair exported according to the linked list and the specified file system.
  • the PCIe device and the PCIe bus perform dynamic enumeration scan management, wherein files are used to indicate PCIe device resource information.
  • the execution module is further configured to perform an enumeration scan of the entire PCIe device tree from the PCIe controller according to the depth first algorithm.
  • FIG. 3 is a block diagram of an optional structure of a PCIe device and a PCIe bus management device according to an embodiment of the present invention.
  • the management module 26 includes: a scanning unit 32 configured to export PCIe according to a linked list and a specified file system.
  • the device file performs a write operation on the PCIe device file, and is used to perform a dynamic enumeration scan on the PCIe bus;
  • the obtaining unit 34 is configured to perform a read operation on the PCIe device file according to the linked list and the PCIe device file information exported by the specified file system, Obtain the resource information of the PCIe device.
  • FIG. 4 is a block diagram 2 of an optional structure of a PCIe device and a PCIe bus management device according to an embodiment of the present invention. As shown in FIG. 4, a PCIe device and a PCIe bus are dynamically scanned according to a PCIe device file exported according to a linked list and a specified file system.
  • the device further includes: an establishing module 42 coupled to the adding module 24, configured to establish a control file under the specified file system when the specified file system is initialized, wherein the control file is provided with the first function and a second function, the first function is used to indicate how to operate the control file to complete the dynamic enumeration scan of the PCIe bus, the second function is used to indicate the start position of the enumeration scan, and the scan module 44 is coupled to the setup module 42 to set A dynamic enumeration scan is performed on the PCIe device bus in accordance with the first function and the second function.
  • an establishing module 42 coupled to the adding module 24, configured to establish a control file under the specified file system when the specified file system is initialized, wherein the control file is provided with the first function and a second function, the first function is used to indicate how to operate the control file to complete the dynamic enumeration scan of the PCIe bus, the second function is used to indicate the start position of the enumeration scan, and the scan module 44 is coupled to
  • the device before performing an enumeration scan operation on a PCIe device tree, the device further includes: a shutdown module 52, The method is coupled to the execution module 22, and is configured to disable the enumeration scan operation function carried by the self-execution module, and trigger an operation of enumerating and scanning the PCIe device tree according to the depth-first algorithm.
  • This alternative embodiment provides a method for dynamically enumerating scans and managing PCIe devices.
  • the Linux operating system is taken as an example. After the Linux operating system is started, the user can rescan the entire PCIe as needed.
  • the device tree allocates resources such as bus number and storage space for devices on each PCIe bus tree.
  • the optional embodiment can also perform recursive scanning from a certain PCIe port and allocate resources for devices under the port.
  • the so-called enumeration scan PCIe device tree refers to enumerating the entire PCIe device tree from the PCIe controller; when a device is found, it generates a device structure for it, and according to the location of the PCIe bus where the device is located, the device structure The body is added to the PCIe device list.
  • the tree structure traversal algorithm is roughly divided into Breadth-First-Search (abbreviated as BFS) and Depth First Search (DFS).
  • BFS Breadth-First-Search
  • DFS Depth First Search
  • a depth-first algorithm is used for the enumeration scan of the PCIe device tree.
  • the algorithm is based on two aspects. First, the DFS algorithm is used to complete the enumeration scan of the PCIe device tree to help understand the topology of the PCIe. Second, the enumeration scan implementation that comes with Linux can be used as a reference for this alternative embodiment. And draw on.
  • the optional embodiment manages the PCIe bus and devices through files exported under the sys file system; and writes control files to the sys file system.
  • the dynamic enumeration scan of the PCIe bus can be completed; and the information of the PCIe device can be obtained when the PCIe device file under the sys file system is read.
  • FIG. 6 is a flowchart of a dynamic enumeration scanning PCIe device and a management method according to an alternative embodiment of the present invention. As shown in FIG. 6, the steps of the method include:
  • Step S602 Start executing the Linux kernel
  • Step S604 Initializing the Linux kernel
  • Step S606 dynamic enumeration scan initialization
  • Step S608 Perform a dynamic enumeration scan by using a sys file interface operation
  • Step S610 Start a dynamic enumeration scan
  • Step S612 The dynamic enumeration scan ends.
  • the structure In addition to the basic information of the device, such as busID, devID, vendorID, functionID, and the base address of various storage resources, the structure also includes the pointers needed to maintain the PCIe device tree list, and manages the sys file data structure.
  • a processor system begins with firmware and starts booting the Linux kernel with Firmware. After the boot process, the system will jump to the first head.s file in Linux, and then jump to the start_kernel function of the ./init/main.c file from the head.s file. Start the PCIe initialization journey from here.
  • the firmware used by different systems is also different.
  • the x86 system uses the BIOS, while the Powerpc system uses U-Boot.
  • Enumeration initialization of PCIe devices is usually done in the Firmware phase, where each device in the PCIe device tree is assigned resources such as busID, devID, functionID, and so on.
  • the initialization process of the PCIe device is not required in the Linux kernel, so the CONFIG_PCI_DIRECT option should be closed when compiling the kernel. It also ensures that the dynamic management enumeration process implemented by this alternative embodiment is completed before the Linux kernel initializes the PCIe device tree. Therefore, the implementation in this alternative embodiment is performed by placing the initialization interface function start_pcie of the dynamic enumeration scan at the beginning of the do_basic_setup function.
  • the dynamic enumeration scan is implemented by the function pci_scan_device(struct bsp_pci_device*parent, int domain, int bus, int device, int func).
  • This function uses the DFB algorithm to recursively scan and allocate resources to the PCIe device tree under the parent node parent. After discovering a new PCIe device, the device is first allocated corresponding resources, and then a struct bsp_pci_device structure is generated to save the device information, and the structure is added to the linked list of the PCIe device; when the function is executed, All PCIe devices under parent will be initialized, and the generated device structure will be added to the PCIe device list. This will be convenient. Management of PCIe devices.
  • A Define the files of the dynamic enumeration scan interface and the corresponding operations
  • the system In order to complete the dynamic enumeration scan by operating the files under the sys file system, the system needs to establish the corresponding directory and control file under /sys, and define the show and store operations for the control file.
  • the initialization interface function start_pcie of the dynamic enumeration scan is the most suitable place to implement PCIe sys file initialization.
  • the sysfs_create_file function provided by the Linux kernel is called in start_pcie to establish the PCIe dynamic enumeration scan control file pci_control.
  • the show and store functions of this file need to be implemented.
  • the system will call the show function to display some strings. These strings are used to illustrate how to manipulate the pci_control file to perform a dynamic enumeration scan of the PCIe device tree.
  • the implementation of the show function is essentially a declarative use and does not function.
  • the store function is called. In this function, the written string needs to be parsed, and based on the parsed content, it is determined at which position in the PCIe device tree the enumeration scan needs to be started.
  • the store function After parsing this information, the store function will call the above mentioned pci_scan_device function to perform an enumeration scan on the specified port of the device tree. If the entire PCIe device tree needs to be scanned, the location information of the PCIe controller is written into the pci_control file.
  • the system assigns a device structure struct bsp_pci_device to it, and uses this structure to record and represent a PCIe device.
  • the scanned device needs to be exported to the /sys file system during scanning, and a device file ww:xx.yy.zz is generated under the file system. (Wh, ww indicates the domain where the device is located, xx is the bus number of the device, yy is the device number, and zz is the function number).
  • the Linux kernel will apply the appropriate action to the PCIe device.
  • the system calls the show function of the device file. This function is implemented in this alternative embodiment as the operation of printing the corresponding PCIe device configuration space.
  • Linux will call the store function implemented in the patent to complete the write operation of the PCIe device's configuration space.
  • the PCIe dynamic enumeration scan management function is directly compiled into the kernel. Therefore, after the Linux system is powered on, the function is completely initialized.
  • the initialization mainly includes two aspects: one is to enumerate and scan the PCIe device tree. And establishing a corresponding data structure for the enumerated PCIe device to form a linked list of device trees; second, establishing a display and management interface of the PCIe device in the sys file system according to the enumerated scan result.
  • the method of the alternative embodiment can improve the efficiency of PCIe debugging and reduce the complexity of PCIe debugging.
  • the scanned PCEe device when performing an enumeration scan on the PCIe device tree, the scanned PCEe device generates a corresponding structure according to the location of the PCEe device in the PCIe bus, and adds the structure to the linked list; Management of dynamic enumeration scans of PCIe devices and PCIe buses based on the linked list and PCIe device files exported by the specified file system.
  • the invention realizes the dynamic scanning of PCIe, and solves the problem that the initial scanning of PCIe in the related art is static, and achieves the effect of improving the debugging efficiency of the system.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Stored Programmes (AREA)

Abstract

一种最新周边元件扩展接口PCIe设备和PCIe总线的管理方法及装置,其中该方法包括:执行对最新周边元件扩展接口PCIe设备树的枚举扫描操作,并依据PCIe设备在PCIe总线中的位置生成与扫描到的PCIe设备对应的结构体(S102);将结构体添加到PCIe设备的链表中(S104);依据链表与指定文件系统导出的PCIe设备控制文件对PCIe设备和PCIe总线进行动态枚举扫描的管理(S106),其中,控制文件用于指示PCIe设备资源信息。其解决了相关技术中PCIe的初始化扫描都是静态的问题,达到了提高系统调试效率的效果。

Description

PCIe设备和PCIe总线的管理方法及装置 技术领域
本发明涉及通信领域,具体而言,涉及一种最新周边元件扩展接口PCIe设备和PCIe总线的管理方法及装置。
背景技术
最新周边元件扩展接口(Peripheral Component Interconnect Express,简称为PCIe)总线作为计算机系统中的一种局部总线,它和PCI总线作用是相似,其主要目的是为了连接处理器和外部设备,当然PCIe总线也可以实现多个处理器之间的互联或是处理器和设备控制器之间的互联。在不同的处理器架构中,PCIe体系结构的实现方法略有不同。但是在大多数处理器系统中,都使用了RC、Switch和PCIe-to-PCI桥这些基本模块连接PCIe和PCI设备。
PCIe的初始化通常是放到固件Fireware阶段或是Linux系统初始化阶段,它主要工作是遍历当前处理器系统中的所有PCIe设备,并对这些设备进行初始化配置。在遍历过程中,通常使用了深度优先(Depth First Search,简称为DFS)算法对PCIe总线树进行遍历查找,并分配相关的总线号和总线的地址资源。
从处理器系统的角度来讲,Linux内核中的PCIe初始化机制并不是非常完美。其中包含了很多冗余代码和多余的步骤。从而影响了Linux PCIe的初始化的效率。另外,无论是在Fireware阶段还是在Linux启动阶段,PCIe的初始化扫描都是静态的,既系统上电后只对PCIe总线树进行一次初始化扫描,如需再次扫描,就要重新加载Linux系统。当然,这种做法是无可厚非的,尤其是当Linux操作系统处于稳定的应用阶段。
但当整个软/硬件系统处于开发、验证阶段,就很有可能会涉及到一些PCIe设备的功能、性能的调试。在对PCIe设备调整后,如果需要重新扫描PCIe设备树,必须复位整个系统,重新加载Linux。这种方式虽然在实施层面上来讲是可行的,但就操作层面上来看却显得十分繁琐。例如,调试挂在PCIe Switch下的EP设备的信号质量,就需要通过其他总线(如I2c)不断的修改EP设备的预加重和负载均衡。每次调整新参数后都需重新上电、重新加载Linux系统。这样做,无疑会降低调试的效率并增加调试的复杂程度。
针对相关技术中PCIe的初始化扫描都是静态的问题,目前尚未提出有效的解决方案。
发明内容
本发明实施例的主要目的在于提供一种PCIe设备和PCIe总线的管理方法及装置,以至少解决相关技术中PCIe的初始化扫描都是静态的问题。
根据本发明实施例的一个方面,提供了一种最新周边元件扩展接口PCIe设备和PCIe总线的管理方法,包括:执行对最新周边元件扩展接口PCIe设备树的枚举扫描操作,并依据所述PCIe设备在PCIe总线中的位置生成与扫描到的所述PCEe设备对应的结构体;将所述结构体添加到所述PCIe设备的链表中;依据所述链表与指定文件系统导出的PCIe设备控制文件对所述PCIe设备和PCIe总线进行动态枚举扫描的管理,其中,所述控制文件用于指示所述PCIe设备资源信息。
可选地,依据所述链表与指定文件系统导出的PCIe设备控制文件对所述PCIe设备和PCIe总线进行动态扫描的管理包括:依据所述链表与指定文件系统导出的PCIe设备文件对所述PCIe总线执行写操作,用于执行对所述PCIe总线的动态枚举扫描;依据所述链表与指定文件系统导出的PCIe设备控制文件对所述PCIe设备执行读操作,用于获取所述PCIe设备的资源信息。
可选地,在依据所述链表与指定文件系统导出的PCIe设备控制文件对所述PCIe设备和PCIe总线进行动态扫描的管理之前,所述方法包括:在所述指定文件系统进行初始化时,并在所述指定文件系统下建立控制文件,其中,所述控制文件中设置有第一函数和第二函数,所述第一函数用于指示如何操作所述控制文件完成对所述PCIe总线的动态枚举扫描,所述第二函数用于指示执行枚举扫描的开始位置;依据所述第一函数和所述第二函数对所述PCIe设备总线执行动态枚举扫描。
可选地,执行对PCIe设备树的枚举扫描操作包括:根据深度优先算法从PCIe控制器开始对整个所述PCIe设备树进行枚举扫描。
可选地,在执行对PCIe设备树的枚举扫描操作之前包括:关闭自身携带的枚举扫描操作功能,触发依据所述深度优先算法对所述PCIe设备树进行枚举扫描的操作。
根据本发明实施例的另一个方面,提供了一种最新周边元件扩展接口PCIe设备和PCIe总线的管理装置,包括:执行模块,设置为执行对最新周边元件扩展接口PCIe设备树的枚举扫描操作,并依据所述PCIe设备在PCIe总线中的位置生成与扫描到的所述PCEe设备对应的结构体;添加模块,设置为将所述结构体添加到所述PCIe设备的链表中;管理模块,设置为依据所述链表与指定文件系统导出的PCIe设备控制文件对所述PCIe设备和PCIe总线进行动态枚举扫描的管理,其中,所述控制文件用于指示所述PCIe设备资源信息。
可选地,所述管理模块包括:扫描单元,设置为依据所述链表与指定文件系统导出的PCIe设备文件对所述PCIe总线执行写操作,用于执行对所述PCIe总线的动态枚举扫描;获取单元,设置为依据所述链表与指定文件系统导出的PCIe设备控制文件对所述PCIe执行读操作,用于获取所述PCIe设备的资源信息。
可选地,在依据所述链表与指定文件系统导出的PCIe设备文件对所述PCIe设备和PCIe总线进行动态扫描的管理之前,所述装置还包括:建立模块,设置为在所述指定文件系统进行初始化时,并在所述指定文件系统下建立控制文件,其中,所述控制文件中设置有第一函数和第二函数,所述第一函数用于指示如何操作所述控制文件完成对所述PCIe总线的动态枚举扫描,所述第二函数用于指示执行枚举扫描的开始位置;扫描模块,设置为依据所述第一函数和所述第二函数对所述PCIe设备总线执行动态枚举扫描。
可选地,所述执行模块,还设置为根据深度优先算法从PCIe控制器开始对整个所述PCIe设备树进行枚举扫描。
可选地,在执行对PCIe设备树的枚举扫描操作之前,所述装置还包括:关闭模块,设置为关闭自身携带的枚举扫描操作功能,触发依据所述深度优先算法对所述PCIe设备树进行枚举扫描的操作。
通过本发明实施例,采用在对PCIe设备树进行枚举扫描时,将扫描到的PCEe设备依据该PCEe设备在PCIe总线中的位置生成对应的结构体,并将该结构体添加到链表中;进而依据该链表以及指定文件系统导出的PCIe设备文件对PCIe设备和PCIe总线进行动态枚举扫描的管理。通过本发明实现了PCIe的动态扫描,解决了相关技术中PCIe的初始化扫描都是静态的问题,达到了提高系统调试效率的效果。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的PCIe设备和PCIe总线的管理方法的流程图;
图2是根据本发明实施例的PCIe设备和PCIe总线的管理装置结构框图;
图3是根据本发明实施例的PCIe设备和PCIe总线的管理装置可选结构框图一;
图4是根据本发明实施例的PCIe设备和PCIe总线的管理装置可选结构框图二;
图5是根据本发明实施例的PCIe设备和PCIe总线的管理装置可选结构框图三;
图6是根据本发明可选实施例的动态枚举扫描PCIe设备及管理方法流程图。
具体实施方式
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本发明。
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
本实施例提供了一种PCIe设备和PCIe总线的管理方法,图1是根据本发明实施例的PCIe设备和PCIe总线的管理方法的流程图,如图1所示,该流程包括以下步骤:
步骤S102:执行对PCIe设备树的枚举扫描操作,并依据PCIe设备在PCIe总线中的位置生成与扫描到的PCEe设备对应的结构体;
步骤S104:将结构体添加到PCIe设备的链表中;
步骤S106:依据链表与指定文件系统导出的PCIe设备文件对PCIe设备和PCIe总线进行动态枚举扫描的管理;
其中,文件用于指示PCIe设备资源信息。
通过本实施例,采用在对PCIe设备树进行枚举扫描时,将扫描到的PCEe设备依据该PCEe设备在PCIe总线中的位置生成对应的结构体,并将该结构体添加到链表中;进而依据该链表以及指定文件系统导出的PCIe设备文件对PCIe设备和PCIe总线进行动态枚举扫描的管理。通过本实施例实现了PCIe的动态扫描,解决了相关技术中PCIe的初始化扫描都是静态的问题,达到了提高系统调试效率的效果。
需要说明的是,对于上述实施例中涉及到的指定文件系统,在本实施例的可选实施方式中可以是sys文件系统,而且下面也将通过该sys文件系统对本实施例进行相应的说明;
基于上述sys文件系统,在本实施例的一个可选实施方式中,上述步骤S106中依据链表与指定文件系统导出的PCIe设备控制文件对PCIe设备和PCIe总线进行动态扫描的管理的方式可以通过如下方式来实现:
方式一:依据链表与指定文件系统导出的PCIe设备控制文件对PCIe总线执行写操作,用于执行对PCIe总线的动态枚举扫描;
方式二:依据链表与指定文件系统导出的PCIe设备控制文件对PCIe设备执行读操作,用于获取PCIe设备的资源信息。
也就是说,通过上述方式一和方式二,对sys文件系统下的控制文件写入操作可以完成PCIe总线的动态枚举扫描,对sys文件系统下的PCIe设备文件读时可获取该PCIe设备的资源信息。
而在步骤S106中依据链表与指定文件系统导出的PCIe设备文件对PCIe设备和PCIe总线进行动态扫描的管理之前,本实施例的方法还可以包括:
步骤S11:在指定文件系统进行初始化时,并在指定文件系统下建立控制文件,其中,控制文件中设置有第一函数和第二函数,第一函数用于指示如何操作控制文件完成对PCIe总线的动态枚举扫描,第二函数用于指示执行枚举扫描的开始位置;
步骤S12:依据第一函数和第二函数对PCIe设备总线执行动态枚举扫描。
通过上述步骤S11和步骤S12中,采用在控制文件中设置第一函数和第二函数来实现PCIe设备总线执行动态枚举扫描,在本实施例的可选实施方式中改第一函数可以是show函数,该第二函数可以是store函数,即当读取控制文件时,系统会调用show函数显示一些字符串,这些字符串用来说明如何操作控制文件以完成PCIe设备树的动态枚举扫描;而show函数的实现本质是一种说明的用途,不起功能性作用;当写入控制文件时,系统会调用store函数。在这个函数中需要解析写入的字符串,根据解析出的内容确定需要在PCIe设备树的哪个位置开始枚举扫描;解析这些信息后,store函数会调用枚举扫描函数,对设备树的指定端口进行枚举扫描,如需扫描整个的PCIe设备树则将PCIe控制器的位置信息写入控制文件中。
对于本实施例涉及到的执行对PCIe设备树的枚举扫描操作方式,可选地,在本实施例中根据深度优先算法从PCIe控制器开始对整个PCIe设备树进行枚举扫描。
而对于执行枚举扫描之前,在本实施例中需要关闭自身携带的枚举扫描操作功能,触发依据深度优先算法对PCIe设备树进行枚举扫描的操作。也就是说,并不需要自带的枚举扫描流程实现PCIe设备的初始化。
在本实施例中还提供了一种PCIe设备和PCIe总线的管理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”“单元”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图2是根据本发明实施例的PCIe设备和PCIe总线的管理装置结构框图,如图2 所示,该装置包括:执行模块22,设置为执行对最新周边元件扩展接口PCIe设备树的枚举扫描操作,并依据PCIe设备在PCIe总线中的位置生成与扫描到的PCEe设备对应的结构体;添加模块24,与执行模块22耦合连接,设置为将结构体添加到PCIe设备的链表中;管理模块26,与添加模块24耦合连接,设置为依据链表与指定文件系统导出的PCIe设备文件对PCIe设备和PCIe总线进行动态枚举扫描的管理,其中,文件用于指示PCIe设备资源信息。
可选地,执行模块,还设置为根据深度优先算法从PCIe控制器开始对整个PCIe设备树进行枚举扫描。
图3是根据本发明实施例的PCIe设备和PCIe总线的管理装置可选结构框图一,如图3所示,该管理模块26包括:扫描单元32,设置为依据链表与指定文件系统导出的PCIe设备文件对PCIe设备文件执行写操作,用于执行对PCIe总线的动态枚举扫描;获取单元34,设置为依据链表与指定文件系统导出的PCIe设备文件信息对PCIe设备文件执行读操作,用于获取PCIe设备的资源信息。
图4是根据本发明实施例的PCIe设备和PCIe总线的管理装置可选结构框图二,如图4所示,在依据链表与指定文件系统导出的PCIe设备文件对PCIe设备和PCIe总线进行动态扫描的管理之前,装置还包括:建立模块42,与添加模块24耦合连接,用于在指定文件系统进行初始化时,并在指定文件系统下建立控制文件,其中,控制文件中设置有第一函数和第二函数,第一函数用于指示如何操作控制文件完成对PCIe总线的动态枚举扫描,第二函数用于指示执行枚举扫描的开始位置;扫描模块44,与建立模块42耦合连接,设置为依据第一函数和第二函数对PCIe设备总线执行动态枚举扫描。
图5是根据本发明实施例的PCIe设备和PCIe总线的管理装置可选结构框图三,如图5所示,在执行对PCIe设备树的枚举扫描操作之前,装置还包括:关闭模块52,与执行模块22耦合连接,设置为关闭自身携带的枚举扫描操作功能,触发依据深度优先算法对PCIe设备树进行枚举扫描的操作。
下面结合本发明实施例的可选实施例对本发明进行举例说明;
本可选实施例提供了种能动态枚举扫描和管理PCIe设备的方法,在本可选实施例中以Linux操作系统为例,即在Linux操作系统启动后,用户可根据需要重新扫描整个PCIe设备树,为每个PCIe总线树上的设备分配bus号和存储空间等资源。本可选实施例也可以实现从某一个PCIe端口进行递归扫描,并为该端口下的设备分配资源。
本可选实施例可以从如下几个方面来实现:
(1)PCIe设备的维护和表示
Linux操作系统自带的数据结构实现方式给了很多借鉴。在本可选实施例的实现过程中,依然采用c语言中定义结构方式表示一个已扫描到的设备,并使用链表的方法将各个设备结构体组组织在一起,从而方便后续扫描算法的实现和动态扫描功能的完成。
(2)采用传统DFS算法进行枚举扫描
所谓枚举扫描PCIe设备树,就是指从PCIe控制器开始枚举遍历整个PCIe设备树;当发现一个设备便为其生成一个设备结构体,并根据设备所处PCIe总线的位置,将该设备结构体添加到PCIe设备链表中。
树形结构的遍历算法大致分为广度优(Breadth-First-Search,简称为BFS)和深度优先(Depth First Search简称为DFS)两种。在本可选实施例中对PCIe设备树的枚举扫描使用的是深度优先算法。使用该算法是基于两方面考虑,一是应用DFS算法完成PCIe设备树的枚举扫描有助于理解PCIe的拓扑结构,二是Linux自带的枚举扫描实现可以作为本可选实施例的参考和借鉴。
(3)动态枚举扫描的管理
为了提升调试和定位故障的效率,实现PCIe设备树的动态枚举扫描,本可选实施例通过sys文件系统下导出的文件来管理PCIe总线和设备;对sys文件系统下的控制文件写入操作可以完成PCIe总线的动态枚举扫描;而对sys文件系统下的PCIe设备文件读时可获取将该PCIe设备的信息。
下面结合附图对本可选实施例进行详细说明;
图6是根据本发明可选实施例的动态枚举扫描PCIe设备及管理方法流程图,如图6所示,该方法的步骤包括:
步骤S602:开始执行Linux内核;
步骤S604:Linux内核初始化;
步骤S606:动态枚举扫描初始化;
步骤S608:通过sys文件接口操作执行动态枚举扫描;
步骤S610:开始动态枚举扫描;
步骤S612:动态枚举扫描结束。
(1)数据结构及接口设计:
为保存和表示已枚举扫描的PCIe设备,需要在Linux系统中定义一个数据结构来 描述具体的设备。Linux内核中本身存在这样的结构体,但为了能做到功能上的独立,可选实施例重新实现了PCIe的设备结构体。
结构体中除了包含设备的基本信息,如busID,devID,vendorID,functionID,各种存储资源的基地址等,还包括了维护PCIe设备树链表所需要的指针,和管理sys文件数据结构。
(2)深度优先遍历描PCIe设备树的实现:
A:关闭Linux操作系统自带的枚举、开启动态枚举。
一个处理器系统首先从Firmware开始执行,由Firmware开始引导Linux内核。引导过程结束之后,系统将会跳转到Linux的第一个head.s文件中,之后再由head.s文件跳转到./init/main.c文件的start_kernel函数。从这里内核开始PCIe初始化之旅。
不同的系统使用的Firmware也并不相同,x86系统使用BIOS,而Powerpc系统使用U-Boot。PCIe设备的枚举初始化通常会在Firmware阶段完成,在这个阶段会为PCIe设备树中的每个设备分配busID,devID,functionID等资源。
Linux内核阶段,会根据编译时的不同选项完成不同的PCIe初始化枚举扫描操作。当在编译Linux内核过程中配置了CONFIG_PCI_BOIS选项,Linux内核中的PCIe初始化流程只不过是根据Firmware枚举的结果建立内核的PCIe相关的数据结构,将PCIe设备的维护添加到设备管理模型中。这个过程并不会为PCIe设备分配busID,devID,functionID和存储空间等资源。相反,如果内核在编译时配置了CONFIG_PCI_DIRECT选项,Linux系统启动后将重新枚举PCIe总线上的设备,并为它们分配所需的资源。
在可选实施例的实现的方法中,并不需要Linux内核中自带的枚举扫描流程实现PCIe设备的初始化,所以在编译内核的时应闭掉CONFIG_PCI_DIRECT选项。并且还保证本可选实施例实现的动态管理的枚举过程要在Linux内核初始化PCIe设备树之前完成。因此本可选实施例中的实现是将动态枚举扫描的初始化接口函数start_pcie放在do_basic_setup函数最开始的位置来执行。
B:动态枚举扫描函数的实现
动态枚举扫描是通过函数pci_scan_device(struct bsp_pci_device*parent,int domain,int bus,int device,int func)这个函数来实现的。这个函数使用DFB算法对父节点parent下的PCIe设备树进行递归扫描、分配资源。当发现新的PCIe设备后,首先会为该设备分配相应的资源,再生成一个struct bsp_pci_device结构体来保存设备的信息,并将该结构体添加到PCIe设备的链表中;当该函数执行完毕后parent下的所有PCIe设备将被初始化,所产生的设备结构体也会全部添加到PCIe设备链表中;这样做会便于 PCIe设备的管理。
(3)支持动态枚举扫描的sys文件接口:
A:定义动态枚举扫描接口的文件及相应操作
为了完成通过操作sys文件系统下的文件来实现动态枚举扫描,系统初始化时需在/sys下建立相应目录和控制文件,并为控制文件定义show和store的操作。
动态枚举扫描的初始化接口函数start_pcie是实现PCIe的sys文件初始化的最合适的地方。在start_pcie中调用Linux内核提供的sysfs_create_file函数来建立PCIe动态枚举扫描控制文件pci_control。
为了能真正通过pci_control文件实现PCIe设备树的动态扫描,需要实现这个文件的show和store函数。当读取pci_control文件时,系统会调用show函数显示一些字符串。这些字符串用来说明如何操作pci_control文件以完成PCIe设备树的动态枚举扫描。show函数的实现本质是一种说明的用途,不起功能性作用。当写入pci_control文件时,系统会调用store函数。在这个函数中需要解析写入的字符串,根据解析出的内容确定需要在PCIe设备树的哪个位置开始枚举扫描。解析这些信息后,store函数会调用上面提到的pci_scan_device函数,对设备树的指定端口进行枚举扫描,如需扫描整个的PCIe设备树则将PCIe控制器的位置信息写入pci_control文件中。
B:实现PCIe设备文件及相应操作:
如前,当调用动态枚举扫描函数pci_scan_device扫描到了一个PCIe设备后,系统会为其分配一个设备结构体struct bsp_pci_device,并使用这个结构体来记录和表示一个PCIe设备。而为实现显示和控制PCIe设备,在扫描时也需要将扫描到的设备导出到/sys文件系统下,在该文件系统下生成一个设备文件ww:xx.yy.zz。(其中,ww表示该设备所在域,xx为设备的总线号,yy为设备号,zz为function号)。当读/写操作该文件时,Linux内核会施予相应的动作到PCIe设备上。
当读取设备文件ww:xx.yy.zz时,系统调用设备文件的show函数。这个函数在本可选实施例中实现为打印对应的PCIe设备配置空间的操作。当向设备文件写入值时,Linux会调用专利中实现的store函数完成PCIe设备的配置空间的写入操作。
在本实施例中将PCIe动态枚举扫描管理功能直接编译到内核中,因此在Linux系统上电后会对该功能进行一次完整的初始化;初始化主要包括两方面:一是枚举扫描PCIe设备树,并为枚举扫描到的PCIe设备建立相应的数据结构,形成设备树的链表;二是根据枚举扫描结果在sys文件系统中建立PCIe设备的显示和管理接口。通过本可选实施例的方法可以提高PCIe调试的效率,降低PCIe调试的复杂度。
以上仅为本发明的可选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
在本发明中,采用在对PCIe设备树进行枚举扫描时,将扫描到的PCEe设备依据该PCEe设备在PCIe总线中的位置生成对应的结构体,并将该结构体添加到链表中;进而依据该链表以及指定文件系统导出的PCIe设备文件对PCIe设备和PCIe总线进行动态枚举扫描的管理。通过本发明实现了PCIe的动态扫描,解决了相关技术中PCIe的初始化扫描都是静态的问题,达到了提高系统调试效率的效果。

Claims (10)

  1. 一种最新周边元件扩展接口PCIe设备和PCIe总线的管理方法,包括:
    执行对最新周边元件扩展接口PCIe设备树的枚举扫描操作,并依据所述PCIe设备在PCIe总线中的位置生成与扫描到的所述PCEe设备对应的结构体;
    将所述结构体添加到所述PCIe设备的链表中;
    依据所述链表与指定文件系统导出的PCIe设备控制文件对所述PCIe设备和PCIe总线进行动态枚举扫描的管理,其中,所述控制文件用于指示所述PCIe设备资源信息。
  2. 根据权利要求1所述的方法,其中,依据所述链表与指定文件系统导出的PCIe设备控制文件对所述PCIe设备和PCIe总线进行动态扫描的管理包括:
    依据所述链表与指定文件系统导出的PCIe设备文件对所述PCIe总线执行写操作,用于执行对所述PCIe总线的动态枚举扫描;
    依据所述链表与指定文件系统导出的PCIe设备控制文件对所述PCIe设备执行读操作,用于获取所述PCIe设备的资源信息。
  3. 根据权利要求1所述的方法,其中,在依据所述链表与指定文件系统导出的PCIe设备控制文件对所述PCIe设备和PCIe总线进行动态扫描的管理之前,所述方法包括:
    在所述指定文件系统进行初始化时,并在所述指定文件系统下建立控制文件,其中,所述控制文件中设置有第一函数和第二函数,所述第一函数用于指示如何操作所述控制文件完成对所述PCIe总线的动态枚举扫描,所述第二函数用于指示执行枚举扫描的开始位置;
    依据所述第一函数和所述第二函数对所述PCIe设备总线执行动态枚举扫描。
  4. 根据权利要求1所述的方法,其中,执行对PCIe设备树的枚举扫描操作包括:
    根据深度优先算法从PCIe控制器开始对整个所述PCIe设备树进行枚举扫描。
  5. 根据权利要求4所述的方法,其中,在执行对PCIe设备树的枚举扫描操作之前包括:
    关闭自身携带的枚举扫描操作功能,触发依据所述深度优先算法对所述PCIe设备树进行枚举扫描的操作。
  6. 一种最新周边元件扩展接口PCIe设备和PCIe总线的管理装置,包括:
    执行模块,设置为执行对最新周边元件扩展接口PCIe设备树的枚举扫描操作,并依据所述PCIe设备在PCIe总线中的位置生成与扫描到的所述PCEe设备对应的结构体;
    添加模块,设置为将所述结构体添加到所述PCIe设备的链表中;
    管理模块,设置为依据所述链表与指定文件系统导出的PCIe设备控制文件对所述PCIe设备和PCIe总线进行动态枚举扫描的管理,其中,所述控制文件用于指示所述PCIe设备资源信息。
  7. 根据权利要求6所述的装置,其中,所述管理模块包括:
    扫描单元,设置为依据所述链表与指定文件系统导出的PCIe设备文件对所述PCIe总线执行写操作,用于执行对所述PCIe总线的动态枚举扫描;
    获取单元,设置为依据所述链表与指定文件系统导出的PCIe设备控制文件对所述PCIe执行读操作,用于获取所述PCIe设备的资源信息。
  8. 根据权利要求6所述的装置,其中,在依据所述链表与指定文件系统导出的PCIe设备文件对所述PCIe设备和PCIe总线进行动态扫描的管理之前,所述装置还包括:
    建立模块,设置为在所述指定文件系统进行初始化时,并在所述指定文件系统下建立控制文件,其中,所述控制文件中设置有第一函数和第二函数,所述第一函数用于指示如何操作所述控制文件完成对所述PCIe总线的动态枚举扫描,所述第二函数用于指示执行枚举扫描的开始位置;
    扫描模块,设置为依据所述第一函数和所述第二函数对所述PCIe设备总线执行动态枚举扫描。
  9. 根据权利要求6所述的装置,其中,
    所述执行模块,还设置为根据深度优先算法从PCIe控制器开始对整个所述PCIe设备树进行枚举扫描。
  10. 根据权利要求9所述的装置,其中,在执行对PCIe设备树的枚举扫描操作之前,所述装置还包括:
    关闭模块,设置为关闭自身携带的枚举扫描操作功能,触发依据所述深度优先算法对所述PCIe设备树进行枚举扫描的操作。
PCT/CN2015/088177 2015-03-20 2015-08-26 PCIe设备和PCIe总线的管理方法及装置 WO2016150098A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510127980.6A CN106033399B (zh) 2015-03-20 2015-03-20 PCIe设备和PCIe总线的管理方法及装置
CN201510127980.6 2015-03-20

Publications (1)

Publication Number Publication Date
WO2016150098A1 true WO2016150098A1 (zh) 2016-09-29

Family

ID=56976943

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/088177 WO2016150098A1 (zh) 2015-03-20 2015-08-26 PCIe设备和PCIe总线的管理方法及装置

Country Status (2)

Country Link
CN (1) CN106033399B (zh)
WO (1) WO2016150098A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109324899A (zh) * 2018-09-10 2019-02-12 中国电子科技集团公司电子科学研究院 基于PCIe池化硬件资源的编址方法、装置及主控节点
CN112835839A (zh) * 2021-02-04 2021-05-25 深圳市广和通无线股份有限公司 PCIe接口的设备枚举方法、装置、设备及存储介质
CN114338475A (zh) * 2021-12-30 2022-04-12 北京天融信网络安全技术有限公司 一种link速率异常检测方法、装置、电子设备及存储介质
CN114546500A (zh) * 2022-01-28 2022-05-27 郑州信大捷安信息技术股份有限公司 一种支持多设备的密码卡驱动实现方法和系统
CN114840465A (zh) * 2022-05-06 2022-08-02 深圳星云智联科技有限公司 提高PCIe卡兼容性的方法、装置、设备及存储介质
US11836059B1 (en) 2020-12-14 2023-12-05 Sanblaze Technology, Inc. System and method for testing non-volatile memory express storage devices

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357408B (zh) * 2017-06-30 2020-02-04 郑州云海信息技术有限公司 一种NVMe JBOF节能方法、系统及数据中心
CN108287804B (zh) * 2018-01-25 2021-12-28 郑州云海信息技术有限公司 一种i2c控制器驱动方法及系统
CN110134446B (zh) * 2019-04-18 2022-04-15 深圳市广和通无线股份有限公司 启动pcie设备扫描的方法
CN114003170B (zh) * 2021-09-17 2024-03-19 方一信息科技(上海)有限公司 一种基于FPGA的Raid卡驱动方法
CN114706602B (zh) * 2022-04-01 2023-03-24 珠海读书郎软件科技有限公司 一种基于Android的通过app更新触摸屏参数的方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101206629A (zh) * 2006-12-19 2008-06-25 国际商业机器公司 在运行的PCIe架构中热插/拔新组件的系统和方法
CN101739379A (zh) * 2010-01-21 2010-06-16 山东高效能服务器和存储研究院 基于服务器的可热插拔pcie设备箱的设计方法
US20120221764A1 (en) * 2011-02-25 2012-08-30 International Business Machines Corporation Low latency precedence ordering in a pci express multiple root i/o virtualization environment
CN102722414A (zh) * 2012-05-22 2012-10-10 中国科学院计算技术研究所 用于多根i/o 虚拟化共享系统的i/o 资源管理方法
CN103246545A (zh) * 2013-05-07 2013-08-14 中国人民解放军国防科学技术大学 面向多虚拟域可定制的PICe外设设备树生成方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662458B (zh) * 2012-04-18 2015-07-08 华为技术有限公司 一种pcie设备动态节能方法、装置及其通信系统
CN103763129B (zh) * 2013-12-31 2018-05-25 华为技术有限公司 一种PCIe设备管理方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101206629A (zh) * 2006-12-19 2008-06-25 国际商业机器公司 在运行的PCIe架构中热插/拔新组件的系统和方法
CN101739379A (zh) * 2010-01-21 2010-06-16 山东高效能服务器和存储研究院 基于服务器的可热插拔pcie设备箱的设计方法
US20120221764A1 (en) * 2011-02-25 2012-08-30 International Business Machines Corporation Low latency precedence ordering in a pci express multiple root i/o virtualization environment
CN102722414A (zh) * 2012-05-22 2012-10-10 中国科学院计算技术研究所 用于多根i/o 虚拟化共享系统的i/o 资源管理方法
CN103246545A (zh) * 2013-05-07 2013-08-14 中国人民解放军国防科学技术大学 面向多虚拟域可定制的PICe外设设备树生成方法

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109324899A (zh) * 2018-09-10 2019-02-12 中国电子科技集团公司电子科学研究院 基于PCIe池化硬件资源的编址方法、装置及主控节点
CN109324899B (zh) * 2018-09-10 2022-05-20 中国电子科技集团公司电子科学研究院 基于PCIe池化硬件资源的编址方法、装置及主控节点
US11836059B1 (en) 2020-12-14 2023-12-05 Sanblaze Technology, Inc. System and method for testing non-volatile memory express storage devices
CN112835839A (zh) * 2021-02-04 2021-05-25 深圳市广和通无线股份有限公司 PCIe接口的设备枚举方法、装置、设备及存储介质
CN114338475A (zh) * 2021-12-30 2022-04-12 北京天融信网络安全技术有限公司 一种link速率异常检测方法、装置、电子设备及存储介质
CN114338475B (zh) * 2021-12-30 2023-12-01 北京天融信网络安全技术有限公司 一种link速率异常检测方法、装置、电子设备及存储介质
CN114546500A (zh) * 2022-01-28 2022-05-27 郑州信大捷安信息技术股份有限公司 一种支持多设备的密码卡驱动实现方法和系统
CN114840465A (zh) * 2022-05-06 2022-08-02 深圳星云智联科技有限公司 提高PCIe卡兼容性的方法、装置、设备及存储介质
CN114840465B (zh) * 2022-05-06 2023-08-18 深圳星云智联科技有限公司 提高PCIe卡兼容性的方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN106033399A (zh) 2016-10-19
CN106033399B (zh) 2020-05-15

Similar Documents

Publication Publication Date Title
WO2016150098A1 (zh) PCIe设备和PCIe总线的管理方法及装置
Olivier et al. A binary-compatible unikernel
US9501289B2 (en) Method of a UEFI firmware and computer system thereof
US9612846B2 (en) Out-of-band (OOB) real-time inventory and configuration of original equipment manufacturer (OEM) devices using advanced configuration and power interface (ACPI) and unified extensible firmware interface (UEFI) services
US7421620B2 (en) Configuration proxy service for the extended firmware interface environment
US9965288B2 (en) Preconfiguring hardware and speeding up server discovery prior to bios boot
US11645068B2 (en) Method for implementing function jump, apparatus, and computer storage medium
JP2016509714A (ja) ハードウェア・デバイス用ソフトウェア・インターフェース
Hale et al. Electrical Engineering and Computer Science Department
US20070168905A1 (en) Networked linux machine and windows software development system
CN103842980B (zh) 用于协议中立织物的方法、系统和装置
US10133654B1 (en) Firmware debug trace capture
CN115291946A (zh) 鸿蒙系统移植方法、装置、电子设备及可读介质
US20160378696A1 (en) Exposing memory-mapped io devices to drivers by emulating pci bus and pci device configuration space
RU2634171C1 (ru) Способ выполнения кода интерпретатором
US20180329729A1 (en) Software-defined microservices
US20230259444A1 (en) Setting breakpoints for source code segments enclosed by macros
US11347523B2 (en) Updated shared library reloading without stopping the execution of an application
US11182182B2 (en) Calling arbitrary functions in the kernel via a probe script
Gediya et al. Open-Source Software
CN109918125B (zh) 基于OpenPOWER架构的GPU配置方法及装置
Kristiansen PCIe Device Lending
US8555046B2 (en) Computer system and its HW abstraction method
Ansari et al. Design and implementation of character device driver for customized kernel of ARM based platform
Kuo et al. Set the configuration for the heart of the OS: on the practicality of operating system kernel debloating

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: 15886027

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: 15886027

Country of ref document: EP

Kind code of ref document: A1