Novel BSP design method

The novel BSP design method decouples kernel and driver layers with a security management module for dynamic management and adaptive fault recovery, addressing flexibility and debugging inefficiencies, thereby improving system stability and reliability.

CN119248359AInactive Publication Date: 2025-01-03BEIJING YIHUI INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411767149.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-01-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional BSP design lacks flexibility in managing hardware and driver compatibility, leading to high coupling, poor debugging efficiency, frequent system failures, and increased maintenance costs due to static debugging methods and tight integration of kernel and driver layers.

Method used

Implement a BSP security management module between the kernel and driver layers to manage driver loading and operation dynamically, using priority-based loading, exception handling, and fault classification for adaptive fault recovery.

Benefits of technology

Decouples kernel and driver layers, enhances system stability and adaptability, simplifies debugging, reduces failure rates, and improves compatibility and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248359A_ABST
    Figure CN119248359A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a novel BSP design method which comprises the steps that a BSP guarantee management module is arranged between a kernel layer and a driving layer of a system; and the BSP guarantee management module is configured to perform guarantee management in the starting process of the driving module and guarantee management in the running process of the system. According to the method, the driving layer is stripped from the kernel layer, decoupling of the driving layer and the kernel layer is achieved, the kernel collapse risk caused by the driving problem is reduced, meanwhile, the BSP is used for guaranteeing that the management module dynamically loads and unloads the driving module, the adaptive capacity of the system to hardware changes is improved, and the system performance is improved. The BSP guarantees that the management module repairs faults occurring in the system during system operation so as to promote stable operation of the system, corresponding abnormal conditions are recorded so as to facilitate follow-up processing, and the fault positioning and repairing efficiency is improved. Therefore, according to the novel BSP design method, the stability and reliability of the operating system can be integrally improved, and the system failure rate is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and specifically to a novel BSP design method. Background Art

[0002] In traditional operating system design, BSP (Board Support Package) usually includes a collection of hardware drivers and underlying services, and these components are tightly integrated in the kernel layer. When the system starts, the kernel and drivers are loaded at the same time. Once there are compatibility issues, configuration errors or hardware failures in the hardware or drivers, the entire BSP may not be initialized correctly, resulting in the system being unable to start or run normally. In addition, the traditional BSP design lacks a flexible dynamic management mechanism, so when the system faces hardware failures or driver problems, it can only rely on static debugging methods, such as serial port printing, to locate the problem. This process is time-consuming and inefficient.

[0003] In summary, the prior art has the following technical disadvantages: High coupling: The kernel and driver are tightly coupled. Failure of any component will affect the startup and operation of the entire system. Lack of flexibility: Driver loading and management are inflexible and cannot dynamically respond to hardware changes or failures; Difficult debugging: The troubleshooting and debugging process is complicated, relying on a large amount of static debugging information and inefficient; Poor compatibility: frequent compatibility issues between hardware and drivers lead to reduced system stability and reliability; High cost: Frequent system failures increase maintenance costs and reduce product credibility and market competitiveness.

[0004] Therefore, a new BSP design model is urgently needed to further decouple the driver layer and the kernel layer. Summary of the invention

[0005] The purpose of this application is to provide a novel BSP design method to solve the technical problems raised in the above background technology.

[0006] To achieve the above-mentioned purpose, the present application discloses the following technical solutions: a novel BSP design method, the method comprising: setting a BSP security management module between the kernel layer and the driver layer of the system; the BSP security management module is configured to: security management during the startup of the driver module and security management during the operation of the system; The security management during the driver module startup process specifically includes: based on the kernel paging management, each driver is loaded step by step in a priority management manner based on the abnormal interrupt management mechanism. When the loading fails, the first exception processing repair is performed. If the repair is successful, the dynamic mapping of the driver module is re-performed. If the repair fails, the error position is marked and the loading process of the next driver module is entered until the system application layer successfully loads the application program; Among them, the security management during the system operation process specifically includes: when the driver module fails during system operation, the abnormal page is recorded, and the second abnormal processing repair is jumped into. If the repair is successful, the dynamic mapping of the driver module is re-performed and the abnormal page is recovered. If the repair fails, the page is recovered, and the application bound to the driver module is recovered synchronously.

