Embedded boot program hardware abstraction interface access control method

CN123011368APending Publication Date: 2026-10-30SHENZHEN EN PLUS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611175189.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]本申请的主要目的在于提供了一种嵌入式引导程序硬件抽象接口访问控制方法,旨在解决如何提升嵌入式引导程序硬件抽象接口的访问可靠性的技术问题

Benefits of technology

[0014]本申请通过基于引导程序对应的链接产物,对硬件抽象接口访问入口及关联调用链进行存储访问依赖校验,得到访问入口校验结果;在访问入口校验结果满足预设构建条件的情况下,基于引导程序对应的只读存储布局信息,确定第一接口副本和第二接口副本对应的副本定位信息,并根据副本定位信息配置对应的区段访问约束,第一接口副本和第二接口副本分别包括硬件抽象接口指向信息、结构识别信息、边界校验信息和内容校验信息;响应于业务模块发起的接口取得请求,基于副本定位信息和区段访问约束访问第一接口副本,并根据第一接口副本中的边界校验信息和内容校验信息对第一接口副本进行完整性校验,得到第一副本校验结果;在第一副本校验结果不满足预设有效条件的情况下,基于副本定位信息和区段访问约束访问第二接口副本,并根据第二接口副本中的边界校验信息和内容校验信息对第二接口副本进行完整性校验,得到第二副本校验结果;基于第一副本校验结果和第二副本校验结果,从第一接口副本和第二接口副本中确定目标接口副本,或者生成降级处理控制信息,并基于目标接口副本向业务模块返回硬件抽象接口指向信息,或者基于降级处理控制信息执行预设故障处理过程。本申请通过先对引导程序对应的链接产物进行存储访问依赖校验,使硬件抽象接口访问入口及关联调用链在满足预设构建条件后才参与后续接口取得过程,从源头降低不符合要求的存储访问依赖对接口访问的影响;在此基础上,基于只读存储布局信息确定第一接口副本和第二接口副本的副本定位信息,并配置对应的区段访问约束,使业务模块的接口取得过程能够按照确定的副本位置和访问约束执行;当业务模块发起接口取得请求时,先对第一接口副本的边界校验信息和内容校验信息进行完整性校验,在第一副本校验结果不满足预设有效条件时,再对第二接口副本进行完整性校验,从而形成接口副本的有效性判定和回退访问机制;最后根据第一副本校验结果和第二副本校验结果确定目标接口副本并返回硬件抽象接口指向信息,或者在无法确定有效接口副本时生成降级处理控制信息并执行预设故障处理过程,由此避免未经校验或校验异常的接口副本被直接返回至业务模块,降低单一接口副本异常对接口取得过程的影响,进而提升嵌入式引导程序硬件抽象接口的访问可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011368A_ABST
    Figure CN123011368A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of embedded system software architecture, in particular to an embedded boot program hardware abstraction interface access control method. The method is based on a boot program link product, stores and accesses a hardware abstraction interface access entry and an associated call chain to perform a storage access dependency check, and obtains an access entry check result; if a preset construction condition is met, a read-only storage layout information is used to determine copy positioning information of a first interface copy and a second interface copy, and a section access constraint is configured; in response to an interface acquisition request, the first interface copy is accessed and integrity check is performed, and a first copy check result is obtained; if the first copy check result does not meet a preset effective condition, the second interface copy is accessed and integrity check is performed, and a second copy check result is obtained; based on the two copy check results, a target interface copy is determined, hardware abstraction interface pointing information is returned, or degradation processing control information is generated and a preset fault processing process is executed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of embedded system software architecture technology, and in particular to an embedded bootloader hardware abstraction interface access control method. Background Technology

[0002] Embedded bootloaders are typically used to perform basic hardware initialization, firmware loading, fault recovery, and peripheral access control during system power-on, reset, or upgrade processes. To reduce the coupling between business modules and underlying hardware drivers, bootloaders usually include a hardware abstraction interface (HAPI), allowing business modules to access underlying driver functions such as memory, communication interfaces, timers, watchdog timers, clocks, and security operations through a unified interface. Existing embedded bootloaders typically implement the HAPI using runtime-initialized interface handles, fixed-address read-only interface tables, or read-only function pointer configuration sets. Runtime-initialized interface handles often rely on global variables in random access memory (RAM) or runtime-filled data. When RAM experiences data flips, partial damage, or unstable power-on states, the acquisition of the HAPI can be affected. While fixed-address read-only interface tables and read-only function pointer configuration sets reduce reliance on RAM, they typically only provide a single interface copy. When a local data anomaly occurs in the read-only memory region where the interface resides, the business module may still access the already corrupted interface content, resulting in poor reliability of the embedded bootloader's HAPI in memory anomaly scenarios. Therefore, improving the access reliability of the embedded bootloader hardware abstraction interface has become a pressing technical problem. Summary of the Invention

[0003] The main objective of this application is to provide an access control method for an embedded bootloader hardware abstraction interface, which aims to solve the technical problem of how to improve the access reliability of the embedded bootloader hardware abstraction interface.

[0004] To achieve the above objectives, this application provides an embedded bootloader hardware abstraction interface access control method, the method comprising the following steps: Based on the link artifacts corresponding to the bootstrap program, storage access dependency verification is performed on the hardware abstraction interface access entry and associated call chain to obtain the access entry verification result. If the access entry verification result meets the preset construction conditions, based on the read-only storage layout information corresponding to the bootstrap, determine the copy location information corresponding to the first interface copy and the second interface copy, and configure the corresponding segment access constraints according to the copy location information. The first interface copy and the second interface copy respectively include hardware abstract interface pointing information, structure identification information, boundary verification information and content verification information. In response to an interface retrieval request initiated by a business module, the first interface replica is accessed based on the replica location information and the segment access constraints, and the integrity of the first interface replica is verified according to the boundary verification information and content verification information in the first interface replica to obtain the first replica verification result. If the first copy verification result does not meet the preset valid conditions, the second interface copy is accessed based on the copy location information and the segment access constraint, and the integrity of the second interface copy is verified according to the boundary verification information and content verification information in the second interface copy to obtain the second copy verification result. Based on the verification results of the first and second replicas, a target interface replica is determined from the first and second interface replicas, or degradation processing control information is generated, and the hardware abstract interface pointing information is returned to the business module based on the target interface replica, or a preset fault handling process is executed based on the degradation processing control information.

[0005] In one embodiment, the step of performing storage access dependency verification on the hardware abstraction interface access entry and associated call chain based on the link artifact corresponding to the bootstrap program, and obtaining the access entry verification result, includes: The symbol information and link mapping information in the link artifacts are parsed to determine the entry symbol, entry address and call relationship associated with the entry symbol corresponding to the hardware abstract interface access entry, and to obtain the call chain description data corresponding to the hardware abstract interface access entry. Based on the call chain description data, the storage access behavior in the hardware abstraction interface access entry and associated call chain is extracted to determine the read access target, write access target and stack space occupancy representation information corresponding to the hardware abstraction interface access entry and associated call chain. Based on the read access target, the write access target, and the stack space occupancy representation information, the hardware abstract interface access entry and associated call chain are subjected to storage segment matching verification and stack space constraint verification to obtain the access entry verification result.

[0006] In one embodiment, the step of determining the replica location information corresponding to the first interface replica and the second interface replica based on the read-only storage layout information corresponding to the bootstrap program, and configuring the corresponding segment access constraints according to the replica location information, when the access entry verification result meets the preset construction conditions, includes: If the access entry verification result meets the preset construction conditions, the read-only storage layout information corresponding to the boot program is parsed to determine the first read-only storage segment and the second read-only storage segment used to store the hardware abstract interface copy. Based on the first read-only storage segment and the second read-only storage segment, the storage address information, segment ownership information and replica correspondence corresponding to the first interface replica and the second interface replica are determined respectively, and the replica location information corresponding to the first interface replica and the second interface replica is obtained. The first interface replica and the second interface replica are respectively associated with the hardware abstract interface pointing information, the structure identification information, the boundary verification information and the content verification information. Based on the replica location information, access attributes are configured for the first read-only storage segment and the second read-only storage segment to determine the read-only access constraints, execution restriction constraints, and cache access constraints corresponding to the first interface replica and the second interface replica, thereby obtaining the segment access constraints corresponding to the replica location information.

[0007] In one embodiment, the step of responding to an interface retrieval request initiated by a business module, accessing the first interface replica based on the replica location information and the segment access constraints, and performing integrity verification on the first interface replica according to the boundary verification information and content verification information in the first interface replica to obtain the first replica verification result includes: In response to the interface acquisition request initiated by the business module, the hardware abstraction interface access entry is invoked, and the storage address information and segment ownership information corresponding to the first interface replica are determined based on the replica location information; Based on the storage address information, the segment ownership information, and the segment access constraints, the first interface copy is read and accessed, and the boundary verification information in the read first interface copy is matched and verified to obtain the first boundary verification result. If the first boundary verification result meets the preset boundary conditions, the content verification information to be compared is generated based on the hardware abstract interface pointing information and structure identification information in the first interface copy, and the content verification information to be compared is matched and verified with the content verification information in the first interface copy to obtain the first copy verification result.

