Parameter transmission method and device, electronic equipment and storage medium

By storing parameter data in memory, marking and analyzing data structure information, the problem of poor compatibility of the system kernel after firmware update is solved, supporting multiple parameter transmission methods is achieved, and stability and compatibility are improved .

CN119225827APending Publication Date: 2024-12-31LOONGSON TECH CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411274713.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

After the firmware update of electronic devices, multiple parameter transfer methods may be used to cause the system kernel to fail to receive parameters normally, resulting in poor compatibility problems.

Method used

The parameter transfer method tags are stored in memory, and the data structure information is determined based on the mark, the parameter data is parsed for use by the system kernel, and multiple parameter transfer methods are supported.

Benefits of technology

Improves the compatibility and operation stability of the system kernel to ensure that the system can run normally under different parameter transmission methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225827A_ABST
    Figure CN119225827A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a parameter transmission method and device, electronic equipment and a storage medium. The method comprises the steps that first parameter data transmitted to a system kernel is stored in a memory, and a first parameter transmission mode mark of the first parameter data is stored in a first preset storage space; obtaining a first parameter transmission mode mark from a first preset storage space, and determining corresponding first data structure information based on the first parameter transmission mode mark; and the system kernel analyzes the first parameter data based on the first data structure information to obtain the first parameter. According to the parameter transmission mode mark, the first parameter data needing to be transmitted to the system kernel can be analyzed in a proper mode to obtain the first parameter, so that the system kernel can support multiple parameter transmission modes, and the running stability and compatibility of the system kernel can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a parameter transfer method, device, electronic equipment and storage medium. Background Art

[0002] During the normal startup process of an electronic device, it is usually necessary to load firmware and operating system into its board. The firmware runs first, and then the system kernel is guided directly or indirectly to load the complete operating system to complete the startup of the electronic device. When booting the system kernel, some parameters need to be passed to the system kernel.

[0003] In the related art, there are multiple parameter passing methods for passing parameters to the system kernel. When writing the system kernel program, the corresponding parameter parsing and receiving methods are set according to the parameter passing method adopted by the board hardware it needs to run, so as to ensure the normal operation of the system kernel on the electronic device.

[0004] However, the firmware is usually burned into the corresponding Flash chip before leaving the factory. As time goes by and technology iterates, the firmware burned on the board may be updated, resulting in the same board using multiple different parameter transmission methods, which may easily cause the system kernel to fail to receive parameters normally, resulting in poor compatibility between the system kernel and the running device. Summary of the invention

[0005] In view of the above problems, an embodiment of the present invention is proposed to provide a parameter transfer method that overcomes the above problems or at least partially solves the above problems, which can improve the compatibility of the system kernel.

[0006] Correspondingly, an embodiment of the present invention further provides a parameter transfer device, an electronic device, and a storage medium to ensure the implementation and application of the above method.

[0007] In a first aspect, an embodiment of the present invention discloses a parameter transfer method, the method comprising:

[0008] Storing first parameter data transmitted to the system kernel in the memory, and storing a first parameter transmission mode mark of the first parameter data in the first preset storage space;

[0009] Acquire the first parameter transfer mode mark from the first preset storage space, and determine the corresponding first data structure information based on the first parameter transfer mode mark;

[0010] The first parameter data is parsed based on the first data structure information so that the system kernel obtains the first parameter.

[0011] Optionally, the storing in the memory the first parameter data transmitted to the system kernel, and storing in the first preset storage space a first parameter transmission mode mark of the first parameter data, includes:

[0012] The firmware of the electronic device is loaded, and the first parameter data is stored in the memory through the firmware, and the first parameter transmission mode mark is stored in the first preset storage space.

[0013] Optionally, the storing in the memory the first parameter data transmitted to the system kernel, and storing in the first preset storage space a first parameter transmission mode mark of the first parameter data, includes:

[0014] Load the firmware and boot boot of the electronic device, and pass the second parameter to the boot boot through the firmware, so that the boot boot stores the first parameter data in the memory and stores the first parameter transmission mode mark in the first preset storage space based on the second parameter.

[0015] Optionally, the passing of the second parameter to the boot loader through the firmware includes:

[0016] storing second parameter data in a memory by the firmware;

[0017] Acquire storage data in at least one second preset storage space of the memory;

[0018] Matching the stored data with standard data corresponding to the second preset storage space to obtain a matching result;

[0019] The corresponding second data structure information is determined based on the matching result, so that the boot guide parses the second parameter data based on the second data structure information, so that the boot guide obtains the second parameter.

[0020] Optionally, acquiring the first parameter transfer mode mark from the first preset storage space, and determining the corresponding first data structure information based on the first parameter transfer mode mark includes:

[0021] Load the system kernel, and obtain the first parameter passing method mark from the first preset storage space through the system kernel, so that the system kernel matches the first parameter passing method mark with a preset correspondence defined in the system kernel, and determines the first data structure information corresponding to the first parameter passing method mark; the preset correspondence includes a one-to-one correspondence between multiple parameter passing method marks and multiple data structure information.

[0022] Optionally, before parsing the first parameter data based on the first data structure information, the method further includes:

[0023] The system kernel is loaded, a first parameter pointer space is determined by the system kernel based on the first parameter transfer mode mark, the first parameter storage address is obtained from the first parameter pointer space, and the first parameter data is obtained from the memory based on the first parameter storage address.

[0024] Optionally, the method further comprises:

[0025] Based on the parameter data record structure corresponding to the target parameter transmission method natively supported by the system kernel, encapsulate the first parameter to obtain target parameter data;

[0026] The target parameter storage address of the target parameter data is stored in the target parameter pointer space corresponding to the target parameter passing method, so that the system kernel obtains the target parameter data based on the target parameter storage address obtained from the target parameter pointer space, and calls the first parameter therein based on the target parameter data.

[0027] In a second aspect, an embodiment of the present invention discloses a parameter transfer device, the device comprising:

[0028] A storage module, used for storing first parameter data transmitted to the system kernel in a memory, and storing a first parameter transmission mode mark of the first parameter data in a first preset storage space;