[0007] Preferably, the first exception handling repair specifically includes: performing page protection when loading the driver module, and when a page fault or memory leak occurs, performing register collection and then attempting repair.

[0008] Preferably, in the security management during system operation, the BSP security management module divides system faults into soft-restartable faults, hard-restart-required faults, skippable faults and repairable faults.

[0009] Preferably, the second exception handling and repairing process specifically includes: When the system fault corresponds to the soft restartable fault, the BSP security management module executes the system soft restart instruction to repair the fault; When the system fault corresponds to the hard restart fault, the BSP security management module executes the system hard restart instruction to repair the fault; When the system fault corresponds to the skippable execution fault, the BSP guarantee management module skips and ignores the fault; When the system fault corresponds to the repairable fault, the BSP guarantee management module repairs the fault based on a preset repair instruction.

[0010] Beneficial effects: The novel BSP design method of the present application, by separating the driver layer from the kernel layer, realizes the decoupling of the two, reduces the risk of kernel crash caused by driver problems, and at the same time, utilizes the BSP security management module to dynamically load and unload the driver module, improves the system's adaptability to hardware changes, and, through the BSP security management module, repairs system faults during system operation to promote stable system operation, and records corresponding abnormal conditions for subsequent processing, thereby improving fault location and repair efficiency. Therefore, the novel BSP design method of the present application can improve the overall stability and reliability of the operating system, reduce the system failure rate, and improve product competitiveness and user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0012] Figure 1 A schematic diagram of the system architecture corresponding to the new BSP provided in the embodiment of the present application; Figure 2 A schematic diagram of the process of security management of the BSP security management module during the startup of the driver module provided in the embodiment of the present application; Figure 3 A flowchart of the security management of the BSP security management module during system operation provided in an embodiment of the present application. DETAILED DESCRIPTION

[0013] The technical solutions in the embodiments of the present application are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0014] In this article, the term "comprising" is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprising..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0015] In traditional operating system design, when the system starts, the kernel and the driver are loaded at the same time. Once there is a compatibility problem, configuration error or hardware failure in the hardware or driver, the entire BSP may not be initialized correctly, resulting in the system being unable to start or run normally; and the traditional BSP design lacks a flexible dynamic management mechanism, so when the system faces hardware failure or driver problems, it can only rely on static debugging methods, such as serial port printing, to locate the problem. This process is time-consuming and inefficient, etc. This application aims to solve the following problems: Decouple the kernel layer and the driver layer to reduce the risk of kernel crashes caused by driver problems; improve dynamic management capabilities and increase the system's adaptability to hardware changes; enhance fault recovery capabilities; optimize the debugging process to reduce debugging time and costs; and improve system stability and reliability and reduce system failure rates.

[0016] In this regard, this embodiment provides a new BSP design method, which further decouples the driver layer and the kernel layer based on the original operating system. Specifically, refer to Figure 1 The method includes: setting a BSP security management module between the kernel layer and the driver layer of the system.

[0017] The BSP security management module is configured to: perform security management during the startup of the driver module and during the operation of the system.

[0018] Among them, Figure 2 As shown, the security management during the driver module startup process specifically includes: on the basis of the kernel's paging management, combined with the abnormal interrupt management mechanism, each driver is managed in a priority manner, and a module with manually preset stability priority can be selected to load each driver step by step. When the loading fails, the first exception handling repair is performed. If the repair is successful, the dynamic mapping of the driver module is re-performed. If the repair fails, the error position is marked, and the loading process of the next driver module is entered until the system application layer successfully loads the application. Further, in this step, page protection is performed when the driver module is loaded. The first exception handling repair can be, for example: when a page fault or memory leak occurs, register collection is performed and then repair is attempted.