[0008] In one embodiment, the step of accessing the second interface replica based on the replica location information and the segment access constraint when the first replica verification result does not meet the preset valid conditions, and performing integrity verification on the second interface replica according to the boundary verification information and content verification information in the second interface replica to obtain the second replica verification result includes: If the first copy verification result does not meet the preset valid conditions, a copy rollback trigger information is generated based on the first copy verification result, and the storage address information and segment ownership information corresponding to the second interface copy are determined according to the copy rollback trigger information and the copy location information. Based on the storage address information, segment ownership information and segment access constraints corresponding to the second interface replica, the second interface replica is read and accessed, and the boundary verification information in the read second interface replica is matched and verified to obtain the second boundary verification result. If the second boundary verification result meets the preset boundary conditions, candidate comparison content verification information is generated based on the hardware abstract interface pointing information and structure identification information in the second interface copy, and the candidate comparison content verification information is matched and verified with the content verification information in the second interface copy to obtain the second copy verification result.

[0009] In one embodiment, the steps of determining a target interface replica from the first interface replica and the second interface replica based on the first replica verification result and the second replica verification result, or generating degradation processing control information, and returning the hardware abstract interface pointing information to the service module based on the target interface replica, or executing a preset fault handling process based on the degradation processing control information, include: The validity of the first replica verification result and the second replica verification result is determined to obtain the replica validity determination result, and the availability status of the first interface replica and the second interface replica is determined based on the replica validity determination result; If the availability status indicates that either the first interface copy or the second interface copy meets a preset valid condition, the interface copy that meets the preset valid condition is determined as the target interface copy; if the availability status indicates that neither the first interface copy nor the second interface copy meets the preset valid condition, the degradation processing control information is generated. Based on the target interface copy, extract the hardware abstract interface pointing information from the target interface copy and return the hardware abstract interface pointing information to the business module; or based on the degradation processing control information, call the preset fault output path and reset control path that do not depend on the hardware abstract interface to execute the preset fault handling process.

[0010] Furthermore, to achieve the above objectives, this application also proposes an embedded bootloader hardware abstract interface access control device, which includes: The dependency verification module is used to perform storage access dependency verification on the hardware abstraction interface access entry and associated call chain based on the link artifacts corresponding to the bootstrap program, and obtain the access entry verification result. The constraint configuration module is used to determine the replica location information corresponding to the first interface replica and the second interface replica based on the read-only storage layout information corresponding to the bootstrap program when the access entry verification result meets the preset construction conditions, and to configure the corresponding segment access constraints according to the replica location information. The first interface replica and the second interface replica respectively include hardware abstract interface pointing information, structure identification information, boundary verification information and content verification information. The first verification module is used to respond to the interface acquisition request initiated by the business module, access the first interface copy based on the copy location information and the segment access constraint, and perform integrity verification on the first interface copy according to the boundary verification information and content verification information in the first interface copy to obtain the first copy verification result. The second verification module is used to access the second interface copy based on the copy location information and the segment access constraint when the first copy verification result does not meet the preset valid conditions, and to perform integrity verification on the second interface copy according to the boundary verification information and content verification information in the second interface copy to obtain the second copy verification result. The target processing module is used to determine a target interface copy from the first interface copy and the second interface copy based on the first copy verification result and the second copy verification result, or generate degradation processing control information and return the hardware abstract interface pointing information to the business module based on the target interface copy, or execute a preset fault handling process based on the degradation processing control information.

[0011] Furthermore, to achieve the above objectives, this application also proposes an embedded bootloader hardware abstract interface access control device, the device comprising: a memory, a processor, and an embedded bootloader hardware abstract interface access control program stored in the memory and executable on the processor, the embedded bootloader hardware abstract interface access control program being configured to implement the steps of the embedded bootloader hardware abstract interface access control method as described above.

[0012] In addition, to achieve the above objectives, this application also proposes a storage medium storing an embedded bootloader hardware abstract interface access control program, which, when executed by a processor, implements the steps of the embedded bootloader hardware abstract interface access control method described above.

[0013] In addition, to achieve the above objectives, this application also proposes a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the embedded bootloader hardware abstract interface access control method described above.

[0014] This application verifies the storage access dependency of the hardware abstract interface access entry and associated call chain based on the link artifact corresponding to the bootstrap, obtaining the access entry verification result. If the access entry verification result meets preset construction conditions, it determines the replica location information corresponding to the first and second interface replicas based on the read-only storage layout information corresponding to the bootstrap, and configures corresponding segment access constraints according to the replica location information. The first and second interface replicas respectively include hardware abstract interface pointing information, structure identification information, boundary verification information, and content verification information. In response to an interface acquisition request initiated by a business module, it accesses the first interface replica based on the replica location information and segment access constraints, and then... The first interface copy is subjected to integrity verification based on the boundary verification information and content verification information to obtain the first copy verification result. If the first copy verification result does not meet the preset valid conditions, the second interface copy is accessed based on the copy location information and segment access constraints, and the second interface copy is subjected to integrity verification based on the boundary verification information and content verification information in the second interface copy to obtain the second copy verification result. Based on the first copy verification result and the second copy verification result, the target interface copy is determined from the first interface copy and the second interface copy, or degradation processing control information is generated, and hardware abstract interface pointing information is returned to the business module based on the target interface copy, or a preset fault handling process is executed based on the degradation processing control information. This application first verifies the storage access dependency of the link artifacts corresponding to the bootstrap program, ensuring that the hardware abstract interface access entry and associated call chain only participate in the subsequent interface acquisition process after meeting preset construction conditions. This reduces the impact of non-compliant storage access dependencies on interface access from the source. Based on this, the copy location information of the first and second interface copies is determined according to read-only storage layout information, and corresponding segment access constraints are configured, enabling the interface acquisition process of the business module to execute according to the determined copy location and access constraints. When the business module initiates an interface acquisition request, the integrity of the boundary verification information and content verification information of the first interface copy is first verified. If the verification result of the first copy does not meet the preset validity conditions, the integrity of the second interface copy is then verified, thus forming an interface copy validity determination and fallback access mechanism. Finally, the target interface copy is determined based on the verification results of the first and second copies, and the hardware abstract interface pointing information is returned. Alternatively, if a valid interface copy cannot be determined, degradation processing control information is generated and a preset fault handling process is executed. This avoids unverified or abnormal interface copies being directly returned to the business module, reducing the impact of a single abnormal interface copy on the interface acquisition process, and thus improving the access reliability of the embedded bootstrap hardware abstract interface. Attached Figure Description

[0015] Figure 1This is a flowchart illustrating the first embodiment of the embedded bootloader hardware abstract interface access control method of this application; Figure 2 This is a schematic diagram of a sub-process in the second embodiment of the embedded bootloader hardware abstract interface access control method of this application; Figure 3 This is a schematic diagram of a sub-process in the third embodiment of the embedded bootloader hardware abstract interface access control method of this application; Figure 4 This is a schematic diagram of the module structure of the embedded bootloader hardware abstraction interface access control device according to an embodiment of this application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the embedded bootloader hardware abstract interface access control method in the embodiments of this application.

[0016] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0017] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.

[0018] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0019] It should be noted that embedded bootloaders are typically used to complete basic hardware initialization, firmware loading, exception recovery, and peripheral access control during system power-on, reset, or upgrade processes. To reduce the coupling between business modules and underlying hardware drivers, bootloaders usually include a hardware abstraction interface (HAPI), enabling business modules to call underlying driver functions such as memory, communication interfaces, timers, watchdog timers, clocks, and security operations through a unified interface. Existing embedded bootloaders typically implement HAPIs using runtime-initialized interface handles, fixed-address read-only interface tables, or read-only function pointer configuration sets. Runtime-initialized interface handles often rely on global variables in random access memory (RAM) or runtime-filled data. When RAM experiences data flips, partial damage, or unstable power-on states, the acquisition of the HAPI can be affected. While fixed-address read-only interface tables and read-only function pointer configuration sets can reduce reliance on random access memory (RAM), they typically only have a single interface copy. When a local data anomaly occurs in the read-only memory region where the interface resides, the application module may still access the already corrupted interface content, resulting in poor access reliability of the embedded bootloader hardware abstraction interface under storage anomaly scenarios. Therefore, improving the access reliability of the embedded bootloader hardware abstraction interface has become an urgent technical problem to be solved.

[0020] The main solution of this application is as follows: Based on the link artifact corresponding to the bootstrap program, storage access dependency verification is performed on the hardware abstract interface access entry and associated call chain to obtain the access entry verification result; if the access entry verification result meets the preset construction conditions, based on the read-only storage layout information corresponding to the bootstrap program, the replica location information corresponding to the first interface replica and the second interface replica is determined, and the corresponding segment access constraints are configured according to the replica location information. The first interface replica and the second interface replica respectively include hardware abstract interface pointing information, structure identification information, boundary verification information, and content verification information; in response to the interface acquisition request initiated by the business module, the first interface replica is accessed based on the replica location information and segment access constraints, and the first interface replica is accessed according to the first interface access dependency verification result. The boundary verification information and content verification information in the first interface replica are used to perform integrity verification on the first interface replica to obtain the first replica verification result. If the first replica verification result does not meet the preset valid conditions, the second interface replica is accessed based on the replica location information and segment access constraints, and the second interface replica is used to perform integrity verification on the second interface replica based on the boundary verification information and content verification information to obtain the second replica verification result. Based on the first replica verification result and the second replica verification result, the target interface replica is determined from the first interface replica and the second interface replica, or degradation processing control information is generated, and hardware abstract interface pointing information is returned to the business module based on the target interface replica, or a preset fault handling process is executed based on the degradation processing control information.