[0029] A first data structure information module, used to obtain the first parameter transmission mode mark from the first preset storage space, and determine the corresponding first data structure information based on the first parameter transmission mode mark;

[0030] The first parameter module is used to parse the first parameter data based on the first data structure information so that the system kernel obtains the first parameter.

[0031] Optionally, the storage module is also used to load firmware of the electronic device, and store the first parameter data in the memory and the first parameter transmission mode mark in the first preset storage space through the firmware.

[0032] Optionally, the storage module is also used to load the firmware and boot loader of the electronic device, and pass a second parameter to the boot loader through the firmware, so that the boot loader stores the first parameter data in the memory based on the second parameter and stores the first parameter transmission method mark in the first preset storage space.

[0033] Optionally, the storage module includes:

[0034] A second parameter data storage submodule, used for storing the second parameter data in the memory through the firmware;

[0035] A storage data submodule, used for acquiring storage data in at least one second preset storage space of the memory;

[0036] a matching submodule, configured to match the stored data with standard data corresponding to the second preset storage space to obtain a matching result;

[0037] The second parameter submodule is used to determine the corresponding second data structure information based on the matching result, so that the boot guide parses the second parameter data based on the second data structure information, so that the boot guide obtains the second parameter.

[0038] Optionally, the first data structure information module is also used to load the system kernel, and obtain the first parameter passing method mark from the first preset storage space through the system kernel, so that the system kernel matches the first parameter passing method mark with a preset correspondence defined in the system kernel, and determines the first data structure information corresponding to the first parameter passing method mark; the preset correspondence includes a one-to-one correspondence between multiple parameter passing method marks and multiple data structure information.

[0039] Optionally, the device further comprises:

[0040] A first parameter data acquisition module is used to load the system kernel, determine a first parameter pointer space based on the first parameter transfer mode mark through the system kernel, obtain the first parameter storage address from the first parameter pointer space, and obtain the first parameter data from the memory based on the first parameter storage address.

[0041] Optionally, the device further comprises:

[0042] A target parameter data module, used to encapsulate the first parameter based on the parameter data record structure corresponding to the target parameter transmission method natively supported by the system kernel, to obtain target parameter data;

[0043] A target parameter pointer space module is used to store the target parameter storage address of the target parameter data in the target parameter pointer space corresponding to the target parameter transmission method, so that the system kernel obtains the target parameter data based on the target parameter storage address obtained from the target parameter pointer space, and calls the first parameter therein based on the target parameter data.

[0044] In a third aspect, an embodiment of the present invention discloses a parameter transfer method, the method comprising:

[0045] The first parameter data passed to the system kernel is stored in the memory, and the first parameter transfer method mark of the first parameter data is stored in the first preset storage space, so that the system kernel obtains the first parameter transfer method mark from the first preset storage space, determines the corresponding first data structure information based on the first parameter transfer method mark, and parses the first parameter data based on the first data structure information, so that the system kernel obtains the first parameter.

[0046] In a fourth aspect, an embodiment of the present invention discloses a parameter transfer method, the method comprising:

[0047] Acquire first parameter data transmitted by the firmware or boot boot of the electronic device, and a first parameter transmission mode mark corresponding to the first parameter data; wherein the first parameter transmission mode mark is stored in a first preset storage space by the firmware or boot boot;

[0048] Determine the corresponding first data structure information based on the first parameter transfer mode mark;

[0049] The first parameter data is parsed based on the first data structure information to obtain a first parameter.

[0050] In a fifth aspect, an embodiment of the present invention discloses a parameter transmission system, the system comprising a parameter sender and a system kernel, the parameter sender comprising a firmware or a boot loader of an electronic device;

[0051] The parameter sender is used to store the first parameter data transmitted to the system kernel in the memory, and store the first parameter transmission mode mark of the first parameter data in the first preset storage space;

[0052] The system kernel is used to obtain the first parameter data and the first parameter transmission method mark from the first preset storage space, determine the corresponding first data structure information based on the first parameter transmission method mark, and parse the first parameter data based on the first data structure information to obtain the first parameter.

[0053] In the sixth aspect, an embodiment of the present invention discloses an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the steps of any parameter transfer method described above.

[0054] In a seventh aspect, an embodiment of the present invention discloses a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, any parameter passing method described in the embodiment of the present invention can be implemented.

[0055] In a seventh aspect, an embodiment of the present invention discloses a computer program product, including a computer program or instructions, which, when executed by a processor, implements any parameter passing method described in the embodiments of the present invention.

[0056] The parameter transfer method, device, electronic device and storage medium provided by the embodiments of the present invention have the following advantages:

[0057] When performing address conversion loading, the embodiment of the present invention stores the first parameter data to be transmitted to the system kernel in the memory, stores the first parameter transmission mode mark of the first parameter data in the first preset storage space; obtains the first parameter transmission mode mark from the first preset storage space, determines the corresponding first data structure information based on the first parameter transmission mode mark; and the system kernel parses the first parameter data based on the first data structure information to obtain the first parameter. The present invention can parse the first parameter data to be transmitted to the system kernel in an appropriate manner according to the parameter transmission mode mark to obtain the first parameter, thereby enabling the system kernel to support multiple parameter transmission modes, which helps to improve the operation stability and compatibility of the system kernel. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a flow chart of steps of an embodiment of a parameter transfer method of the present invention;

[0059] Figure 2 is a flow chart of steps of another parameter transfer method embodiment of the present invention;

[0060] Figure 3 It is a schematic diagram of a parameter transfer path of the present invention;

[0061] Figure 4 is a flow chart of steps of another parameter transfer method embodiment of the present invention;

[0062] Figure 5 is another parameter transfer path schematic diagram of the present invention;

[0063] Figure 6 It is a compatibility diagram of a boot loader of the present invention;

[0064] Figure 7 is a flow chart of steps of another parameter transfer method embodiment of the present invention;

[0065] Figure 8 is a flow chart of steps of another parameter transfer method embodiment of the present invention;

[0066] Fig. 9 is a structural block diagram of an embodiment of a parameter transfer device of the present invention;