[0019] Among them, Figure 3As shown, the security management during the system operation process specifically includes: when the driver module fails during system operation, the abnormal page is recorded, and the second abnormal processing repair is jumped into. If the repair is successful, the dynamic mapping of the driver module is re-performed, and the abnormal page is recycled. If the repair fails, the page is recycled, and the application bound to the driver module is recycled synchronously. In this step, the BSP security management module divides the system faults into soft restart faults, hard restart faults, skippable execution faults, and repairable faults. Further, the second abnormal processing repair specifically includes: When the system fault corresponds to the soft restartable fault, the BSP security management module executes the system soft restart instruction to repair the fault; When the system fault corresponds to the hard restart fault, the BSP security management module executes the system hard restart instruction to repair the fault; When the system fault corresponds to the skippable execution fault, the BSP guarantee management module skips and ignores the fault; When the system fault corresponds to the repairable fault, the BSP guarantee management module repairs the fault based on a preset repair instruction.

[0020] In this embodiment, the soft restart, hard restart and fault repair instructions can be any one of the existing technologies, and their purpose is to adaptively solve the corresponding fault conditions (faults that can be soft restarted, faults that require hard restart, faults that can be skipped and faults that can be repaired).

[0021] Based on the above, the novel BSP design method of this embodiment has the following technical effects: 1. Improve system stability: Reduce system crashes caused by hardware failures or driver problems through modular dynamic driver management.

[0022] 2. Enhanced flexibility: Supports dynamic loading and unloading of drivers to facilitate adaptation to different hardware environments and changing requirements.

[0023] 3. Simplify the debugging process: The BSP security management module can be used to quickly locate and repair faults, reducing debugging time and costs.

[0024] 4. Improve compatibility: By optimizing the compatibility between drivers and hardware, the system failure rate can be reduced and product credibility and market competitiveness can be improved.

[0025] 5. Optimize user experience: Provide flexible fault handling configuration options, allowing users to select appropriate fault handling strategies based on actual needs to improve user experience.

[0026] In the embodiments provided in the present application, it should be understood that part or all of the processes of the embodiments can be completed by instructing the relevant hardware through a computer program. When implemented, the above-mentioned program can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein the communication media include any medium that is convenient for transmitting a computer program from one place to another. The storage medium can be any available medium that a computer can access. Computer-readable storage media can include but are not limited to RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer.

[0027] Finally, it should be noted that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Although the present application has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A novel BSP design method, characterized in that: The method comprises: setting a BSP security management module between the kernel layer and the driver layer of the system; the BSP security management module is configured to: security management during the driver module startup process and security management during the system operation process; The security management during the driver module startup process specifically includes: based on the kernel paging management, each driver is loaded step by step in a priority management manner based on the abnormal interrupt management mechanism. When the loading fails, the first exception processing repair is performed. If the repair is successful, the dynamic mapping of the driver module is re-performed. If the repair fails, the error position is marked and the loading process of the next driver module is entered until the system application layer successfully loads the application program; Among them, the security management during the system operation process specifically includes: when the driver module fails during system operation, the abnormal page is recorded, and the second abnormal processing repair is jumped into. If the repair is successful, the dynamic mapping of the driver module is re-performed and the abnormal page is recovered. If the repair fails, the page is recovered, and the application bound to the driver module is recovered synchronously.

2. The novel BSP design method according to claim 1, characterized in that: The first exception handling and repairing specifically includes: performing page protection when loading the driver module, and when a page fault or memory leak occurs, performing register collection and then attempting repairing.

3. The novel BSP design method according to claim 1, characterized in that: In the security management during the system operation, the BSP security management module divides system faults into soft restartable faults, hard restart required faults, skippable execution faults and repairable faults.

4. The novel BSP design method according to claim 3, characterized in that: The second exception handling repair specifically includes: When the system fault corresponds to the soft restartable fault, the BSP security management module executes the system soft restart instruction to repair the fault; When the system fault corresponds to the hard restart fault, the BSP security management module executes the system hard restart instruction to repair the fault; When the system fault corresponds to the skippable execution fault, the BSP guarantee management module skips and ignores the fault; When the system fault corresponds to the repairable fault, the BSP guarantee management module repairs the fault based on a preset repair instruction.

Citation Information

Patent Citations

  • Kernel drive isolating system

    CN103279367A

  • Home-based care health service system and method based on digital home middleware

    CN103902397A

  • Driver file processing method and related device

    CN116701238A

  • Isolation of applications by a kernel

    WO2024023204A1