[0021] This application first verifies the storage access dependency of the link artifacts corresponding to the bootstrap program, ensuring that the hardware abstract interface access entry and associated call chain only participate in the subsequent interface acquisition process after meeting preset construction conditions. This reduces the impact of non-compliant storage access dependencies on interface access from the source. Based on this, the copy location information of the first and second interface copies is determined according to read-only storage layout information, and corresponding segment access constraints are configured, enabling the interface acquisition process of the business module to execute according to the determined copy location and access constraints. When the business module initiates an interface acquisition request, the integrity of the boundary verification information and content verification information of the first interface copy is first verified. If the verification result of the first copy does not meet the preset validity conditions, the integrity of the second interface copy is then verified, thus forming an interface copy validity determination and fallback access mechanism. Finally, the target interface copy is determined based on the verification results of the first and second copies, and the hardware abstract interface pointing information is returned. Alternatively, if a valid interface copy cannot be determined, degradation processing control information is generated and a preset fault handling process is executed. This avoids unverified or abnormal interface copies being directly returned to the business module, reducing the impact of a single abnormal interface copy on the interface acquisition process, and thus improving the access reliability of the embedded bootstrap hardware abstract interface.

[0022] It should be noted that the execution subject of the method in this embodiment can be a computing service device with data processing, network communication, and program execution functions, or it can be the aforementioned embedded bootloader hardware abstract interface access control device with the same or similar functions. This embodiment and the following embodiments will be described using an embedded bootloader hardware abstract interface access control device as an example.

[0023] Based on this, a first embodiment of the embedded bootloader hardware abstract interface access control method of this application is proposed. Please refer to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the embedded bootloader hardware abstract interface access control method of this application.

[0024] In this embodiment, the method includes the following steps: S1: Based on the link artifacts corresponding to the bootstrap program, perform storage access dependency verification on the hardware abstraction interface access entry and associated call chain to obtain the access entry verification result. S2: If the access entry verification result meets the preset construction conditions, based on the read-only storage layout information corresponding to the bootstrap program, determine the copy location information corresponding to the first interface copy and the second interface copy, and configure the corresponding segment access constraints according to the copy location information. The first interface copy and the second interface copy respectively include hardware abstract interface pointing information, structure identification information, boundary verification information and content verification information. It should be noted that: Bootloader refers to the basic control program that runs before the business program during the power-on, reset, or upgrade process of an embedded device; Link artifact refers to the construction result formed after the bootloader is compiled and linked, which can be used to analyze symbols, addresses, segment layouts, and call relationships; Hardware Abstraction Interface (HAPI) access entry point refers to the unified entry point for business modules to obtain the hardware abstraction interface; Associated call chain refers to the function path directly or indirectly called by the HAPI access entry point; Storage access dependency verification refers to checking the read, write, and stack usage involved in the access entry point and its associated call chain to determine whether it meets the preset storage access requirements; Access entry verification result refers to the pass or fail judgment result formed after storage access dependency verification; Preset construction conditions refer to the preset verification conditions that allow the bootloader to continue construction or allow the interface access entry point to participate in subsequent operation; Read-only memory... Storage layout information refers to the information used in the bootloader to describe the storage relationships of read-only storage areas, segment locations, and interface replicas; the first interface replica and the second interface replica refer to two hardware abstract interface structure replicas respectively set in the read-only storage area; replica location information refers to the information used to determine the storage address, segment affiliation, and replica correspondence of each interface replica; segment access constraints refer to the access restrictions configured for the storage segment where the interface replica is located, such as read, write, execute, or cache; hardware abstract interface pointing information refers to the information used to point to the underlying hardware driver interface or driver function set; structure identification information refers to the information used to identify the structure type or version status of the interface replica; boundary verification information refers to the information used to determine whether the start and end boundaries of the interface replica are abnormal; content verification information refers to the information used to determine whether the internal content of the interface replica has been changed or damaged.

[0025] Specifically, firstly, based on the link artifacts corresponding to the bootloader, the hardware abstraction interface access point and its associated call chain are parsed to determine the access point's entry symbol, entry address, storage segment, and associated call relationships derived from it within the link artifacts. Subsequently, storage access behaviors within the access point and associated call chain are extracted, identifying read access targets, write access targets, and stack space usage, and these behaviors are compared with preset storage access rules. For example, it determines whether a read access falls within an allowed read-only storage area, whether a write access belongs to an allowed status record area or whether there are any unexpected writes, and whether the stack usage of the call chain meets preset constraints. Based on the comparison results, an access point verification result is generated to characterize whether the hardware abstraction interface access point and its associated call chain meet preset construction conditions.

[0026] If the access entry verification result meets the preset construction conditions, the read-only storage layout information corresponding to the bootloader is further read to determine the first and second read-only storage segments used to store the hardware abstract interface replicas. Based on this read-only storage layout information, the storage address, segment affiliation, and replica correspondence of the first and second interface replicas are determined, forming replica location information. Each interface replica is configured with hardware abstract interface pointing information, structure identification information, boundary verification information, and content verification information, enabling subsequent interface requests to access the corresponding replica based on the replica location information and providing a basis for further integrity verification. Subsequently, based on the replica location information, corresponding segment access constraints are configured for the storage segments where the first and second interface replicas are located. This ensures that the segments containing the interface replicas are accessed in a controlled manner according to preset read, write, execute, or cache access requirements during subsequent access, thereby completing the location of the first and second interface replicas and the configuration of segment access constraints.

[0027] The above steps first verify the storage access dependency of the hardware abstraction interface access entry and associated call chain through the link artifacts. This ensures that subsequent interface copy access is based on the access entry meeting preset construction conditions, reducing the possibility that unexpected storage access dependencies at the access entry or call chain might affect the interface acquisition process. Then, after the verification results meet the preset construction conditions, the copy location information of the first and second interface copies is determined based on read-only storage layout information, giving the interface copies a clear storage location and copy correspondence. Furthermore, corresponding segment access constraints are configured based on the copy location information, enabling subsequent business modules to access interface copies under controlled segment access conditions. This also provides a structural foundation for subsequently using boundary and content verification information to determine copy integrity. This provides a preliminary guarantee for reliably obtaining hardware abstraction interface pointing information, thereby helping to improve the access reliability of the embedded bootloader's hardware abstraction interface.

[0028] S3: In response to the interface acquisition request initiated by the business module, access the first interface copy based on the copy location information and the segment access constraint, and perform integrity verification on the first interface copy according to the boundary verification information and content verification information in the first interface copy to obtain the first copy verification result. S4: If the first copy verification result does not meet the preset valid conditions, access the second interface copy based on the copy location information and the segment access constraint, and perform integrity verification on the second interface copy according to the boundary verification information and content verification information in the second interface copy to obtain the second copy verification result; S5: Based on the verification results of the first and second replicas, determine the target interface replica from the first and second interface replicas, or generate degradation processing control information, and return the hardware abstract interface pointing information to the business module based on the target interface replica, or execute a preset fault handling process based on the degradation processing control information.

[0029] It should be noted that: "Business module" refers to the functional unit in the bootloader that needs to call the underlying hardware driver; "Interface acquisition request" refers to the access request from the business module to obtain information pointing to the hardware abstract interface; "Replica location information" refers to the information used to determine the storage address, segment affiliation, and replica correspondence of the first and second interface replicas; "Segment access constraint" refers to the access restrictions set for the storage segment where the interface replica is located, used to constrain the reading, writing, execution, or caching access methods of the interface replica; "First interface replica" refers to the hardware abstract interface structure replica that is accessed first during the interface acquisition process; "Second interface replica" refers to the hardware abstract interface structure replica that serves as an alternative access object when the first interface replica fails verification; "Boundary verification information" refers to the information used to determine whether the start and end boundaries of the interface replica are complete or abnormal; "Content verification information" refers to the information used to determine whether the internal content of the interface replica has been altered or damaged; "Integrity" refers to the completeness of the content. Verification refers to the process of determining whether an interface copy meets preset validity conditions based on boundary verification information and content verification information. The first copy verification result and the second copy verification result refer to the validity determination results obtained after performing integrity verification on the first and second interface copies respectively. Preset validity conditions refer to the preset conditions used to determine whether an interface copy can serve as a valid source of a hardware abstract interface. The target interface copy refers to the interface copy determined based on the first and second copy verification results, used to provide hardware abstract interface pointing information to the business module. Degradation processing control information refers to the information generated when a valid interface copy cannot be determined, used to control fault output, reset, or other preset fault handling processes. Hardware abstract interface pointing information refers to the information used to point to the underlying hardware driver interface or driver function set. Preset fault handling processes refer to the fault output, reset, and other processing processes executed according to preset methods when all interface copies are unavailable.

[0030] Specifically, when a business module initiates an interface retrieval request, the hardware abstract interface access entry first responds to the request and determines the storage location and segment of the first interface copy based on the aforementioned copy location information. Then, it reads and accesses the first interface copy according to the corresponding segment access constraints. After reading the first interface copy, it first determines whether the start and end boundaries of the copy conform to the preset state based on the boundary verification information in the first interface copy, in order to exclude the situation where the copy boundary is covered, truncated, or the location is abnormal. On the basis that the boundary verification meets the requirements, it then combines the hardware abstract interface pointing information, structural identification information, and other contents in the first interface copy to generate content verification data for comparison, and matches this content verification data with the preset content verification information in the first interface copy to obtain the first copy verification result.

[0031] If the first copy verification result meets the preset validity conditions, the first interface copy can be used as a candidate valid interface source. If the first copy verification result does not meet the preset validity conditions, the storage location and segment ownership of the second interface copy are determined according to the copy location information, and the second interface copy is read according to the segment access constraints. The processing method for the second interface copy corresponds to that of the first interface copy. That is, the boundary integrity is first judged according to the boundary verification information in the second interface copy, and then the content integrity is judged according to the content verification information in the second interface copy to obtain the second copy verification result. Subsequently, the validity is determined by combining the first copy verification result and the second copy verification result: when the first interface copy or the second interface copy meets the preset validity conditions, the interface copy that meets the conditions is determined as the target interface copy, and the hardware abstract interface pointing information is extracted from the target interface copy and returned to the business module; when neither the first interface copy nor the second interface copy meets the preset validity conditions, degradation processing control information is generated, and the preset fault handling process is executed based on the degradation processing control information.

[0032] Each time a business module requests the hardware abstraction interface, it does not directly return the interface pointer information. Instead, it first performs controlled access to the first interface copy based on the copy location information and segment access constraints. It then uses boundary and content verification information to perform integrity verification on the first interface copy, thereby reducing the possibility of abnormal copies being used directly. When the first copy verification result does not meet the preset validity conditions, it further accesses the second interface copy and performs the same integrity verification. This provides the interface acquisition process with alternative access paths based on the verification results, reducing the impact of a single abnormal interface copy on the interface acquisition process. Finally, based on the verification results of the first and second copies, it determines the target interface copy or generates degradation processing control information. This ensures that the business module only obtains the hardware abstraction interface pointer information when a valid interface copy exists, and switches to a preset fault handling process when both copies are unavailable. This improves the reliability of the embedded bootloader's hardware abstraction interface acquisition process.

[0033] This embodiment verifies the storage access dependency of the hardware abstract interface access entry and associated call chain based on the link artifact corresponding to the bootstrap program, obtaining the access entry verification result. If the access entry verification result meets the preset construction conditions, the replica location information corresponding to the first and second interface replicas is determined based on the read-only storage layout information corresponding to the bootstrap program. Corresponding segment access constraints are configured according to the replica location information. The first and second interface replicas respectively include hardware abstract interface pointing information, structure identification information, boundary verification information, and content verification information. In response to an interface acquisition request initiated by a business module, the first interface replica is accessed based on the replica location information and segment access constraints. The boundary verification information and content verification information in the first interface copy are used to perform integrity verification on the first interface copy to obtain the first copy verification result. If the first copy verification result does not meet the preset valid conditions, the second interface copy is accessed based on the copy location information and segment access constraints, and the second interface copy is used to perform integrity verification on the second interface copy based on the boundary verification information and content verification information in the second interface copy to obtain the second copy verification result. Based on the first copy verification result and the second copy verification result, the target interface copy is determined from the first interface copy and the second interface copy, or degradation processing control information is generated, and hardware abstract interface pointing information is returned to the business module based on the target interface copy, or a preset fault handling process is executed based on the degradation processing control information. This embodiment first performs storage access dependency verification on the link artifacts corresponding to the bootstrap program, ensuring that the hardware abstract interface access entry and associated call chain only participate in the subsequent interface acquisition process after meeting preset construction conditions. This reduces the impact of non-compliant storage access dependencies on interface access from the source. Based on this, the replica location information of the first and second interface replicas is determined according to read-only storage layout information, and corresponding segment access constraints are configured, enabling the interface acquisition process of the business module to execute according to the determined replica location and access constraints. When the business module initiates an interface acquisition request, the boundary verification information and content verification information of the first interface replica are first verified for integrity. If the verification result of the first replica does not meet the preset validity conditions, the integrity verification of the second interface replica is then performed, thus forming an interface replica validity determination and fallback access mechanism. Finally, the target interface replica is determined based on the verification results of the first and second replicas, and the hardware abstract interface pointing information is returned. Alternatively, if a valid interface replica cannot be determined, degradation processing control information is generated and a preset fault handling process is executed. This avoids unverified or abnormal interface replicas being directly returned to the business module, reducing the impact of a single abnormal interface replica on the interface acquisition process, and thereby improving the access reliability of the embedded bootstrap hardware abstract interface.

[0034] Based on the first embodiment described above, a second embodiment of the embedded bootloader hardware abstract interface access control method of this application is proposed. Please refer to... Figure 2 , Figure 2 This is a schematic diagram of a sub-process in the second embodiment of the embedded bootloader hardware abstract interface access control method of this application.

[0035] like Figure 2 As shown, in this embodiment, step S1 includes: S11: Parse the symbol information and link mapping information in the link artifact to determine the entry symbol, entry address and call relationship associated with the entry symbol corresponding to the hardware abstract interface access entry, and obtain the call chain description data corresponding to the hardware abstract interface access entry. S12: Based on the call chain description data, extract the storage access behavior in the hardware abstraction interface access entry and associated call chain, and determine the read access target, write access target and stack space occupancy representation information corresponding to the hardware abstraction interface access entry and associated call chain. S13: Based on the read access target, the write access target, and the stack space occupancy representation information, perform storage segment matching verification and stack space constraint verification on the hardware abstract interface access entry and associated call chain to obtain the access entry verification result.

[0036] It should be noted that the linking artifact refers to the result file formed after the bootloader is compiled and linked, which can be used to analyze the program structure. It typically reflects symbols, addresses, sections, and call relationships. Symbol information refers to the information in the linking artifact used to identify the names and addresses of functions, variables, or constant objects. Link mapping information refers to the information used to describe the distribution of each symbol in the storage space, its corresponding section, and address range. The hardware abstraction interface access point refers to the unified access function or entry point location used to obtain the hardware abstraction interface. The entry symbol refers to the function symbol corresponding to the access point in the linking artifact. The entry address refers to the actual link address of the access point in the program's storage space. Call relationships refer to the association between the access point and its directly or indirectly called functions. Call chain description data refers to the data used to characterize the access point and its related functions. Data on function paths, call levels, and access scope; storage access behavior, referring to storage resource-related behaviors such as reading, writing, and stack space usage occurring in the call chain; read access target, referring to the target address or target segment corresponding to the read operation performed by the call chain; write access target, referring to the target address or target segment corresponding to the write operation performed by the call chain; stack space occupancy representation information, referring to information used to represent the stack space usage of the access entry point and its call chain during runtime; storage segment matching verification, referring to the process of comparing the read access target and write access target with the preset allowed storage segments; stack space constraint verification, referring to the process of determining whether the stack space occupancy of the call chain meets the preset constraint conditions; access entry point verification result, referring to the judgment result obtained after completing the storage access dependency verification of the access entry point and its associated call chain.

[0037] Specifically, firstly, the link artifacts corresponding to the bootloader are parsed to extract the symbol information and link mapping information corresponding to the hardware abstraction interface access entry point, determining the entry symbol, entry address, and memory segment of the access entry point in the bootloader. Further, starting from this entry symbol, the process traces along the function reference relationships, inline auxiliary function relationships, or static call relationships reflected in the link artifacts to determine the range of associated functions that the hardware abstraction interface access entry point may involve when performing interface acquisition operations. The entry symbol, entry address, associated functions, call level, and corresponding segment information are then integrated to obtain the call chain description data corresponding to the hardware abstraction interface access entry point.

[0038] Subsequently, based on the call chain description data, the storage access behaviors in the hardware abstraction interface access entry and its associated call chain are extracted item by item. This determines the read access target pointed to by read operations, the write access target pointed to by write operations, and the stack space occupancy representation information involved in the call chain execution. After extraction, the read access target is matched with the allowed program segments or read-only data segments, and the write access target is matched with the allowed preset state record segments. Write access without a permitted source is marked as an exception. Simultaneously, the stack space occupancy representation information is compared with preset stack space constraints. Based on the storage segment matching verification results and the stack space constraint verification results, an access entry verification result is generated to characterize whether the hardware abstraction interface access entry and its associated call chain meet the storage access dependency requirements for subsequent construction and interface access control.

[0039] By first parsing the symbolic and linking information in the linker artifacts, the hardware abstraction interface (HAPI) access entry point and its associated call chain are determined. This expands the verification scope beyond a single entry function to cover the actual range of calls associated with the entry point when it acquires the interface. Subsequently, the read access target, write access target, and stack space occupancy representation information in the call chain are extracted, allowing for the explicit identification of storage access dependencies that affect the reliability of interface acquisition. Finally, storage segment matching and stack space constraint verification are performed based on the read access target, write access target, and stack space occupancy representation information to obtain the access entry point verification result. This allows for pre-determination of storage access dependencies of the HAPI access entry point and its associated call chain during the construction phase. This reduces the possibility of unexpected storage access dependencies or uncontrolled stack space occupancy at the access entry point affecting the subsequent interface acquisition process, thus providing a foundation for improving the access reliability of the embedded bootloader's HAPI.

[0040] Based on the first embodiment described above, in this embodiment, step S2 includes: S21: If the access entry verification result meets the preset construction conditions, the read-only storage layout information corresponding to the boot program is parsed to determine the first read-only storage segment and the second read-only storage segment used to store the hardware abstract interface copy. S22: Based on the first read-only storage segment and the second read-only storage segment, determine the storage address information, segment ownership information and replica correspondence of the first interface replica and the second interface replica respectively, and obtain the replica location information of the first interface replica and the second interface replica, wherein the first interface replica and the second interface replica are respectively associated with the hardware abstract interface pointing information, the structure identification information, the boundary verification information and the content verification information; S23: Based on the replica location information, configure access attributes for the first read-only storage segment and the second read-only storage segment, determine the read-only access constraints, execution restriction constraints and cache access constraints corresponding to the first interface replica and the second interface replica, and obtain the segment access constraints corresponding to the replica location information.