[0067] Fig.10 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0068] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0069] The terms "first", "second", etc. in the specification and claims of the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable when appropriate, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, the term "and / or" in the specification and claims is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In the embodiments of the present invention, the term "multiple" refers to two or more, and other quantifiers are similar.

[0070] Figure 1 A flow chart showing a parameter transfer method embodiment of the present invention is shown, which is applied to electronic equipment. The method may include the following steps:

[0071] Step 101: store first parameter data transmitted to a system kernel in a memory, and store a first parameter transmission mode mark of the first parameter data in a first preset storage space.

[0072] When the electronic device is started, the board is usually powered on first. After the board is powered on, the firmware stored in the non-volatile memory such as ROM and EPROM in the board will be loaded first, and then the firmware will directly guide the system kernel to load the operating system, or indirectly guide the system kernel to load the operating system through the boot loader. The system kernel may include but is not limited to Linux Kernel, FreeBSD Kernel, OpenBSD Kernel, etc., and the embodiment of the present invention does not specifically limit it.

[0073] In order to correctly guide the system kernel to load the operating system, it is usually necessary to pass the first parameters to the system kernel (kernel), and these first parameters may include but are not limited to hardware description information, system configuration information, hardware configuration information, hardware status information, etc. When passing these first parameters, a certain parameter passing method is usually adopted to encapsulate and integrate these first parameters into first parameter data of a specific data structure, and store them in the memory, so that the system kernel can use these first parameters from the memory to complete the transfer of the first parameters to the system kernel, that is, the parameter items and parameter storage structures contained in the first parameter data stored in the memory using different parameter passing methods are different. Among them, the above-mentioned parameter passing method may include but is not limited to Flattened Device Tree (Flattened Device Tree, FDT), Advanced Configuration and Power Interface (Advanced Configuration and Power Interface, ACPI), etc., and the embodiment of the present invention does not make specific limitations.

[0074] Due to the diversity of parameter transmission methods, different versions of firmware and boot booters may use different parameter transmission methods to pass parameters to the system kernel, and different boards' firmware and boot booters may also use different parameter transmission methods to pass parameters to the system kernel. In order to enable the system kernel to correctly receive the first parameter transmitted by different parameter transmission methods and improve the compatibility of the system kernel, when storing the first parameter data in the memory, the first parameter transmission method mark of the first parameter data can be stored in the first preset storage space, that is, different data structure marks correspond to different parameter transmission methods, and the first parameter data stored in the memory using different parameter transmission methods have different data structure marks. Among them, the first preset storage space may include but is not limited to a specific memory space in the memory, a specific general-purpose register, etc., and the parameter transmission method mark can be flexibly set according to actual business needs, and the embodiment of the present invention does not make specific limitations.

[0075] Step 102: Obtain the first parameter transfer mode mark from the first preset storage space, and determine the corresponding first data structure information based on the first parameter transfer mode mark.

[0076] After storing the first parameter transfer mode mark in the first preset storage space, the system kernel can read the first preset storage space, obtain the first parameter transfer mode mark therein, and determine the first data structure information capable of parsing the first parameter data according to the first parameter transfer mode mark. The first data structure information may include the corresponding relationship between the parameter type of the first parameter and the offset address of the first parameter in the first parameter data; the first data structure information may also include the corresponding relationship between the parameter type of the first parameter and the parameter identification information of the first parameter in the first parameter data, which is not specifically limited in the embodiment of the present invention.

[0077] It should be noted that the above-mentioned first parameter passing method mark can be read directly from the first preset storage space by the system kernel program, and its corresponding first data structure information can be determined; the above-mentioned first parameter passing method mark can also be read from the first preset storage space by other programs, and its corresponding first data structure information can be determined, and then the first data structure information is sent to the system kernel by other programs, thereby reducing the modification of the system kernel program and improving the stability of the system kernel. The embodiment of the present invention does not make specific limitations.

[0078] Step 103: Parse the first parameter data based on the first data structure information so that the system kernel obtains the first parameter.

[0079] During the loading process, the system kernel needs to understand the current device information, the method of loading the operating system, the configuration of the operating system and other parameters through the first parameters. In order to obtain these first parameters, the system kernel can parse the first parameter data based on the first data structure information, and obtain the first parameter therefrom, thereby supporting different parameter passing methods, and then configure the hardware device information, system behavior information, root file system, driver information, etc. of the operating system based on the first parameter, thereby ensuring that the operating system can be loaded and run normally.

[0080] In summary, in the process of parameter passing, the embodiment of the present invention stores the first parameter data to be passed to the system kernel in the memory, stores the first parameter passing mode mark of the first parameter data in the first preset storage space; obtains the first parameter passing mode mark from the first preset storage space, determines the corresponding first data structure information based on the first parameter passing mode mark; and the system kernel parses the first parameter data based on the first data structure information to obtain the first parameter. The present invention can parse the first parameter data to be passed to the system kernel in an appropriate manner according to the parameter passing mode mark to obtain the first parameter, thereby enabling the system kernel to support multiple parameter passing modes, which helps to improve the operating stability and compatibility of the system kernel.

[0081] Reference Figure 2 , Figure 2A flow chart showing another parameter transfer method embodiment provided by an embodiment of the present invention is shown, which is applied to electronic devices, such as Figure 2 As shown, the specific steps include:

[0082] Step 201, loading the firmware of the electronic device, storing the first parameter data in the memory through the firmware, and storing the first parameter transmission mode mark in the first preset storage space.

[0083] In some electronic devices, the installed firmware can directly guide the system kernel to start up and can directly pass parameters to the system kernel. These firmwares may include but are not limited to firmware developed in accordance with the Unified Extensible Firmware Interface (UEFI) specification, Coreboot firmware, etc., and the embodiments of the present invention do not make specific limitations.

[0084] Reference Figure 3 , Figure 3 A schematic diagram of a parameter transfer path provided by an embodiment of the present invention is shown. Figure 3 As shown, the firmware can directly pass the first parameter data to the system kernel.

