CN114706620A - Parameter configuration method and device and computer readable medium - Google Patents

Parameter configuration method and device and computer readable medium Download PDF

Info

Publication number
CN114706620A
CN114706620A CN202210177784.XA CN202210177784A CN114706620A CN 114706620 A CN114706620 A CN 114706620A CN 202210177784 A CN202210177784 A CN 202210177784A CN 114706620 A CN114706620 A CN 114706620A
Authority
CN
China
Prior art keywords
parameter
configuration
storage space
parameter area
initializing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210177784.XA
Other languages
Chinese (zh)
Inventor
纪大峣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Rockchip Electronics Co Ltd
Original Assignee
Rockchip Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rockchip Electronics Co Ltd filed Critical Rockchip Electronics Co Ltd
Priority to CN202210177784.XA priority Critical patent/CN114706620A/en
Publication of CN114706620A publication Critical patent/CN114706620A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a parameter configuration method and equipment and a computer readable medium, which are characterized in that configuration parameter partitions are added in an equipment partition table, storage spaces of parameter areas are reserved in the configuration parameter partitions, corresponding storage spaces are set according to the number of the parameter areas, and the storage spaces are initialized. The configuration parameters stored in each parameter area are stored in the corresponding storage space, so that the subsequent inquiry of different configuration parameters can be facilitated, and the initialization of the equipment is performed by using the configuration parameters in the storage space. Therefore, by setting the configuration parameter partition and performing initialization based on the stored configuration parameters, dynamic configuration of the parameters can be performed without modifying the firmware itself.

Description