[0041] It should be noted that: Access entry verification result refers to the judgment result obtained after completing storage access dependency verification on the hardware abstract interface access entry and its associated call chain; preset construction conditions refer to the preset conditions that allow continued execution of interface replica layout and segment constraint configuration; read-only storage layout information refers to the information in the bootloader used to describe read-only storage segments, segment address ranges, and interface replica storage relationships; segment resolution refers to the process of identifying and dividing different storage segments in the read-only storage layout information; hardware abstract interface replica refers to the hardware abstract interface structure backup stored in the read-only storage area; the first read-only storage segment and the second read-only storage segment refer to the read-only storage areas used to store the first interface replica and the second interface replica, respectively; the first interface replica and the second interface replica refer to the hardware abstract interface structure replicas that serve as the primary access object and the alternative access object, respectively; storage address information refers to the specific storage location of the interface replica in the read-only storage area; segment ownership information refers to the read-only storage segment to which the interface replica belongs; replica correspondence refers to the relationship between the interface replica and its corresponding read-only storage segment. The document outlines the following information categories: the mapping between storage segments; replica location information (formed by storage address information, segment ownership information, and replica mapping); hardware abstract interface pointing information (pointing to the underlying hardware driver interface or driver function set); structure identification information (identifying the interface replica's structure type, version, or compatibility status); boundary verification information (determining the integrity of the interface replica's start and end boundaries); content verification information (determining whether the internal content of the interface replica has been altered or corrupted); access attribute configuration (setting constraints on the access methods of the storage segment containing the interface replica); read-only access constraints (restricting the segment containing the interface replica from being written to or modified); execution constraint constraints (restricting the segment containing the interface replica from being used as an instruction execution area); cache access constraints (restricting or regulating the cache read methods of the segment containing the interface replica); and segment access constraints (access control conditions formed for the read-only storage segment containing the interface replica).

[0042] Specifically, if the access entry verification result meets the preset construction conditions, it indicates that the hardware abstract interface access entry and its associated call chain have met the basic requirements for subsequent interface replica configuration. At this point, the read-only memory layout information corresponding to the bootloader is parsed into segments. Specifically, based on the segment name, segment address range, segment attributes, and interface replica placement relationship recorded in the read-only memory layout information, different read-only memory segments used to store hardware abstract interface replicas can be identified. The first read-only memory segment corresponding to the first interface replica and the second read-only memory segment corresponding to the second interface replica are then determined, ensuring that the two interface replicas have a distinguishable segment basis in their storage layout.

[0043] After determining the first and second read-only storage segments, the storage address information, segment ownership information, and replica correspondence of the first and second interface replicas within their respective read-only storage segments are determined. This information is then integrated into replica location information, enabling subsequent interface requests to locate either the first or second interface replica based on this information. The first and second interface replicas are associated with hardware abstraction interface pointing information, structure identification information, boundary verification information, and content verification information, respectively. This ensures that each interface replica not only provides the content pointed to by the hardware abstraction interface but also provides a data foundation for subsequent structure identification, boundary judgment, and content integrity judgment. Subsequently, based on the replica location information, access attributes are configured for the first and second read-only storage segments. Read-only access constraints, execution restriction constraints, and cache access constraints corresponding to the two interface replicas are determined, and these constraints serve as segment access constraints corresponding to the replica location information, limiting the segment access method when subsequently accessing the interface replicas.

[0044] Only after the access entry verification result meets the preset construction conditions is the read-only storage layout information parsed to determine the first and second read-only storage segments, ensuring that the interface replica configuration process is based on the access entry meeting the construction requirements. Subsequently, by determining the storage address information, segment ownership information, and replica correspondence of the first and second interface replicas, replica location information is formed, providing a clear location basis for the two interface replicas during subsequent access. Simultaneously, each interface replica is associated with hardware abstraction interface pointing information, structure identification information, boundary verification information, and content verification information, providing the necessary data foundation for subsequent interface return and integrity verification. Furthermore, based on the replica location information, read-only access constraints, execution restriction constraints, and cache access constraints are configured for the two read-only storage segments, ensuring that subsequent access to the interface replicas is restricted by the storage segment attributes. This reduces the impact of unclear interface replica location or uncontrolled storage segment access on the interface acquisition process, thereby helping to improve the access reliability of the embedded bootloader hardware abstraction interface.

[0045] This embodiment verifies the storage access dependency of the hardware abstract interface access entry and associated call chain based on the link artifact corresponding to the bootstrap program, obtaining the access entry verification result. If the access entry verification result meets the preset construction conditions, the replica location information corresponding to the first and second interface replicas is determined based on the read-only storage layout information corresponding to the bootstrap program. Corresponding segment access constraints are configured according to the replica location information. The first and second interface replicas respectively include hardware abstract interface pointing information, structure identification information, boundary verification information, and content verification information. In response to an interface acquisition request initiated by a business module, the first interface replica is accessed based on the replica location information and segment access constraints. The boundary verification information and content verification information in the first interface copy are used to perform integrity verification on the first interface copy to obtain the first copy verification result. If the first copy verification result does not meet the preset valid conditions, the second interface copy is accessed based on the copy location information and segment access constraints, and the second interface copy is used to perform integrity verification on the second interface copy based on the boundary verification information and content verification information in the second interface copy to obtain the second copy verification result. Based on the first copy verification result and the second copy verification result, the target interface copy is determined from the first interface copy and the second interface copy, or degradation processing control information is generated, and hardware abstract interface pointing information is returned to the business module based on the target interface copy, or a preset fault handling process is executed based on the degradation processing control information. This embodiment first performs storage access dependency verification on the link artifacts corresponding to the bootstrap program, ensuring that the hardware abstract interface access entry and associated call chain only participate in the subsequent interface acquisition process after meeting preset construction conditions. This reduces the impact of non-compliant storage access dependencies on interface access from the source. Based on this, the replica location information of the first and second interface replicas is determined according to read-only storage layout information, and corresponding segment access constraints are configured, enabling the interface acquisition process of the business module to execute according to the determined replica location and access constraints. When the business module initiates an interface acquisition request, the boundary verification information and content verification information of the first interface replica are first verified for integrity. If the verification result of the first replica does not meet the preset validity conditions, the integrity verification of the second interface replica is then performed, thus forming an interface replica validity determination and fallback access mechanism. Finally, the target interface replica is determined based on the verification results of the first and second replicas, and the hardware abstract interface pointing information is returned. Alternatively, if a valid interface replica cannot be determined, degradation processing control information is generated and a preset fault handling process is executed. This avoids unverified or abnormal interface replicas being directly returned to the business module, reducing the impact of a single abnormal interface replica on the interface acquisition process, and thereby improving the access reliability of the embedded bootstrap hardware abstract interface.

[0046] Based on the second embodiment described above, a third embodiment of the embedded bootloader hardware abstract interface access control method of this application is proposed. Please refer to... Figure 3 , Figure 3 This is a schematic diagram of a sub-process in the third embodiment of the embedded bootloader hardware abstract interface access control method of this application.

[0047] In this embodiment, step S3 includes: S31: In response to the interface acquisition request initiated by the business module, the hardware abstract interface access entry is called, and the storage address information and segment ownership information corresponding to the first interface replica are determined based on the replica location information; S32: Based on the storage address information, the segment ownership information, and the segment access constraints, the first interface copy is read and accessed, and the boundary verification information in the read first interface copy is matched and verified to obtain the first boundary verification result. S33: When the first boundary verification result meets the preset boundary conditions, generate comparison content verification information based on the hardware abstract interface pointing information and structure identification information in the first interface copy, and match and verify the comparison content verification information with the content verification information in the first interface copy to obtain the first copy verification result.

[0048] It should be noted that: Business module refers to the functional unit in the bootloader that needs to call underlying hardware functions; Interface acquisition request refers to the business module's request to obtain the hardware abstract interface; Hardware abstract interface access entry refers to the access function or entry point used to uniformly obtain the hardware abstract interface; Replica location information refers to the information used to determine the interface replica's storage address, segment affiliation, and replica correspondence; First interface replica refers to the hardware abstract interface structure replica that is accessed first during the interface acquisition process; Storage address information refers to the specific storage location of the first interface replica in the read-only storage area; Segment affiliation information refers to the read-only storage segment to which the first interface replica belongs; Segment access constraints refer to the read, write, execute, or cache access restrictions set on the segment where the first interface replica is located; Read access refers to the process of reading the content of the first interface replica from the corresponding read-only storage segment according to the replica location information; Boundary verification information refers to the information used to determine the origin of the first interface replica. The information includes: whether the start and end boundaries are complete; matching verification, which is the process of comparing the read verification information with preset verification conditions; the first boundary verification result, which is the result obtained after matching and verifying the boundary verification information of the first interface copy; preset boundary conditions, which are the conditions used to determine whether the boundary state of the first interface copy meets the requirements; hardware abstract interface pointing information, which is the information used to point to the underlying hardware driver interface or driver function set; structure identification information, which is the information used to identify the structure type, version or compatibility status of the first interface copy; content verification information to be compared, which is the verification information regenerated based on the read content of the first interface copy and used to compare with the preset content verification information; content verification information, which is the information preset in the first interface copy used to determine whether the copy content has been changed or damaged; and the first copy verification result, which is the integrity judgment result obtained after completing the boundary verification and content verification of the first interface copy.

[0049] Specifically, when a business module initiates an interface retrieval request, the hardware abstraction interface access entry responds to the request and enters the access process for the first interface replica. Specifically, it first determines the storage address and segment affiliation information corresponding to the first interface replica based on the replica location information, thus clarifying which read-only storage segment the first interface replica is located in and from which address it should be read. After determining the location of the first interface replica, it performs controlled reading of the replica based on segment access constraints, avoiding direct access to the interface replica outside of preset segment attributes. After reading the first interface replica, it prioritizes extracting the boundary verification information and matches this information with preset boundary conditions to determine whether the start and end positions of the first interface replica remain intact, thereby obtaining the first boundary verification result.

[0050] If the first boundary verification result meets the preset boundary conditions, it indicates that the structural boundary of the first interface copy has not shown any obvious anomalies. At this point, its internal content is further verified. Specifically, based on the hardware abstract interface pointing information and structural identification information read from the first interface copy, comparison content verification information is generated. This comparison content verification information is used to characterize the current content status of the first interface copy. Subsequently, the comparison content verification information is matched and verified with the pre-set content verification information in the first interface copy to determine whether the interface pointing content and structural identification content in the first interface copy are consistent with expectations. Based on the matching results of the content verification, a first copy verification result is formed, which is used to characterize whether the first interface copy meets the integrity requirements for subsequent use as a source of hardware abstract interfaces.

[0051] After the business module initiates an interface retrieval request, it does not directly return the hardware abstract interface pointing information in the first interface copy. Instead, it first determines the storage address information and segment ownership information of the first interface copy through the copy location information, and performs controlled reading of the first interface copy in combination with segment access constraints, so that the interface copy access process has clear positioning basis and access boundary. Subsequently, the structural boundary of the first interface copy is matched and verified using boundary verification information. After the boundary meets the preset conditions, the content verification information to be compared is generated based on the hardware abstract interface pointing information and structural identification information, and matched and verified with the content verification information. This reduces the possibility that the first interface copy is directly used as a valid interface source when the boundary or content is abnormal, and provides a reliable basis for determining the interface access path based on the verification result of the first copy, thereby helping to improve the access reliability of the embedded bootloader hardware abstract interface.

[0052] Based on the second embodiment described above, in this embodiment, step S4 includes: S41: If the first copy verification result does not meet the preset valid conditions, generate copy rollback trigger information based on the first copy verification result, and determine the storage address information and segment ownership information corresponding to the second interface copy according to the copy rollback trigger information and the copy location information; S42: Based on the storage address information, segment ownership information and segment access constraints corresponding to the second interface replica, the second interface replica is read and accessed, and the boundary verification information in the read second interface replica is matched and verified to obtain the second boundary verification result; S43: If the second boundary verification result meets the preset boundary conditions, generate alternative comparison content verification information based on the hardware abstract interface pointing information and structure identification information in the second interface copy, and match and verify the alternative comparison content verification information with the content verification information in the second interface copy to obtain the second copy verification result.

[0053] It should be noted that: the first copy verification result refers to the integrity judgment result obtained after performing boundary and content verification on the first interface copy; the preset validity condition refers to the preset conditions used to determine whether the interface copy can serve as a valid source of the hardware abstract interface; the copy rollback trigger information refers to the control information generated when the first copy verification result does not meet the preset validity condition, used to trigger access to the second interface copy; the copy location information refers to the information used to determine the storage address, segment affiliation, and copy correspondence between the first and second interface copies; the second interface copy refers to the hardware abstract interface structure copy that serves as a backup access object when the first interface copy is unavailable; the storage address information refers to the specific storage location of the second interface copy in the read-only storage area; the segment affiliation information refers to the read-only storage segment to which the second interface copy belongs; the segment access constraint refers to the read, write, execute, or cache access restrictions set on the storage segment where the interface copy is located; and read access refers to reading the content of the second interface copy from the corresponding read-only storage segment according to the copy location information. The process includes: boundary verification information (used to determine whether the start and end boundaries of the second interface copy are complete); matching verification (the process of comparing the read verification information with preset conditions or pre-set verification information); second boundary verification result (the result obtained after matching and verifying the boundary verification information of the second interface copy); preset boundary conditions (the conditions used to determine whether the boundary state of the interface copy meets the requirements); hardware abstract interface pointing information (the information used to point to the underlying hardware driver interface or driver function set); structure identification information (the information used to identify the structure type, version, or compatibility status of the second interface copy); alternative comparison content verification information (the verification information regenerated based on the read content of the second interface copy and used to compare with the pre-set content verification information in the second interface copy); content verification information (the information pre-set in the second interface copy to determine whether the copy content has been changed or damaged); and second copy verification result (the integrity judgment result obtained after completing boundary verification and content verification of the second interface copy).

[0054] Specifically, if the first copy verification result does not meet the preset valid conditions, it indicates that the first interface copy is currently unsuitable as a valid source of the hardware abstraction interface. In this case, copy rollback trigger information is generated based on the first copy verification result to switch the interface acquisition process from the first interface copy to the second interface copy. Subsequently, based on the copy rollback trigger information and copy location information, the storage address information and segment ownership information corresponding to the second interface copy are determined to clarify the specific location of the second interface copy in the read-only storage layout and its corresponding segment. This ensures that subsequent read access can be performed according to the pre-determined copy correspondence, rather than temporarily searching for interface content without a location basis.

[0055] After determining the storage address information and segment ownership information of the second interface replica, the second interface replica is read and accessed in conjunction with segment access constraints. The boundary verification information read from the second interface replica is then matched and verified to determine whether the start and end boundaries of the second interface replica meet preset boundary conditions, thus obtaining the second boundary verification result. If the second boundary verification result meets the preset boundary conditions, candidate comparison content verification information is further generated based on the hardware abstract interface pointing information and structural identification information in the second interface replica. This candidate comparison content verification information is then matched and verified with the content verification information in the second interface replica to determine whether the internal content of the second interface replica remains intact, ultimately obtaining the second replica verification result.

[0056] When the first copy verification result does not meet the preset valid conditions, a copy rollback trigger message can be generated based on the first copy verification result. Combined with the copy location information, the storage address information and segment ownership information of the second interface copy are determined, ensuring that the interface acquisition process still has a clear alternative access path even when the first interface copy is abnormal. Subsequently, controlled reading is performed based on the storage address information, segment ownership information, and segment access constraints of the second interface copy. The boundary verification information and content verification information of the second interface copy are then matched and verified sequentially, ensuring that the second interface copy also undergoes boundary integrity and content integrity checks before being used as an alternative interface source. This reduces the possibility of hardware abstraction interface acquisition failure or the continued use of abnormal interface content due to the first interface copy's abnormality, thereby helping to improve the access reliability of the embedded bootloader's hardware abstraction interface.

[0057] In this embodiment, step S5 includes: S51: Perform validity determination on the first replica verification result and the second replica verification result to obtain replica validity determination result, and determine the availability status of the first interface replica and the second interface replica based on the replica validity determination result; S52: If the availability status indicates that the first interface copy or the second interface copy meets the preset valid conditions, the interface copy that meets the preset valid conditions is determined as the target interface copy; if the availability status indicates that neither the first interface copy nor the second interface copy meets the preset valid conditions, the degradation processing control information is generated. S53: Based on the target interface copy, extract the hardware abstract interface pointing information in the target interface copy and return the hardware abstract interface pointing information to the business module; or based on the degradation processing control information, call the preset fault output path and reset control path that do not depend on the hardware abstract interface to execute the preset fault processing process.

[0058] It should be noted that: the first copy verification result refers to the validity judgment result obtained after verifying the integrity of the first interface copy; the second copy verification result refers to the validity judgment result obtained after verifying the integrity of the second interface copy; validity determination refers to the process of determining whether an interface copy meets the requirements of being a source of a hardware abstract interface based on the copy verification result; the copy validity determination result refers to the comprehensive determination result obtained after determining the validity of the first and second interface copies; availability status refers to the status of whether the first and second interface copies can be used to return information pointed to by the hardware abstract interface; preset validity conditions refer to the preset conditions used to determine whether an interface copy is complete, accessible, and can be used as an interface source; the target interface copy refers to the copy determined from the first and second interface copies. The system includes: interface copies used to provide hardware abstraction interface pointers to business modules; degradation processing control information, which refers to control information generated when neither the first nor the second interface copy meets the preset valid conditions, used to control subsequent fault handling; hardware abstraction interface pointer information, which refers to information used to point to the underlying hardware driver interface or driver function set; business module, which refers to the functional unit in the bootloader that needs to call the underlying hardware function through the hardware abstraction interface; preset fault output path, which refers to the preset processing path used to output fault information when the hardware abstraction interface cannot be used; reset control path, which refers to the processing path used to trigger system reset or restart control during fault handling; and preset fault handling process, which refers to the processing process that performs fault output, reset control, and other operations based on the degradation processing control information.

[0059] Specifically, after obtaining the first and second copy verification results, their validity is first determined to see if they meet preset validity conditions, thus forming a copy validity determination result. Based on this result, the availability status of the first and second interface copies is further determined. For example, if the first copy verification result indicates that the first interface copy meets the preset validity conditions, the first interface copy can be determined as available; if the first copy verification result does not meet the preset validity conditions but the second copy verification result does, the second interface copy can be determined as available; if neither the first nor the second copy verification result meets the preset validity conditions, then both the first and second interface copies are determined to be unavailable.

[0060] If either the first or second interface replica meets the preset validity conditions, the interface replica that meets the preset validity conditions is identified as the target interface replica. Hardware abstract interface pointing information is extracted from the target interface replica and returned to the business module, enabling the business module to continue hardware access based on the valid interface source. Conversely, if neither the first nor the second interface replica meets the preset validity conditions, hardware abstract interface pointing information is no longer returned from either interface replica. Instead, degradation processing control information is generated, and based on this degradation processing control information, preset fault output paths and reset control paths that do not depend on the hardware abstract interface are invoked to execute preset fault handling procedures.

[0061] By validating the results of the first and second copy verifications, the availability status of the first and second interface copies can be clearly defined. This ensures that the determination of the target interface copy no longer depends on the default copy order or fixed address, but rather on the actual verification results. When at least one interface copy meets the preset validity conditions, the interface copy that meets the conditions is identified as the target interface copy, and its hardware abstract interface pointing information is returned to the business module, reducing the possibility of abnormal interface copies being returned to the business module. When neither interface copy meets the preset validity conditions, degradation processing control information is generated, and preset fault output paths and reset control paths that do not depend on the hardware abstract interface are invoked, preventing the continued execution of unreliable interface accesses when there are no valid interface copies. This makes the return process of the hardware abstract interface constrained by the copy verification results and forms a clear fault handling path when both copies are unavailable, thereby helping to improve the access reliability of the embedded bootloader's hardware abstract interface.

[0062] This embodiment verifies the storage access dependency of the hardware abstract interface access entry and associated call chain based on the link artifact corresponding to the bootstrap program, obtaining the access entry verification result. If the access entry verification result meets the preset construction conditions, the replica location information corresponding to the first and second interface replicas is determined based on the read-only storage layout information corresponding to the bootstrap program. Corresponding segment access constraints are configured according to the replica location information. The first and second interface replicas respectively include hardware abstract interface pointing information, structure identification information, boundary verification information, and content verification information. In response to an interface acquisition request initiated by a business module, the first interface replica is accessed based on the replica location information and segment access constraints. The boundary verification information and content verification information in the first interface copy are used to perform integrity verification on the first interface copy to obtain the first copy verification result. If the first copy verification result does not meet the preset valid conditions, the second interface copy is accessed based on the copy location information and segment access constraints, and the second interface copy is used to perform integrity verification on the second interface copy based on the boundary verification information and content verification information in the second interface copy to obtain the second copy verification result. Based on the first copy verification result and the second copy verification result, the target interface copy is determined from the first interface copy and the second interface copy, or degradation processing control information is generated, and hardware abstract interface pointing information is returned to the business module based on the target interface copy, or a preset fault handling process is executed based on the degradation processing control information. This embodiment first performs storage access dependency verification on the link artifacts corresponding to the bootstrap program, ensuring that the hardware abstract interface access entry and associated call chain only participate in the subsequent interface acquisition process after meeting preset construction conditions. This reduces the impact of non-compliant storage access dependencies on interface access from the source. Based on this, the replica location information of the first and second interface replicas is determined according to read-only storage layout information, and corresponding segment access constraints are configured, enabling the interface acquisition process of the business module to execute according to the determined replica location and access constraints. When the business module initiates an interface acquisition request, the boundary verification information and content verification information of the first interface replica are first verified for integrity. If the verification result of the first replica does not meet the preset validity conditions, the integrity verification of the second interface replica is then performed, thus forming an interface replica validity determination and fallback access mechanism. Finally, the target interface replica is determined based on the verification results of the first and second replicas, and the hardware abstract interface pointing information is returned. Alternatively, if a valid interface replica cannot be determined, degradation processing control information is generated and a preset fault handling process is executed. This avoids unverified or abnormal interface replicas being directly returned to the business module, reducing the impact of a single abnormal interface replica on the interface acquisition process, and thereby improving the access reliability of the embedded bootstrap hardware abstract interface.

[0063] In one embodiment, the embedded bootloader hardware abstraction interface access control method of this application is used in the GD32H737IMT6 microcontroller (Cortex-A1c). The M7, 400 MHz, with built-in 3840 KB Flash and 832 KB AXISRAM, operates in environments with strong electromagnetic interference (high-power IGBT switches and contactor operation). Specific implementation details include: Define two sets of `const bl_hal_t hal_if_a` and `const bl_hal_t hal_if_b` at the product layer, with identical initialization content; specify the segment attributes `.hal_primary` and `.hal_backup` through the linker script, so that they fall into different Flash sectors respectively.

[0064] Implement the bl_hal_get access function in the HAL aggregation layer, and only reference the two constant symbol addresses mentioned above in the function body; use compilation options such as -fno-instrument-functions and -fno-stack-protector to avoid implicit SRAM references.

[0065] Configure RO + XN + Non for the two HAL segments in the MPU initialization code. The Cacheable attribute.

[0066] Add a linker check to the build script (Python), traverse the ELF call chain, output a hal_link_proof.txt report, and interrupt the build if it fails.

[0067] During startup, the bootloader's main process calls the replica consistency scan function before HAL initialization, and if necessary, rewrites damaged replicas from the factory image partition.

[0068] The degradation path uses the simplest polling UART to output a fixed fault code 0xFAULT_HAL_DEAD and trigger NVIC_SystemReset.

[0069] This application also provides an embedded bootloader hardware abstraction interface access control device. Please refer to... Figure 4 , Figure 4 This is a schematic diagram of the module structure of the embedded bootloader hardware abstraction interface access control device according to an embodiment of this application. The embedded bootloader hardware abstraction interface access control device includes: The dependency verification module 401 is used to perform storage access dependency verification on the hardware abstraction interface access entry and associated call chain based on the link artifacts corresponding to the bootstrap program, and obtain the access entry verification result. The constraint configuration module 402 is used to determine the replica location information corresponding to the first interface replica and the second interface replica based on the read-only storage layout information corresponding to the bootstrap program when the access entry verification result meets the preset construction conditions, and to configure the corresponding segment access constraints according to the replica location information. The first interface replica and the second interface replica respectively include hardware abstract interface pointing information, structure identification information, boundary verification information and content verification information. The first verification module 403 is used to respond to the interface acquisition request initiated by the business module, access the first interface copy based on the copy location information and the segment access constraint, and perform integrity verification on the first interface copy according to the boundary verification information and content verification information in the first interface copy to obtain the first copy verification result. The second verification module 404 is used to access the second interface copy based on the copy location information and the segment access constraint when the first copy verification result does not meet the preset valid conditions, and to perform integrity verification on the second interface copy according to the boundary verification information and content verification information in the second interface copy to obtain the second copy verification result. The target processing module 405 is used to determine a target interface copy from the first interface copy and the second interface copy based on the first copy verification result and the second copy verification result, or generate degradation processing control information and return the hardware abstract interface pointing information to the business module based on the target interface copy, or execute a preset fault handling process based on the degradation processing control information.

[0070] The embedded bootloader hardware abstraction interface access control device provided in this application adopts the embedded bootloader hardware abstraction interface access control method in the above embodiments, and can solve the technical problem of how to improve the access reliability of the embedded bootloader hardware abstraction interface. Compared with the prior art, the beneficial effects of the embedded bootloader hardware abstraction interface access control device provided in this application are the same as the beneficial effects of the embedded bootloader hardware abstraction interface access control method provided in the above embodiments, and other technical features in the embedded bootloader hardware abstraction interface access control device are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.

[0071] This application provides an embedded bootloader hardware abstraction interface access control device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the embedded bootloader hardware abstraction interface access control method in the above embodiments.

[0072] The following is for reference. Figure 5 , Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the embedded bootloader hardware abstract interface access control method in the embodiments of this application. It shows a schematic diagram of the structure of the embedded bootloader hardware abstract interface access control device suitable for implementing the embodiments of this application. Figure 5 The embedded bootloader hardware abstract interface access control device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0073] like Figure 5 As shown, the embedded bootloader hardware abstraction interface access control device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the embedded bootloader hardware abstraction interface access control device. The processing device 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the embedded bootloader hardware abstraction interface access control device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows embedded bootloader hardware abstraction interface access control devices with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0074] In particular, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. When the computer program is executed by the processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0075] The embedded bootloader hardware abstract interface access control device provided in this application, employing the embedded bootloader hardware abstract interface access control method in the above embodiments, can solve the technical problem of how to improve the access reliability of the embedded bootloader hardware abstract interface. Compared with the prior art, the beneficial effects of the embedded bootloader hardware abstract interface access control device provided in this application are the same as the beneficial effects of the embedded bootloader hardware abstract interface access control method provided in the above embodiments, and other technical features in this embedded bootloader hardware abstract interface access control device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0076] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0077] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0078] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the embedded bootloader hardware abstraction interface access control method in the above embodiments.