[0085] The above-mentioned firmware may use different parameter transmission methods to pass the first parameter to the system kernel due to different versions or operating architectures, and different parameter transmission methods use different data structures to record the first parameter. In an embodiment of the present invention, corresponding parameter transmission method tags can be set for different parameter transmission methods, and a first preset storage space for recording the parameter transmission method tags can be set. By adjusting the firmware program, it can store the first parameter transmission method tag corresponding to the parameter transmission method used to transmit the first parameter in the first preset storage space when passing the first parameter to the system kernel.

[0086] Exemplarily, the parameter passing mode flag may be set to include FLAG1 and FLAG2, and the first preset storage space is the general register EAX, wherein FLAG1 corresponds to the parameter passing mode FDT, and FLAG2 corresponds to the parameter passing mode ACPI. If a firmware obtains the corresponding first parameter through the parameter passing mode ACPI after loading, and encapsulates each first parameter according to the parameter passing mode ACPI to obtain the first parameter data, the firmware may store the first parameter data in the memory, and write the FLAG2 corresponding to the parameter passing mode ACPI into the above-mentioned general register EAX.

[0087] Step 202, load the system kernel, and obtain the first parameter passing method mark from the first preset storage space through the system kernel, so that the system kernel matches the first parameter passing method mark with the preset corresponding relationship defined in the system kernel, and determines the first data structure information corresponding to the first parameter passing method mark; the preset corresponding relationship includes a one-to-one correspondence between multiple parameter passing method marks and multiple data structure information.

[0088] In the embodiment of the present invention, after the firmware writes the first parameter data in the memory, the system kernel can be loaded. After the system kernel is started, the system kernel obtains the parameter mode type tag from the first preset storage space, and matches the parameter mode type tag with the preset corresponding relationship to determine the first data structure information corresponding to the first parameter transmission mode tag. The above preset corresponding relationship may include a one-to-one correspondence between multiple parameter transmission mode tags and multiple data structure information.

[0089] In an embodiment of the present invention, the system kernel program can be rewritten so that it can read the first preset storage space after loading, obtain the first parameter passing method mark, and determine the corresponding first data structure information according to the first parameter passing method mark. The above preset corresponding relationship can be defined in the system kernel code.

[0090] The above-mentioned first data structure information may include multiple parameter types, parameter offset addresses corresponding to each parameter type and space sizes corresponding to each parameter type, wherein the parameter type is used to indicate the type of the first parameter contained in the first parameter data, and the parameter offset address is used to indicate the position of the specific parameter corresponding to the parameter type in the first parameter data.

[0091] Exemplarily, a first data structure information may be in the form of the following Table 1:

[0092] Parameter Type Parameter offset address Space size CPU Information 0x4e000000 4KB Memory information 0xff000000 2KB System boot information 0x71000000 4KB

[0093] Table 1

[0094] It should be noted that the above Table 1 is only an exemplary display. The first data structure information may include a large number of parameter types, other information besides the first parameter, and nested parameter structures. The first data structure information may also have other structures, which are not specifically limited in the embodiments of the present invention.

[0095] Step 203: Parse the first parameter data based on the first data structure information so that the system kernel obtains the first parameter.

[0096] Normally, the first data storage address of the first parameter data in the memory is passed to the system kernel through a specific storage space, and the system kernel obtains the first parameter data from the corresponding area in the memory based on the first data address. When the first parameter data is passed in different parameter passing methods, or when different kernels pass the first parameter data, the same storage space may be used to store the above-mentioned first data address, or different storage spaces may be used to store the above-mentioned first data address. Therefore, in order to enable the system kernel to correctly obtain the first parameter data in different parameter passing methods, before parsing the first parameter data, the first parameter data can be obtained in the following manner:

[0097] Optionally, the system kernel determines a first parameter pointer space based on the first parameter transfer mode mark, obtains the first parameter storage address from the first parameter pointer space, and obtains the first parameter data from the memory based on the first parameter storage address.

[0098] In an embodiment of the present invention, corresponding storage spaces may be set for different parameter transfer mode marks, so that after the system kernel obtains the first parameter transfer mode mark, it may determine the first parameter pointer space according to the first parameter transfer mode mark, and then obtain the first parameter storage address indicating the storage location of the first parameter data in the memory from the first parameter pointer space, and read the first parameter data from the memory based on the first parameter storage address. Among them, the first parameter pointer space may include but is not limited to register space, memory space, etc., the first parameter pointer space may include multiple subspaces, each subspace may include one or more first parameter storage addresses, and accordingly, multiple segments of parameter data may be obtained from multiple locations in the memory according to these first parameter storage addresses, and these multiple segments of parameter data may together constitute complete first parameter data.

[0099] Exemplarily, the kernel may divide the first parameter data into three parts and store them in three memory spaces, and store the first parameter storage address 1, the first parameter storage address 2 and the first parameter storage address 3 corresponding to the three parts of the first parameter data in the general register 1, the general register 2 and the general register 3 respectively, and write the first parameter transfer mode mark in the first preset storage space. After the system kernel is started, the first parameter transfer mode mark can be obtained from the first preset storage space, and the corresponding first parameter pointer space including the general register 1, the general register 2 and the general register 3 can be determined according to the first parameter transfer mode mark, and then the first parameter storage address 1, the first parameter storage address 2 and the first parameter storage address 3 can be obtained, and the corresponding memory space can be read based on the first parameter storage address 1, the first parameter storage address 2 and the first parameter storage address 3 to obtain the first parameter data.

[0100] By marking the first parameter passing method to determine the first parameter pointer space, obtaining the first parameter storage address from the first parameter pointer space, and obtaining the first parameter data from the memory based on the first parameter storage address, the system kernel can support multiple storage methods of the first parameter data, which helps to further improve the compatibility of the system kernel with different parameter passing methods.

[0101] After obtaining the first parameter data, the system kernel can parse the first parameter data based on the first data structure information. Specifically, the parameter type contained therein can be determined according to the first data structure information, and the parameter offset address corresponding to each parameter type can be obtained, and the first parameter can be read from the first parameter data according to the parameter offset address.

[0102] In some cases, some system kernels can only call parameters stored in a specific format, that is, they can only call parameters from parameter data generated based on a specific parameter passing method. In this case, the read first parameter can also be transferred according to the data structure required by the system kernel to reduce the extent of program modification to these system kernels. The first parameter data can be converted in the following steps A1 to A2:

[0103] Step A1, based on the parameter data record structure corresponding to the target parameter transmission method natively supported by the system kernel, encapsulate the first parameter to obtain target parameter data.

[0104] The target parameter transmission method natively supported by the system kernel refers to the parameter transmission method that the system kernel can support without making any changes to the system kernel. In an embodiment of the present invention, the system kernel program can be adjusted to enable it to parse the first parameter data transmitted by the non-natively supported parameter transmission method and obtain the first parameter, and then re-encapsulate the first parameter according to the parameter data record structure corresponding to the target parameter transmission method natively supported by the system kernel to obtain the target parameter data.

[0105] Step A2, storing the target parameter storage address of the target parameter data in the target parameter pointer space corresponding to the target parameter passing method, so that the system kernel obtains the target parameter data based on the target parameter storage address obtained from the target parameter pointer space, and calls the first parameter therein based on the target parameter data.

[0106] After obtaining the target parameter data, the target parameter data can be stored in the memory, and at the same time, the target parameter storage address of the target parameter data in the memory is stored in the target parameter pointer space corresponding to the target parameter transfer method, so that it can support multiple parameter transfer methods without changing the native operation logic of the system kernel. Among them, the target parameter pointer space represents the space where the pointer of the parameter data needs to be stored when passing the parameter data to the system kernel based on the target parameter transfer method. The target parameter pointer space may include but is not limited to memory space, register space, etc.

[0107] Exemplarily, if the firmware adopts parameter transmission mode 1 to pass to the system kernel, and the target parameter transmission mode natively supported by the system kernel is parameter transmission mode 2, then when the firmware transmits the first parameter data, the first parameter transmission mode mark can be synchronously stored in the first preset storage space. When the system kernel receives the parameter, it first reads the first parameter transmission mode mark from the first preset storage space, and then determines the corresponding first data structure information and the first parameter pointer space according to the first parameter transmission mode mark, locates the first parameter data in the memory through the first parameter storage address in the first parameter pointer space, and then parses the first parameter data according to the first data structure information to obtain the first parameter, and then adopts the parameter data record structure corresponding to parameter transmission mode 2 to re-encapsulate the first parameter to obtain the target parameter data, and stores the target parameter storage address of the target parameter data in the memory in the target parameter pointer space of parameter transmission mode 2, so that the system kernel can read the target parameter pointer space in the native operation mode to obtain the target parameter storage address, and obtain the target parameter data from the memory through the target parameter storage address. Since the system kernel natively supports parameter transmission mode 2, the first parameter can be called and operated normally based on the target parameter data.

[0108] By encapsulating the first parameter and obtaining the target parameter data based on the parameter data record structure corresponding to the target parameter passing method natively supported by the system kernel, the target parameter storage address of the target parameter data is stored in the target parameter pointer space corresponding to the target parameter passing method, so that the system kernel can call the first parameter therein based on the target parameter data. Without changing the operating logic of the system kernel, the system kernel can run based on the native parameter parsing and calling method, and at the same time support a variety of different parameter passing methods, which helps to improve the compatibility and operating stability of the system kernel.

[0109] In summary, in the process of parameter passing, the embodiment of the present invention can determine the first parameter pointer space through the first parameter passing mode mark, obtain the first parameter storage address from the first parameter pointer space, and obtain the first parameter data from the memory based on the first parameter storage address, so that the system kernel can support multiple storage methods of the first parameter data, which helps to further improve the compatibility of the system kernel with different parameter passing methods. By encapsulating the first parameter based on the parameter data record structure corresponding to the target parameter passing mode natively supported by the system kernel, the target parameter data is obtained, and the target parameter storage address of the target parameter data is stored in the target parameter pointer space corresponding to the target parameter passing mode, so that the system kernel calls the first parameter therein based on the target parameter data, and can make the system kernel run based on the native parameter parsing and calling mode without changing the operating logic of the system kernel, and support multiple different parameter passing modes at the same time, which helps to improve the compatibility and operation stability of the system kernel. According to the parameter passing mode mark, the first parameter data to be passed to the system kernel can be parsed in an appropriate manner to obtain the first parameter, so that the system kernel can support multiple parameter passing modes, which helps to improve the operation stability and compatibility of the system kernel.

[0110] Reference Figure 4 , Figure 4 A flowchart showing another parameter transfer method embodiment provided by an embodiment of the present invention is shown, which is applied to electronic devices such as Figure 4 As shown, the specific steps include:

[0111] Step 301, loading the firmware and boot boot of the electronic device, passing the second parameter to the boot boot through the firmware, so that the boot boot stores the first parameter data in the memory based on the second parameter and stores the first parameter transfer mode mark in the first preset storage space.

[0112] In some electronic devices, the firmware cannot directly guide the system kernel to start the operating system, and it is necessary to indirectly pass parameters to the system kernel through the boot booter. Therefore, the firmware and the boot booter of the electronic device can be loaded, and the firmware first passes the second parameter to the boot booter, and then the boot booter encapsulates the second parameter based on its own parameter passing method to obtain the first parameter data, stores the first parameter data in the memory to pass the first parameter to the system kernel, and stores the first parameter passing method mark in the first preset storage space.

[0113] Reference Figure 5 , Figure 5 FIG. 4 shows another schematic diagram of a parameter transfer path provided by an embodiment of the present invention. Figure 5As shown, the second parameter can be passed from the firmware to the boot loader, and the boot loader obtains the first parameter data based on the second parameter encapsulation, and the boot loader passes the first parameter data to the system kernel.

[0114] The above-mentioned boot loader may adopt different parameter transmission methods to pass the first parameter to the system kernel due to different versions or operating architectures, and different parameter transmission methods use different data structures to record the first parameter. In an embodiment of the present invention, corresponding parameter transmission method marks can be set for different parameter transmission methods, and a first preset storage space for recording the parameter transmission method marks can be set. By adjusting the boot loader program, it can store the first parameter transmission method mark corresponding to the parameter transmission method adopted for transmitting the first parameter in the first preset storage space when transmitting the first parameter to the system kernel.