Parameter configuration method and device and computer readable medium
Technical Field
The present invention relates to the field of embedded technologies, and in particular, to a parameter configuration method and apparatus, and a computer-readable medium.
Background
In the development process of embedded device products, different types of products are designed and developed aiming at products with the same main body structure. These different types of products only have some differences in peripheral accessories, such as touch panels and LCDs of different sizes. In addition, in the initial stage of system startup, the configuration of the relevant aspects such as LCD screen parameters, car backing and the like needs to be initialized according to the configuration of the user. When the system configuration is performed by using the configuration data, sometimes, because a kernel needs to be entered before the storage driver is loaded, the kernel accesses the screen parameters, so that the parameters configured in the storage driver of the device are unavailable.
For the above scenario, in the prior art, different types of firmware or firmware components are usually pre-compiled for different products, and after unpacking a compiled default firmware package, the firmware corresponding to the product is modified and replaced, and finally the firmware is repackaged for burning. However, the method directly modifies the firmware, damages the integrity of the firmware, cannot pass the safety verification of the firmware, and cannot ensure the validity and the safety of the firmware.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a parameter configuration method, a device and a computer readable medium, which can carry out dynamic configuration of parameters on the basis of not modifying firmware.
In one aspect of the invention, a parameter configuration method is provided. The method comprises the following steps: accessing a partition table of the equipment to read configuration parameter partitions set in the partition table; setting storage spaces corresponding to the parameter areas according to information associated with the parameter areas in the configuration parameter partitions; if the configuration parameters exist in each parameter area in the configuration parameter partition, storing the configuration parameters to the storage space corresponding to the parameter area; and initializing the equipment according to the configuration parameters in the storage space.
In another aspect of the invention, a parameter configuration apparatus is provided. The apparatus comprises a memory configured to store a computer program; and a processor configured to execute the computer program to perform the parameter configuration method described above.
In yet another aspect of the invention, a computer-readable medium is provided. The medium has stored thereon a computer program that is executed by a processor to implement the parameter configuration method described above.
The invention has the beneficial effects that: the method comprises the steps of adding configuration parameter partitions in an equipment partition table, reserving storage spaces of parameter areas in the configuration parameter partitions, setting corresponding storage spaces according to the number of the parameter areas, and initializing the storage spaces. The configuration parameters stored in each parameter area are stored in the corresponding storage space, so that the subsequent inquiry of different configuration parameters can be facilitated, and the initialization of the equipment is performed by using the configuration parameters in the storage space. Therefore, by setting the configuration parameter partition and performing initialization based on the stored configuration parameters, dynamic configuration of the parameters can be performed without modifying the firmware itself.
Drawings
FIG. 1 is a flow chart of a parameter configuration method according to an embodiment of the invention;
FIG. 2 is a flowchart illustrating specific steps of a parameter configuration method according to an embodiment of the present invention;
fig. 3 is a flowchart of performing corresponding dynamic parameter initialization on the peripheral device, the kernel and the user space according to the parameter configuration method in the embodiment of the present invention;
fig. 4 is a block diagram of a parameter configuration apparatus according to an embodiment of the present invention.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
In the prior art, when parameter configuration is performed on an embedded product, firmware needs to be pre-compiled first, and the pre-compiled firmware is modified and repackaged, but the validity and the security of the firmware cannot be guaranteed.
In order to solve at least the above technical problem, the present disclosure provides a parameter configuration method. According to the method and the device, the configuration parameter partitions are added in the device partition table, the storage space of each parameter area is reserved in the configuration parameter partitions, the corresponding storage space is set according to the number of the parameter areas, and the storage space is initialized. The configuration parameters stored in each parameter area are stored in the corresponding storage space, so that the subsequent inquiry of different configuration parameters can be facilitated, and the initialization of the equipment is performed by using the configuration parameters in the storage space. In this way, embodiments in accordance with the present disclosure enable dynamic configuration of parameters without modifying the firmware itself.
Hereinafter, technical solutions according to the present disclosure will be described with reference to specific embodiments and with reference to the accompanying drawings.
Fig. 1 is a flow chart illustrating a parameter configuration method 100 according to an embodiment of the present disclosure. Referring to fig. 1, the method 100 includes the following steps 102 to 108.
In step 102, a partition table of a device is accessed to read a configuration parameter partition set in the partition table. The configuration parameter partition is used for storing all configuration parameters which need to be used in the device initialization process. The configuration parameter partition may include header information and a plurality of parameter areas. In some embodiments, the method 100 may further include adding the configuration parameter partition in a device partition table.
In step 104, the storage space corresponding to the parameter area is set according to the information associated with each parameter area in the configuration parameter partition. In some embodiments, the corresponding storage space is set according to the number of the parameter areas, and all the storage spaces are initialized. In some embodiments, a parameter area is determined according to header information in the configuration parameter partition, a corresponding storage space is reserved according to the determined parameter area, the size of the storage space is greater than or equal to the size of the configuration parameter partition, and the content of all the storage spaces is initialized to 0x 00. In this way, a corresponding large enough memory space can be provided for each parameter area, which is convenient for subsequent inquiry of different configuration parameters.
In step 106, if there is a configuration parameter in each parameter area in the configuration parameter partition, storing the configuration parameter in the storage space corresponding to the parameter area. In some embodiments, if the header information parameter of the configuration parameter partition is the same as a preset parameter, it is determined whether data exists in each of the parameter areas, and if so, the data in the parameter areas is stored in the corresponding storage space. In some embodiments, when the data in the parameter area is stored in the corresponding storage space, the offset address of the parameter area is located first, when the data in the parameter area is an encrypted ciphertext, the data is decrypted to a plaintext in the temporary buffer area and then copied into the storage space, and when the data in the parameter area is not the encrypted ciphertext, the data in the parameter area is directly copied into the corresponding storage space. In this way, any type of configuration parameters can be adaptively stored.
In step 108, the device is initialized according to the configuration parameters in the storage space. In some embodiments, it is determined whether data in the storage space is initialization data, and if not, the device is initialized by using the configuration parameters in the storage space. In some embodiments, the parameter regions include a trusted context parameter region, an encrypted parameter region, and an unencrypted parameter region. In some embodiments, it is determined whether data in the first storage space corresponding to the trusted environment parameter area is initialization data, if so, the device is initialized using default parameters, otherwise, the device is initialized using configuration parameters in the first storage space corresponding to the trusted environment parameter area. And then, judging whether the data in the second storage space corresponding to the encryption parameter area or the third storage space corresponding to the non-encryption parameter area is initialization data, if so, indicating that the corresponding second storage space or the corresponding third storage space is not used, otherwise, indicating that the corresponding second storage space or the corresponding storage space is used. In this way, the device can be initialized adaptively, the use condition of the corresponding second storage space or the third storage space is marked, and resource waste caused by subsequent frequent query is avoided.
In some embodiments, when initializing the peripheral device driver of the device, if the configuration parameter required by the peripheral device driver is located in the encrypted parameter area or the unencrypted parameter area, when the corresponding second storage space or the third storage space is marked as used, the configuration parameter is read from the second storage space or the third storage space to initialize the peripheral device driver, and the address and the length of the second storage space or the third storage space are transmitted to the kernel. In this way, the initialization of the dynamic parameters can be performed for the peripheral.
In some embodiments, when initializing a device kernel, the device enters a mirror mode, if a configuration parameter required for kernel initialization is located in an encryption parameter area or a non-encryption parameter area, when the encryption parameter area or the non-encryption parameter area is available, a physical address space of a corresponding second storage space or a corresponding third storage space is mapped to a virtual address space, a configuration parameter in the virtual address space is obtained, and the kernel is initialized. In this way, the kernel can be initialized with dynamic parameters.
In some embodiments, when initializing the user space, if the header information parameter of the configuration parameter partition is the same as the preset parameter and the configuration parameter required for initializing the user space is located in the encryption parameter area, determining whether the data exists in the encryption parameter area, if so, locating the offset address of the encryption parameter area, reading the data in the encryption parameter area into a temporary buffer area, and initializing the user space according to the configuration parameter in the plaintext after decrypting the data in the temporary buffer area into the plaintext. If the head information parameter of the configuration parameter partition is the same as the preset parameter and the configuration parameter required by user space initialization is located in the non-encryption parameter area, judging whether the non-encryption parameter area contains data or not, if so, locating to the offset address of the non-encryption parameter area, and initializing the user space according to the data of the non-encryption parameter area. In this way, the initialization of dynamic parameters for the user space is enabled.
Hereinafter, an application scenario of the parameter configuration upgrade method according to the embodiment of the present invention will be described by way of example.
Fig. 2 is a flowchart illustrating a parameter configuration method according to an embodiment of the present invention, including the following steps 202 to 208.
In step 202, a configuration parameter partition is added to the device partition table for storing all configuration parameters that need to be used during device initialization. The configuration parameters are converted into a binary mirror image file which is written into the configuration parameter partition of the equipment through a burning tool before leaving the factory.
In some embodiments, the size of the binary image file corresponding to the configuration parameter is consistent with the size of the configuration parameter partition, and if the total size of all the configuration parameter information is smaller than the size of the configuration parameter partition in the process of generating the configuration file binary image file, 0x00 is filled at the end until the size of the entire binary image file is consistent with the size of the configuration parameter partition.
In addition, the binary image file corresponding to the configuration parameters includes 4 parts, which are fixed-size image header information, a trusted environment parameter area, an encrypted parameter area, and an unencrypted parameter area, respectively.
In some embodiments, the fixed-size mirrored header information includes a profile magic number, a trusted context parameter zone offset address, a trusted context parameter zone length, an encrypted parameter zone offset address, an encrypted parameter zone length, an unencrypted parameter zone offset address, an unencrypted parameter zone length, and so on.
The trusted environment parameter area stores the ciphertext of the configuration parameters required by the trusted environment operating system, the static TA and the dynamic TA, that is, all data in the area needs to be encrypted by using a built-in symmetric encryption algorithm and a key.
The encryption parameter area stores the boot program configuration parameters, the kernel space configuration parameters and the part of sensitive configuration parameters needing to be encrypted in the user space configuration parameters, and the configuration parameters are encrypted by using a built-in symmetric encryption algorithm and a key.
The non-encryption parameter area stores all configuration parameters except configuration parameters needing encryption in boot program configuration parameters, kernel space configuration parameters and user space configuration parameters.
In step 204, the device is started, and in the boot program starting, the partition table of the device is accessed first, and the starting address and the length of the configuration parameter partition are obtained; then, three storage spaces with at least the size of the parameter partition are reserved in the DDR memory of the device, and all the storage spaces are initialized to 0x 00. These three reserved memory spaces cannot be used for subsequent allocations. Step 204 includes the following steps 2042 to 2048.
In step 2042, the fixed-size header information of the configuration parameter partition is read, whether the magic number of the configuration file is consistent with the expected magic number is checked, and if not, step 206 is executed. If so, execution continues at step 2044.
In step 2044, the trusted environment parameter area offset address and the trusted environment parameter area length in the header information are read, if the trusted environment parameter area length is 0, step 206 is executed, otherwise, the trusted environment parameter area offset address of the configuration parameter partition is located, data of the trusted environment parameter area length is read to the temporary buffer area, the ciphertext in the temporary buffer area is decrypted by using a built-in symmetric encryption algorithm and a key, and finally the decrypted plaintext is copied to the reserved storage space 1.
In step 2046, the offset address of the encryption parameter area and the length of the encryption parameter area in the header information are read, if the length of the encryption parameter area is 0, step 2048 is executed, otherwise, the offset address of the encryption parameter area of the configuration parameter partition is located, data of the length of the encryption parameter area is read to a temporary buffer area, a ciphertext in the temporary buffer area is decrypted by using a built-in symmetric encryption algorithm and a key, and finally the decrypted plaintext is copied to the reserved storage space 2.
In step 2048, the unencrypted parameter area offset address and the unencrypted parameter area length in the header information are read, if the unencrypted parameter area length is not 0, the unencrypted parameter area offset address is located in the configuration parameter partition, and the data of the unencrypted parameter area length is read to the reserved storage space 3.
In step 206, the boot program is started to load the trusted operating system, whether all the reserved storage spaces 1 are 0x00 is checked in the trusted operating system, and if yes, the initialization of the trusted operating system, the secure peripheral and the available application is completed by using default parameters; otherwise, the expected configuration parameters are read from the reserved memory space 1 to complete the initialization of the trusted operating system, the secure peripheral and the available applications.
In step 208, the boot loader checks the reserved 2 and 3 memory spaces to see if all the data in the memory space is 0x00, if so, the memory space is marked as unused, otherwise, the memory space is marked as used.
Fig. 3 is a flowchart illustrating that the parameter configuration method performs corresponding dynamic parameter initialization in the peripheral device, the kernel, and the user space according to the embodiment of the present invention, and includes the following steps 302 to 306.
In step 302, the following steps 3022 and 3024 are included in initializing the corresponding module and peripheral driver of the boot loader.
In step 3022, if the configuration parameter is located in the encryption parameter area, the reserved storage space 2 is checked, and if the reserved storage space 2 is marked as used, the expected boot configuration parameter is read from the reserved storage space 2 to complete the initialization configuration, and the starting physical address and length of the reserved storage space 2 are simultaneously passed to the kernel (e.g., shared _ sec _ param _ addr and shared _ sec _ param _ len) through the command line parameters. If the reserved memory space 2 is marked as unused, the initialization of the corresponding module and the peripheral is completed using default parameters.
In step 3024, if the configuration parameters are located in the unencrypted parameter area, the reserved memory space 3 is checked, and if the reserved memory space 3 is marked as used, the expected boot configuration parameters are read from the reserved memory space 3 to complete the initialization configuration, and the starting physical address and length of the reserved memory space 3 are passed to the kernel (e.g., shared _ param _ addr and shared _ param _ len) via the command line parameters. If the reserved memory space 3 is marked as unused, the initialization of the corresponding module and peripheral is completed using default parameters.
In step 304, the following steps 3042 through 3046 are included in initializing the kemel-space subsystem and the driver.
In step 3042, the boot loader boots the device to enter the boot image, and first checks whether the command line parameters have the initial physical address and length of the reserved storage space 2, and if yes, obtains the corresponding initial physical address and length, and marks that the storage space 2 is available; and simultaneously checking whether the command line parameters have the starting physical address and the length of the reserved storage space 3, if so, acquiring the corresponding starting physical address and the length, and marking the availability of the storage space 3.
In step 3044, in the corresponding subsystem and device driver in the kernel space, if the configuration parameter is located in the encryption parameter area, check whether the reserved storage space 2 is available, if not, use the default configuration parameter to complete the initialization of the corresponding kernel subsystem or device driver, if available, first map the physical address space of the storage space 2 into a virtual address space (e.g., ioremap), obtain the corresponding configuration parameter by directly accessing the virtual address space and save it to a temporary variable, then remove the mapping (iounmap) of the virtual address space, and finally use the obtained configuration parameter to complete the initialization of the corresponding kernel subsystem or device driver.
In step 3046, in the corresponding subsystem and device driver in the kernel space, if the configuration parameter is located in the non-encrypted parameter area, check whether the reserved storage space 3 is available, if not, use the default configuration parameter to complete initialization of the subsystem or device driver corresponding to the kernel, if available, first map the physical address space of the storage space 3 into a virtual address space (e.g., ioremap), obtain the corresponding configuration parameter by directly accessing the virtual address space and save it to a temporary variable, then remove the mapping (iounmap) of the virtual address space, and finally use the obtained configuration parameter to complete initialization of the subsystem or device driver corresponding to the kernel.
After entering system user space, step 306, user space initialization is performed in the corresponding subsystem module and application that needs to use the configuration parameters, including the following steps 3062 through 3066.
In step 3062, access is made to the block device node of the configuration parameter partition, the header information of the fixed size of the configuration parameter partition is read, whether the magic number of the configuration file is consistent with the expected magic number or not is checked, if not, it is prompted that the configuration information is obtained erroneously, and the initialization of the user space system is completed by using the default parameter. If so, execution continues at step 3064.
In step 3064, in the subsystem module and application program corresponding to the user space, if the configuration parameter is located in the encryption parameter area, the offset address of the encryption parameter area and the length of the encryption parameter area in the header information are read, if the length of the encryption parameter area is 0, the corresponding initialization is completed by using the default parameter; otherwise, positioning to the offset address of the encryption parameter area of the configuration parameter partition, reading the data of the length of the encryption parameter area to a temporary buffer area, decrypting the ciphertext in the temporary buffer area by using a built-in symmetric encryption algorithm and a key, and storing the decrypted plaintext in the temporary buffer area 1. And finally, acquiring corresponding configuration parameters from the temporary buffer area 1 to complete corresponding initialization.
In step 3066, in the subsystem module and the application program corresponding to the user space, if the configuration parameter is located in the unencrypted parameter area, the unencrypted parameter area offset address and the unencrypted parameter area length in the header information are read, and if the unencrypted parameter area length is 0, the default parameter is used to complete the corresponding initialization; otherwise, the data is positioned at the offset address of the non-encryption parameter area of the configuration parameter partition, and the data of the length of the non-encryption parameter area is read to the temporary buffer area 2. Finally, the corresponding configuration parameters are obtained from the temporary buffer 2 to complete the corresponding initialization.
According to another aspect of the present invention, fig. 4 is a schematic diagram illustrating a parameter configuration apparatus 400 according to an embodiment of the present invention. Referring to fig. 4, the electronic device 400 comprises a memory 402, a processor 404 and a computer program stored on said memory and executable on the processor, said processor implementing the steps of the parameter configuration method as described above when executing said computer program.
According to yet another aspect of the invention, a computer-readable medium is provided. The computer readable medium has stored thereon a computer program which is executed by a processor to implement the parameter configuration method as described above.
In summary, the parameter configuration method, the device and the computer readable medium provided by the present invention add the configuration parameter partition in the device partition table, and reserve the header information and the storage space of the multiple parameter areas in the configuration parameter partition. And setting corresponding storage spaces according to the number of the parameter areas, and initializing the storage spaces. The size of the storage space is greater than or equal to the size of the configuration parameter partition, and the content of all the storage spaces is initialized to 0x00, so that a corresponding large enough memory space is provided for each parameter area, and subsequent queries of different configuration parameters are facilitated. When the head information parameter of the configuration parameter is the same as the preset parameter, the parameter stored in the parameter area can be stored in the corresponding storage space, so that the subsequent query of different configuration parameters can be facilitated. When the data in the storage space is not initialization data, the initialization of the device is performed using the configuration parameters in the storage space. The parameter area includes a trusted environment parameter area, an encrypted parameter area, and a non-encrypted parameter area, and when the configuration parameters are stored in the trusted environment parameter area, the configuration parameters are used to initialize the device. In addition, the method and the device can perform corresponding dynamic parameter initialization according to the peripheral equipment, the kernel and the user space, so that the flexibility and the universality of parameter configuration are higher. Therefore, by setting the configuration parameter partition and initializing based on the stored configuration parameters, the dynamic configuration of the parameters can be performed without modifying the firmware itself. The method and the device can access in a system user space or in the initial stage of a kernel space, support the parameter configuration of a trusted environment, simultaneously support the configuration of parameters with different security levels, and encrypt and store data with high security level to ensure the security of the data.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for configuring parameters, comprising:
accessing a partition table of the equipment to read configuration parameter partitions set in the partition table;
setting storage spaces corresponding to the parameter areas according to information associated with the parameter areas in the configuration parameter partitions;
if the configuration parameters exist in each parameter area in the configuration parameter partition, storing the configuration parameters to the storage space corresponding to the parameter area; and
and initializing the equipment according to the configuration parameters in the storage space.
2. The parameter configuration method according to claim 1, wherein setting the storage space corresponding to each parameter area according to the information associated with the parameter area in the configuration parameter partition comprises:
determining the parameter area according to the header information in the configuration parameter partition;
reserving a storage space corresponding to the parameter area according to the determined parameter area, wherein the size of the storage space is larger than or equal to that of the configuration parameter partition; and
initializing the storage space.
3. The parameter configuration method according to claim 1, wherein storing the configuration parameter in the storage space corresponding to the parameter area comprises:
reading data in the parameter area;
if the data is the encrypted ciphertext, reading the data into a temporary buffer area, decrypting the ciphertext in the temporary buffer area into a plaintext, and copying the plaintext into the storage space; and
and if the data is not the encrypted ciphertext, directly copying the data to the storage space.
4. The parameter configuration method according to claim 1, further comprising:
writing an image file of the configuration parameters into the configuration parameter partition,
wherein the image file includes header information and the parameter area, the header information including information associated with the parameter area, and the parameter area including a trusted context parameter area, an encrypted parameter area, and a non-encrypted parameter area.
5. The parameter configuration method according to claim 4, wherein initializing the device according to the configuration parameters in the storage space comprises:
judging whether the data in the first storage space corresponding to the trusted environment parameter area is initialization data, if so, initializing the equipment by using default parameters, and otherwise, initializing the equipment by using configuration parameters in the first storage space;
and judging whether the data in a second storage space corresponding to the encryption parameter area or a third storage space corresponding to the non-encryption parameter area is initialization data, if so, marking the second storage space or the third storage space as unused, otherwise, marking the second storage space or the third storage space as used.
6. The parameter configuration method of claim 5, wherein initializing the device according to the configuration parameters in the storage space comprises initializing a peripheral driver of the device, comprising:
if the configuration parameters required by starting the peripheral driver are located in the encryption parameter area, judging whether a mark of a second storage space corresponding to the encryption parameter area is used, if the mark is used, reading the configuration parameters from the second storage space to initialize the peripheral driver, transmitting the address and the length of the second storage space to the kernel, and if the mark is not used, initializing the peripheral driver by using default parameters;
if the configuration parameters required by starting the peripheral driver are located in the non-encryption parameter area, judging whether the mark of a third storage space corresponding to the non-encryption parameter area is used, if so, reading the configuration parameters from the third storage space to initialize the peripheral driver, transmitting the address and the length of the third storage space to the kernel, and if not, initializing the peripheral driver by using default parameters.
7. The method according to claim 5, wherein initializing the device according to the configuration parameters in the storage space comprises initializing a kernel of the device, and comprises:
judging whether a second storage space corresponding to the encryption parameter area or a third storage space corresponding to the non-encryption parameter area exists in the kernel or not, wherein if yes, the second storage space or the third storage space is available;
if the configuration parameters required by kernel initialization are located in the encryption parameter area, judging whether the encryption parameter area is available, if so, mapping the physical address space of the second storage space into a virtual address space, storing the configuration parameters in the virtual address space into a temporary variable, initializing the kernel, and if not, initializing the kernel by using default parameters;
if the configuration parameters required by kernel initialization are located in the non-encryption parameter area, judging whether the non-encryption parameter area is available, if so, mapping the physical address space of the third storage space into a virtual address space, storing the configuration parameters in the virtual address space into a temporary variable, initializing the kernel, and if not, initializing the kernel by using default parameters.
8. The method of claim 5, wherein initializing the device according to the configuration parameters in the storage space comprises initializing a user space of the device, comprising:
judging that the head information parameters in the configuration parameter partition are the same as preset parameters, and if the head information parameters are not the same as the preset parameters, initializing a user space by using default parameters;
if the data are the same and the configuration parameters required by user space initialization are located in the encryption parameter area, judging whether the encryption parameter area has data, if so, locating to the offset address of the encryption parameter area, reading the data in the encryption parameter area to a temporary buffer area, and initializing the user space according to the configuration parameters in the plaintext after decrypting the data in the temporary buffer area to the plaintext, otherwise, initializing the user space by using default parameters;
if the configuration parameters are the same and the configuration parameters required by user space initialization are located in the non-encryption parameter area, judging whether the non-encryption parameter area contains data, if so, locating to an offset address of the non-encryption parameter area, and initializing the user space according to the data of the non-encryption parameter area, otherwise, initializing the user space by using default parameters.
9. A parameter configuration device, comprising:
a memory configured to store a computer program; and
a processor configured to execute the computer program to perform the parameter configuration method according to any one of claims 1 to 8.
10. A computer-readable medium, on which a computer program is stored, the computer program being executable by a processor for implementing a parameter configuration method according to any one of claims 1 to 8.
CN202210177784.XA 2022-02-25 2022-02-25 Parameter configuration method and device and computer readable medium Pending CN114706620A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210177784.XA CN114706620A (en) 2022-02-25 2022-02-25 Parameter configuration method and device and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210177784.XA CN114706620A (en) 2022-02-25 2022-02-25 Parameter configuration method and device and computer readable medium