[0079] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the embedded bootloader hardware abstract interface access control device, the embedded bootloader hardware abstract interface access control device performs the following actions: based on the link artifact corresponding to the bootloader, it performs storage access dependency verification on the hardware abstract interface access entry and associated call chain to obtain the access entry verification result; if the access entry verification result meets the preset construction conditions, it determines the replica location information corresponding to the first interface replica and the second interface replica based on the read-only storage layout information corresponding to the bootloader, and configures the corresponding segment access constraints according to the replica location information. The first interface replica and the second interface replica respectively include hardware abstract interface pointing information, structure identification information, boundary verification information, and content verification information; in response to the interface access initiated by the business module... Upon receiving a request, the system accesses a first interface copy based on copy location information and segment access constraints, and performs integrity verification on the first interface copy according to boundary verification information and content verification information in the first interface copy, obtaining a first copy verification result. If the first copy verification result does not meet preset valid conditions, the system accesses a second interface copy based on copy location information and segment access constraints, and performs integrity verification on the second interface copy according to boundary verification information and content verification information in the second interface copy, obtaining a second copy verification result. Based on the first and second copy verification results, the system determines a target interface copy from the first and second interface copies, or generates degradation processing control information, and returns hardware abstract interface pointing information to the business module based on the target interface copy, or executes a preset fault handling process based on the degradation processing control information. Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0080] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0081] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0082] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described embedded bootloader hardware abstraction interface access control method, thereby solving the technical problem of how to improve the access reliability of the embedded bootloader hardware abstraction interface. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the embedded bootloader hardware abstraction interface access control method provided in the above embodiments, and will not be repeated here.

[0083] This application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the embedded bootloader hardware abstract interface access control method described above.

[0084] The computer program product provided in this application solves the technical problem of how to improve the access reliability of the embedded bootloader hardware abstraction interface. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the embedded bootloader hardware abstraction interface access control method provided in the above embodiments, and will not be repeated here.

[0085] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.

Claims

1. An embedded bootloader hardware abstraction interface access control method, characterized in that, The method includes: Based on the link artifacts corresponding to the bootstrap program, storage access dependency verification is performed on the hardware abstraction interface access entry and associated call chain to obtain the access entry verification result. If the access entry verification result meets the preset construction conditions, based on the read-only storage layout information corresponding to the bootstrap program, determine the copy location information corresponding to the first interface copy and the second interface copy, and configure the corresponding segment access constraints according to the copy location information. The first interface copy and the second interface copy respectively include hardware abstract interface pointing information, structure identification information, boundary verification information and content verification information. In response to an interface retrieval request initiated by a business module, the first interface replica is accessed based on the replica location information and the segment access constraints, and the integrity of the first interface replica is verified according to the boundary verification information and content verification information in the first interface replica to obtain the first replica verification result. If the first copy verification result does not meet the preset valid conditions, the second interface copy is accessed based on the copy location information and the segment access constraint, and the integrity of the second interface copy is verified according to the boundary verification information and content verification information in the second interface copy to obtain the second copy verification result. Based on the verification results of the first and second replicas, a target interface replica is determined from the first and second interface replicas, or degradation processing control information is generated, and the hardware abstract interface pointing information is returned to the business module based on the target interface replica, or a preset fault handling process is executed based on the degradation processing control information.

2. The method as described in claim 1, characterized in that, The step of performing storage access dependency verification on the hardware abstraction interface access entry and associated call chain based on the link artifact corresponding to the bootstrap program, and obtaining the access entry verification result, includes: The symbol information and link mapping information in the link artifacts are parsed to determine the entry symbol, entry address and call relationship associated with the entry symbol corresponding to the hardware abstract interface access entry, and to obtain the call chain description data corresponding to the hardware abstract interface access entry. Based on the call chain description data, the storage access behavior in the hardware abstraction interface access entry and associated call chain is extracted to determine the read access target, write access target and stack space occupancy representation information corresponding to the hardware abstraction interface access entry and associated call chain. Based on the read access target, the write access target, and the stack space occupancy representation information, the hardware abstract interface access entry and associated call chain are subjected to storage segment matching verification and stack space constraint verification to obtain the access entry verification result.

3. The method as described in claim 1, characterized in that, The step of determining the replica location information corresponding to the first interface replica and the second interface replica based on the read-only storage layout information corresponding to the bootstrap program, and configuring the corresponding segment access constraints according to the replica location information, when the access entry verification result meets the preset construction conditions, includes: If the access entry verification result meets the preset construction conditions, the read-only storage layout information corresponding to the boot program is parsed to determine the first read-only storage segment and the second read-only storage segment used to store the hardware abstract interface copy. Based on the first read-only storage segment and the second read-only storage segment, the storage address information, segment ownership information and replica correspondence corresponding to the first interface replica and the second interface replica are determined respectively, and the replica location information corresponding to the first interface replica and the second interface replica is obtained. The first interface replica and the second interface replica are respectively associated with the hardware abstract interface pointing information, the structure identification information, the boundary verification information and the content verification information. Based on the replica location information, access attributes are configured for the first read-only storage segment and the second read-only storage segment to determine the read-only access constraints, execution restriction constraints, and cache access constraints corresponding to the first interface replica and the second interface replica, thereby obtaining the segment access constraints corresponding to the replica location information.

4. The method as described in claim 1, characterized in that, The steps of responding to an interface retrieval request initiated by a business module, accessing the first interface replica based on the replica location information and the segment access constraints, and performing integrity verification on the first interface replica according to the boundary verification information and content verification information in the first interface replica to obtain the first replica verification result include: In response to the interface acquisition request initiated by the business module, the hardware abstract interface access entry is invoked, and the storage address information and segment ownership information corresponding to the first interface replica are determined based on the replica location information; Based on the storage address information, the segment ownership information, and the segment access constraints, the first interface copy is read and accessed, and the boundary verification information in the read first interface copy is matched and verified to obtain the first boundary verification result. If the first boundary verification result meets the preset boundary conditions, the content verification information to be compared is generated based on the hardware abstract interface pointing information and structure identification information in the first interface copy, and the content verification information to be compared is matched and verified with the content verification information in the first interface copy to obtain the first copy verification result.

5. The method as described in claim 1, characterized in that, The step of accessing the second interface replica based on the replica location information and the segment access constraint when the first replica verification result does not meet the preset valid conditions, and performing integrity verification on the second interface replica according to the boundary verification information and content verification information in the second interface replica to obtain the second replica verification result includes: If the first copy verification result does not meet the preset valid conditions, a copy rollback trigger information is generated based on the first copy verification result, and the storage address information and segment ownership information corresponding to the second interface copy are determined according to the copy rollback trigger information and the copy location information. Based on the storage address information, segment ownership information and segment access constraints corresponding to the second interface replica, the second interface replica is read and accessed, and the boundary verification information in the read second interface replica is matched and verified to obtain the second boundary verification result. If the second boundary verification result meets the preset boundary conditions, candidate comparison content verification information is generated based on the hardware abstract interface pointing information and structure identification information in the second interface copy, and the candidate comparison content verification information is matched and verified with the content verification information in the second interface copy to obtain the second copy verification result.

6. The method as described in claim 1, characterized in that, The steps of determining a target interface replica from the first interface replica and the second interface replica based on the first replica verification result and the second replica verification result, or generating degradation processing control information, and returning the hardware abstract interface pointing information to the business module based on the target interface replica, or executing a preset fault handling process based on the degradation processing control information, include: The validity of the first replica verification result and the second replica verification result is determined to obtain the replica validity determination result, and the availability status of the first interface replica and the second interface replica is determined based on the replica validity determination result; If the availability status indicates that either the first interface copy or the second interface copy meets a preset valid condition, the interface copy that meets the preset valid condition is determined as the target interface copy; if the availability status indicates that neither the first interface copy nor the second interface copy meets the preset valid condition, the degradation processing control information is generated. Based on the target interface copy, extract the hardware abstract interface pointing information from the target interface copy and return the hardware abstract interface pointing information to the business module; or based on the degradation processing control information, call the preset fault output path and reset control path that do not depend on the hardware abstract interface to execute the preset fault handling process.

7. An embedded bootloader hardware abstraction interface access control device, characterized in that, The device includes: The dependency verification module is used to perform storage access dependency verification on the hardware abstraction interface access entry and associated call chain based on the link artifacts corresponding to the bootstrap program, and obtain the access entry verification result. The constraint configuration module is used to determine the replica location information corresponding to the first interface replica and the second interface replica based on the read-only storage layout information corresponding to the bootstrap program when the access entry verification result meets the preset construction conditions, and to configure the corresponding segment access constraints according to the replica location information. The first interface replica and the second interface replica respectively include hardware abstract interface pointing information, structure identification information, boundary verification information and content verification information. The first verification module is used to respond to the interface acquisition request initiated by the business module, access the first interface copy based on the copy location information and the segment access constraint, and perform integrity verification on the first interface copy according to the boundary verification information and content verification information in the first interface copy to obtain the first copy verification result. The second verification module is used to access the second interface copy based on the copy location information and the segment access constraint when the first copy verification result does not meet the preset valid conditions, and to perform integrity verification on the second interface copy according to the boundary verification information and content verification information in the second interface copy to obtain the second copy verification result. The target processing module is used to determine a target interface copy from the first interface copy and the second interface copy based on the first copy verification result and the second copy verification result, or generate degradation processing control information and return the hardware abstract interface pointing information to the business module based on the target interface copy, or execute a preset fault handling process based on the degradation processing control information.

8. A computer device, characterized in that, The device includes: a memory, a processor, and an embedded bootloader hardware abstract interface access control program stored in the memory and executable on the processor, the embedded bootloader hardware abstract interface access control program being configured to implement the steps of the embedded bootloader hardware abstract interface access control method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium stores an embedded bootloader hardware abstract interface access control program, which, when executed by a processor, implements the steps of the embedded bootloader hardware abstract interface access control method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the embedded bootloader hardware abstract interface access control method as described in any one of claims 1 to 6.