[0115] Exemplarily, the parameter passing mode flag may be set to include FLAG1 and FLAG2, and the first preset storage space is the general register EAX, wherein FLAG1 corresponds to the parameter passing mode FDT, and FLAG2 corresponds to the parameter passing mode ACPI. If a boot loader obtains the corresponding first parameter through the parameter passing mode ACPI after loading, and encapsulates each first parameter according to the parameter passing mode ACPI to obtain the first parameter data, the boot loader may store the first parameter data in the memory, and write the FLAG2 corresponding to the parameter passing mode ACPI into the above-mentioned general register EAX.

[0116] By enabling the boot loader to store the first parameter data in the memory based on the second parameter and to store the first parameter passing method mark in the first preset storage space, the parameter passing method of the first parameter data passed in by the boot loader can be determined based on the first parameter mark, so that the first parameter data can be received and the first parameter therein can be parsed in a suitable manner, which helps to improve the compatibility of the system kernel with boot loader devices with different parameter passing methods.

[0117] Optionally, step 301 may include:

[0118] Sub-step 3011, storing the second parameter data in the memory through the firmware.

[0119] Due to different versions or operating architectures, the firmware may use different parameter transmission methods to pass the second parameter to the boot loader, and different parameter transmission methods use different data structures to record the second parameter. In an embodiment of the present invention, when passing the second parameter to the boot loader, the firmware can generate corresponding second parameter data based on the second parameter to be passed, and store the second parameter data in the memory.

[0120] Sub-step 3012, obtaining storage data in at least one second preset storage space of the memory.

[0121] Since usually, when a second parameter is passed using a certain parameter passing method, specific data will be written in a specific storage space in the memory, the storage data in the specific storage space can be read as verification data to determine the parameter passing method used by the firmware.

[0122] Exemplarily, the second preset storage space may include space 1, space 2 and space 3. If the firmware adopts parameter passing method A to pass the second parameter to the boot loader, 04 will be written in space 2 and 05 will be written in space 3, and no data will be written in space 1. Therefore, the data in space 1 can be a null value (null). In this case, reading space 1, space 2 and space 3 can obtain storage data null, 04 and 05 respectively; if the firmware adopts parameter passing method B to pass the second parameter to the boot loader, 02 will be written in space 1 and 05 will be written in space 3, and no data will be written in space 2. Therefore, the data in space 2 can be a null value (null). In this case, reading space 1, space 2 and space 3 can obtain storage data 01, null and 05 respectively.

[0123] Sub-step 3013, matching the stored data with the standard data corresponding to the second preset storage space to obtain a matching result.

[0124] In an embodiment of the present invention, at least one standard data can be set for each second preset storage space, and one standard data of a second preset storage space corresponds to a parameter transfer method, that is, the standard data refers to the data that will be stored in the second preset storage space when the second parameter is transferred using a specific parameter transfer method.

[0125] Exemplarily, the second preset storage space may include space 1, space 2 and space 3, wherein the standard data corresponding to space 1 may include 01 and 11, the standard data corresponding to space 2 may include 09 and 22, and the standard data corresponding to space 3 may include 05.

[0126] In the embodiment of the present invention, the storage data of each second preset storage space can be matched with the standard data corresponding to the second preset storage space to obtain a matching result. The matching result may include the second preset storage space that can be matched successfully, for example, the matching result may be: successfully matched with space 1 and space 3; in addition, the matching result may also include the second preset storage space that can be matched successfully and the standard data that can be matched successfully, for example, the matching result may be: successfully matched with 01 in space 1 and 09 in space 2. The embodiment of the present invention does not specifically limit the format and form of the above matching results.

[0127] Sub-step 3014, determining corresponding second data structure information based on the matching result, so that the boot loader parses the second parameter data based on the second data structure information, so that the boot loader obtains the second parameter.

[0128] In an embodiment of the present invention, corresponding data structure information can be set for different matching results, so that after obtaining the matching result, the corresponding second data structure information is determined according to the matching result, so that the boot loader can parse the second parameter data passed by the kernel based on the second data structure information to obtain the second parameter, so that the boot loader can support firmware with different parameter transmission methods, which helps to improve the compatibility of the boot loader.

[0129] Reference Figure 6 , Figure 6 A schematic diagram of boot loader compatibility provided by an embodiment of the present invention is shown. Figure 6 As shown, the boot loader is compatible with firmware 1, firmware 2 and firmware 3 that use different parameter transmission methods. After determining the second data structure information corresponding to the firmware, the second parameter data can be parsed to obtain the second parameter, and then the second parameter is encapsulated to obtain the first parameter data, and the first parameter data is transmitted to the system kernel.

[0130] Optionally, corresponding parameter transmission mode marks may be set for different parameter transmission modes, and a second preset storage space for recording the parameter transmission mode marks may be set. By adjusting the firmware program, when the second parameter is transmitted to the boot loader, the second parameter transmission mode mark corresponding to the parameter transmission mode adopted for transmitting the second parameter is stored in the second preset storage space.

[0131] Step 302, load the system kernel, and obtain the first parameter passing method mark from the first preset storage space through the system kernel, so that the system kernel matches the first parameter passing method mark with the preset corresponding relationship defined in the system kernel, and determines the first data structure information corresponding to the first parameter passing method mark; the preset corresponding relationship includes a one-to-one correspondence between multiple parameter passing method marks and multiple data structure information.

[0132] This step can be referred to as step 202, and will not be described in detail in this embodiment of the present invention.

[0133] Step 303: Parse the first parameter data based on the first data structure information so that the system kernel obtains the first parameter.

[0134] This step can be referred to as step 203, and will not be described in detail in this embodiment of the present invention.

[0135] In summary, in the process of parameter transmission, the embodiment of the present invention can determine the corresponding second data structure information according to the matching result, so that the boot loader can parse the second parameter data transmitted by the kernel based on the second data structure information to obtain the second parameter, so that the boot loader can support firmware with different parameter transmission methods, which helps to improve the compatibility of the boot loader. According to the parameter transmission method mark, the first parameter data that needs to be transmitted to the system kernel can be parsed in an appropriate manner to obtain the first parameter, so that the system kernel can support multiple parameter transmission methods, which helps to improve the operating stability and compatibility of the system kernel.

[0136] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0137] Reference Figure 7 , Figure 7 A flowchart of another parameter transfer method embodiment provided by an embodiment of the present invention is shown, which is applied to firmware or a boot loader, such as Figure 7 As shown, the specific steps include:

[0138] Step 401: store first parameter data to be passed to the system kernel in the memory, and store a first parameter passing method mark of the first parameter data in a first preset storage space, so that the system kernel obtains the first parameter passing method mark from the first preset storage space, determines the corresponding first data structure information based on the first parameter passing method mark, and parses the first parameter data based on the first data structure information, so that the system kernel obtains the first parameter.

[0139] Optionally, the firmware or boot boot program may also execute the steps executed by the firmware or boot boot program in the aforementioned embodiment, which will not be described in detail in the embodiment of the present invention.

[0140] The present invention can adopt a suitable method to parse the first parameter data to be transmitted to the system kernel according to the parameter transmission method mark to obtain the first parameter, thereby enabling the system kernel to support multiple parameter transmission methods, which helps to improve the operation stability and compatibility of the system kernel.

[0141] Reference Figure 8 , Figure 8 A flowchart showing another parameter transfer method embodiment provided by an embodiment of the present invention is shown, which is applied to a system kernel, such as Figure 8As shown, the specific steps include:

[0142] Step 501, obtaining first parameter data transmitted by the firmware or boot boot of the electronic device, and a first parameter transmission mode mark corresponding to the first parameter data; wherein the first parameter transmission mode mark is stored in a first preset storage space by the firmware or boot boot.

[0143] Step 502: determine the corresponding first data structure information based on the first parameter transfer method mark.

[0144] Step 503: parse the first parameter data based on the first data structure information to obtain a first parameter.

[0145] Optionally, the system kernel may also execute the steps executed by the system kernel in the aforementioned embodiment, which will not be described in detail in the embodiment of the present invention.

[0146] The present invention can adopt a suitable method to parse the first parameter data to be transmitted to the system kernel according to the parameter transmission method mark to obtain the first parameter, thereby enabling the system kernel to support multiple parameter transmission methods, which helps to improve the operation stability and compatibility of the system kernel.

[0147] An embodiment of the present invention provides a parameter transfer system, the system comprising a parameter sender and a system kernel, the parameter sender comprising firmware or a boot loader of an electronic device.

[0148] The parameter sender is used to store first parameter data transmitted to the system kernel in the memory, and store a first parameter transmission mode mark of the first parameter data in the first preset storage space.

[0149] The system kernel is used to obtain the first parameter data and the first parameter transmission method mark from the first preset storage space, determine the corresponding first data structure information based on the first parameter transmission method mark, and parse the first parameter data based on the first data structure information to obtain the first parameter.

[0150] Optionally, the firmware or boot loader may also execute the steps executed by the firmware or boot loader in the aforementioned embodiment, and the system kernel may also execute the steps executed by the system kernel in the aforementioned embodiment, which will not be described in detail in the embodiment of the present invention.

[0151] The present invention can adopt a suitable method to parse the first parameter data to be transmitted to the system kernel according to the parameter transmission method mark to obtain the first parameter, thereby enabling the system kernel to support multiple parameter transmission methods, which helps to improve the operation stability and compatibility of the system kernel.

[0152] Reference Fig. 9, shows a structural block diagram of an embodiment of a parameter transfer device of the present invention, the device comprising:

[0153] A storage module 71, configured to store first parameter data transmitted to the system kernel in a memory, and to store a first parameter transmission mode mark of the first parameter data in a first preset storage space;

[0154] A first data structure information module 72, configured to obtain the first parameter transmission mode tag from the first preset storage space, and determine the corresponding first data structure information based on the first parameter transmission mode tag;

[0155] The first parameter module 73 is used to parse the first parameter data based on the first data structure information so that the system kernel obtains the first parameter.

[0156] Optionally, the storage module is also used to load firmware of the electronic device, and store the first parameter data in the memory and the first parameter transmission mode mark in the first preset storage space through the firmware.

[0157] Optionally, the storage module is also used to load the firmware and boot loader of the electronic device, and pass a second parameter to the boot loader through the firmware, so that the boot loader stores the first parameter data in the memory based on the second parameter and stores the first parameter transmission method mark in the first preset storage space.

[0158] Optionally, the storage module includes:

[0159] A second parameter data storage submodule, used for storing the second parameter data in the memory through the firmware;

[0160] A storage data submodule, used for acquiring storage data in at least one second preset storage space of the memory;

[0161] a matching submodule, configured to match the stored data with standard data corresponding to the second preset storage space to obtain a matching result;

[0162] The second parameter submodule is used to determine the corresponding second data structure information based on the matching result, so that the boot guide parses the second parameter data based on the second data structure information, so that the boot guide obtains the second parameter.

[0163] Optionally, the first data structure information module is also used to load the system kernel, and obtain the first parameter passing method mark from the first preset storage space through the system kernel, so that the system kernel matches the first parameter passing method mark with a preset correspondence defined in the system kernel, and determines the first data structure information corresponding to the first parameter passing method mark; the preset correspondence includes a one-to-one correspondence between multiple parameter passing method marks and multiple data structure information.

[0164] Optionally, the device further comprises:

[0165] A first parameter data acquisition module is used to load the system kernel, determine a first parameter pointer space based on the first parameter transfer mode mark through the system kernel, obtain the first parameter storage address from the first parameter pointer space, and obtain the first parameter data from the memory based on the first parameter storage address.

[0166] Optionally, the device further comprises:

[0167] A target parameter data module, used to encapsulate the first parameter based on the parameter data record structure corresponding to the target parameter transmission method natively supported by the system kernel, to obtain target parameter data;

[0168] A target parameter pointer space module is used to store the target parameter storage address of the target parameter data in the target parameter pointer space corresponding to the target parameter transmission method, so that the system kernel obtains the target parameter data based on the target parameter storage address obtained from the target parameter pointer space, and calls the first parameter therein based on the target parameter data.

[0169] The parameter passing device of an embodiment of the present invention includes: a storage module, which is used to store first parameter data passed to a system kernel in a memory, and store a first parameter passing method mark of the first parameter data in a first preset storage space; a first data structure information module, which is used to obtain the first parameter passing method mark from the first preset storage space, and determine the corresponding first data structure information based on the first parameter passing method mark; and a first parameter module, which is used to parse the first parameter data based on the first data structure information so that the system kernel obtains the first parameter.

[0170] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0171] Reference Fig.10 , is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Fig.10As shown, the electronic device includes: a processor, a memory, a communication interface and a communication bus, and the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the steps of the parameter transfer method of the aforementioned embodiment.

[0172] An embodiment of the present invention provides a non-transitory computer-readable storage medium. When instructions in the storage medium are executed by a program or a processor of a terminal, the terminal is enabled to execute the steps of the parameter transfer method of the aforementioned embodiment.

[0173] An embodiment of the present invention provides a computer program product, including a computer program or instructions, which implement the steps of the parameter transfer method of the above embodiment when the computer program or instructions are executed by a processor.

[0174] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0175] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0176] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0177] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a predictable manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0178] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0179] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0180] Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A parameter transfer method, characterized in that: The method comprises: Storing first parameter data transmitted to the system kernel in the memory, and storing a first parameter transmission mode mark of the first parameter data in the first preset storage space; Acquire the first parameter transfer mode mark from the first preset storage space, and determine the corresponding first data structure information based on the first parameter transfer mode mark; The first parameter data is parsed based on the first data structure information so that the system kernel obtains the first parameter.

2. The method according to claim 1, characterized in that The storing of the first parameter data transmitted to the system kernel in the memory and the storing of the first parameter transmission mode mark of the first parameter data in the first preset storage space include: The firmware of the electronic device is loaded, and the first parameter data is stored in the memory through the firmware, and the first parameter transmission mode mark is stored in the first preset storage space.

3. The method according to claim 1, characterized in that The storing of the first parameter data transmitted to the system kernel in the memory and the storing of the first parameter transmission mode mark of the first parameter data in the first preset storage space include: Load the firmware and boot boot of the electronic device, and pass the second parameter to the boot boot through the firmware, so that the boot boot stores the first parameter data in the memory and stores the first parameter transmission mode mark in the first preset storage space based on the second parameter.

4. The method according to claim 3, characterized in that: The step of passing the second parameter to the boot loader through the firmware includes: storing second parameter data in a memory by the firmware; Acquire storage data in at least one second preset storage space of the memory; Matching the stored data with standard data corresponding to the second preset storage space to obtain a matching result; The corresponding second data structure information is determined based on the matching result, so that the boot guide parses the second parameter data based on the second data structure information, so that the boot guide obtains the second parameter.

5. The method according to claim 1, characterized in that The acquiring the first parameter transmission mode mark from the first preset storage space, and determining the corresponding first data structure information based on the first parameter transmission mode mark, includes: Load the system kernel, and obtain the first parameter passing method mark from the first preset storage space through the system kernel, so that the system kernel matches the first parameter passing method mark with a preset correspondence defined in the system kernel, and determines the first data structure information corresponding to the first parameter passing method mark; the preset correspondence includes a one-to-one correspondence between multiple parameter passing method marks and multiple data structure information.

6. The method according to claim 1, characterized in that Before parsing the first parameter data based on the first data structure information, the method further includes: The system kernel is loaded, a first parameter pointer space is determined by the system kernel based on the first parameter transfer mode mark, the first parameter storage address is obtained from the first parameter pointer space, and the first parameter data is obtained from the memory based on the first parameter storage address.

7. The method according to claim 1, characterized in that The method further comprises: Based on the parameter data record structure corresponding to the target parameter transmission method natively supported by the system kernel, encapsulate the first parameter to obtain target parameter data; The target parameter storage address of the target parameter data is stored in the target parameter pointer space corresponding to the target parameter passing method, so that the system kernel obtains the target parameter data based on the target parameter storage address obtained from the target parameter pointer space, and calls the first parameter therein based on the target parameter data.

8. A parameter transfer method, characterized in that: The method comprises: The first parameter data passed to the system kernel is stored in the memory, and the first parameter transfer method mark of the first parameter data is stored in the first preset storage space, so that the system kernel obtains the first parameter transfer method mark from the first preset storage space, determines the corresponding first data structure information based on the first parameter transfer method mark, and parses the first parameter data based on the first data structure information, so that the system kernel obtains the first parameter.

9. A parameter transfer method, characterized in that: The method comprises: Acquire first parameter data transmitted by the firmware or boot boot of the electronic device, and a first parameter transmission mode mark corresponding to the first parameter data; wherein the first parameter transmission mode mark is stored in a first preset storage space by the firmware or boot boot; Determine the corresponding first data structure information based on the first parameter transfer mode mark; The first parameter data is parsed based on the first data structure information to obtain a first parameter.

10. A parameter transfer system, characterized in that: The system includes a parameter sender and a system kernel, wherein the parameter sender includes a firmware or a boot loader of an electronic device; The parameter sender is used to store the first parameter data transmitted to the system kernel in the memory, and store the first parameter transmission mode mark of the first parameter data in the first preset storage space; The system kernel is used to obtain the first parameter data and the first parameter transmission method mark from the first preset storage space, determine the corresponding first data structure information based on the first parameter transmission method mark, and parse the first parameter data based on the first data structure information to obtain the first parameter.

11. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the steps of the parameter passing method according to any one of claims 1 to 9.

12. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the parameter transfer method according to any one of claims 1 to 9 are implemented.

13. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the parameter transfer method described in any one of claims 1 to 9 are implemented.