Publications (1)

Publication Number Publication Date
CN114706620A true CN114706620A (en) 2022-07-05

Family

ID=82167705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210177784.XA Pending CN114706620A (en) 2022-02-25 2022-02-25 Parameter configuration method and device and computer readable medium

Country Status (1)

Country Link
CN (1) CN114706620A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794393A (en) * 2015-04-24 2015-07-22 杭州字节信息技术有限公司 Embedded type partition image security certification and kernel trusted boot method and equipment thereof
CN110389790A (en) * 2019-07-22 2019-10-29 深圳创维汽车智能有限公司 Panoramic parking system calibration parameter acquisition methods, device, terminal and storage medium
CN113064604A (en) * 2021-03-18 2021-07-02 瑞芯微电子股份有限公司 Firmware upgrading method and device
CN113342425A (en) * 2021-08-06 2021-09-03 苏州浪潮智能科技有限公司 Starting method, device and storage medium of Linux embedded system
US11182171B1 (en) * 2020-10-06 2021-11-23 Dell Products L.P. Systems and methods for securely launching an embedded operating system using non-volatile memory namespace identifier mapping
CN113791812A (en) * 2021-08-02 2021-12-14 瑞芯微电子股份有限公司 Firmware upgrading method and storage equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794393A (en) * 2015-04-24 2015-07-22 杭州字节信息技术有限公司 Embedded type partition image security certification and kernel trusted boot method and equipment thereof
CN110389790A (en) * 2019-07-22 2019-10-29 深圳创维汽车智能有限公司 Panoramic parking system calibration parameter acquisition methods, device, terminal and storage medium
US11182171B1 (en) * 2020-10-06 2021-11-23 Dell Products L.P. Systems and methods for securely launching an embedded operating system using non-volatile memory namespace identifier mapping
CN113064604A (en) * 2021-03-18 2021-07-02 瑞芯微电子股份有限公司 Firmware upgrading method and device
CN113791812A (en) * 2021-08-02 2021-12-14 瑞芯微电子股份有限公司 Firmware upgrading method and storage equipment
CN113342425A (en) * 2021-08-06 2021-09-03 苏州浪潮智能科技有限公司 Starting method, device and storage medium of Linux embedded system

Similar Documents

Publication Publication Date Title
JP6893479B2 (en) Data processing device and method using ownership table
KR101477080B1 (en) Memory access security management
JP6913636B2 (en) Shared page
KR102435949B1 (en) Controlling access to pages in memory on computing devices
CN107690621B (en) Protected exception handling
JP6966333B2 (en) Safe initialization
CN108780425B (en) Protected pointer
JP6738354B2 (en) change address
US7127579B2 (en) Hardened extended firmware interface framework
RU2295834C2 (en) Initialization, maintenance, renewal and restoration of protected mode of operation of integrated system, using device for controlling access to data
CN109800050B (en) Memory management method, device, related equipment and system of virtual machine
US9037824B2 (en) Password accessible microelectronic memory
US8122514B2 (en) Software enhanced trusted platform module
JP4876053B2 (en) Trusted device integrated circuit
US5724551A (en) Method for managing I/O buffers in shared storage by structuring buffer table having entries include storage keys for controlling accesses to the buffers
US9189426B2 (en) Protected access to virtual memory
JP2004234053A (en) Computer system, computer device, data protection method for storage device, and program
CN110046495B (en) Data structure measurement comparison
JP5338435B2 (en) Information processing program, information processing apparatus, and information processing method
US20060085629A1 (en) Mapping a reset vector
CN112818327A (en) TrustZone-based user-level code and data security credibility protection method and device
US20080104711A1 (en) System and method for an isolated process to control address translation
US8972745B2 (en) Secure data handling in a computer system
US7389427B1 (en) Mechanism to secure computer output from software attack using isolated execution
CN114706620A (en) Parameter configuration method and device and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination