A parameter configuration method, system and computer readable storage medium

By exchanging parameter configuration messages between the host device and the SAS controller, online and partial updates of the SAS controller's persistent configuration page are achieved, solving the problems of complex updates and inability to update online in existing technologies, and improving update efficiency.

CN115469911BActive Publication Date: 2026-06-12INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2022-09-22
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In existing technologies, the persistent configuration page update method of SAS controllers is complex and cannot be updated online, resulting in inconvenience in maintenance.

Method used

A parameter configuration method is provided, in which a parameter configuration message is sent by a host device, the SAS controller extracts the configuration page type, page number, address information and data to be updated, performs online update and constructs a success reply message, thereby realizing partial update of persistent configuration pages.

🎯Benefits of technology

Online and partial updates of the SAS controller persistent configuration page have been implemented, improving update efficiency, and a successful update is confirmed by a reply message.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115469911B_ABST
    Figure CN115469911B_ABST
Patent Text Reader

Abstract

The application provides a parameter configuration method, system and computer readable storage medium, and relates to the field of SAS controllers.The method comprises the following steps: when a parameter configuration message for updating a persistent configuration page in an NVSRAM is received by a SAS controller, a configuration page type, a configuration page number, address information and to-be-updated data are extracted from the parameter configuration message; a target configuration page in the persistent configuration page is determined according to the configuration page type and the configuration page number, target data in the target configuration page is determined by using the address information, and the target data is updated by using the to-be-updated data; when the updating is successful, a configuration success reply message is constructed by using the configuration page type, the configuration page number and a message state indicating that the updating is successful, and the configuration success reply message is returned to a host device, so that the host device determines that the data updating is successful; the SAS controller can update the persistent configuration page online, and the specific target data in the persistent configuration page can also be updated locally, and therefore the updating efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of SAS controllers, and in particular to a parameter configuration method, system, and computer-readable storage medium. Background Technology

[0002] The SAS controller (Serial Attached SCSI) is a common controller in computer devices used to perform I / O functions between the host and storage devices. This controller has various register configuration data, and to ensure that this configuration data is not lost when the computer is powered off, it is generally stored in the persistent data area of ​​NVSRAM (Non-volatile SRAM). The data stored in this persistent data area by the SAS controller is also called persistent configuration pages.

[0003] In related technologies, updating the persistent configuration page requires merging the configuration page to be updated with the SAS controller's firmware into a single file, which is then burned into the SAS controller's flash memory. Upon the next power-on, the SAS controller loads the file from flash memory into its internal memory and re-stores the configuration page from that file into the persistent data area. As can be seen, this method of updating the persistent configuration page is quite complex and cannot be done online, which creates difficulties for SAS controller maintenance. Summary of the Invention

[0004] The purpose of this invention is to provide a parameter configuration method, system, and computer-readable storage medium that can control the SAS controller to update the persistent configuration page online, and can also partially update specific target data in the persistent configuration page, thereby improving the update efficiency of the persistent configuration page.

[0005] To solve the above technical problems, the present invention provides a parameter configuration method, comprising:

[0006] When the SAS controller receives a parameter configuration message from the host device for updating a persistent configuration page in NVSRAM, it extracts the configuration page type, configuration page number, address information, and data to be updated from the parameter configuration message.

[0007] The target configuration page in the persistent configuration page is determined according to the configuration page type and the configuration page number, and the target data in the target configuration page is determined using the address information, and the target data is updated using the data to be updated;

[0008] Upon successful update, a configuration success reply message is constructed using the configuration page type, the configuration page number, and the message status indicating a successful update. This message is then returned to the host device to confirm that the data update was successful.

[0009] Optionally, before receiving the parameter configuration message sent by the host device for updating the persistent configuration page in NVSRAM, the process further includes:

[0010] When the host device receives a parameter configuration command, it obtains a preset configuration request message structure.

[0011] The configuration page type, configuration page number, address information, and data to be updated from the parameter configuration command are written into the configuration request message structure to obtain the parameter configuration message.

[0012] Optionally, the step of writing the configuration page type, configuration page number, address information, and data to be updated from the parameter configuration command into the configuration request message structure to obtain the parameter configuration message includes:

[0013] The host device determines the configuration page length of the target configuration page corresponding to the configuration page type and the configuration page number based on preset configuration page structure parameters.

[0014] The configuration page type, configuration page number, configuration page length, address information, and data to be updated are written into the configuration request message structure to obtain the parameter configuration message;

[0015] Accordingly, before determining the target configuration page in the persistent configuration page based on the configuration page type and the configuration page number, the method further includes:

[0016] The SAS controller requests system memory space based on the configuration page length in the parameter configuration message, and writes the data to be updated in the parameter configuration message into the system memory space.

[0017] Accordingly, updating the target data using the data to be updated includes:

[0018] The SAS controller uses the data to be updated in the system memory space to update the target data.

[0019] Optionally, the address information is an offset value, and the step of using the address information to determine the target data in the target configuration page includes:

[0020] The SAS controller locates the offset position corresponding to the offset value in the target configuration page and sets the data at the offset position as the target data.

[0021] Optionally, the address information is a configuration page address, the target configuration page contains configuration parameters for multiple objects, and the step of using the address information to determine the target data in the target configuration page includes:

[0022] The SAS controller queries the target configuration page for the object corresponding to the configuration page address and sets all configuration parameters corresponding to the object to the target data.

[0023] Optionally, constructing a configuration success reply message using the configuration page type, configuration page number, and message status indicating a successful update includes:

[0024] The SAS controller obtains a preset configuration response message structure;

[0025] Write the configuration page type, the configuration page number, and the message status indicating a successful update into the configuration reply message structure to obtain the configuration success reply message.

[0026] Optionally, after updating the target data using the data to be updated, the method further includes:

[0027] When an update fails, the SAS controller constructs a configuration failure response message using the configuration page type, the configuration page number, and the message status indicating the update failure, and returns the configuration failure response message to the host device so that the host device can determine that the data update has failed.

[0028] Optionally, after returning the configuration success reply message to the host device, the method further includes:

[0029] When the SAS controller receives a restart command from the host device, it performs a restart operation and loads the updated persistent configuration page into the internal memory during the restart process so that the updated persistent configuration page takes effect.

[0030] Optionally, it also includes:

[0031] When the SAS controller receives a parameter read message from the host device for reading the persistent configuration page, it uses the configuration page type, configuration page number, and address information in the parameter read message to determine the configuration page data in the persistent configuration page.

[0032] Write the configuration page data into the parameter read message, and when the read is successful, construct a read success reply message using the configuration page type, the configuration page number, and the message status indicating successful read;

[0033] The host device is returned a read success reply message and a parameter read completion message to confirm that the data was read successfully and to obtain the configuration page data from the parameter read message.

[0034] The present invention also provides a parameter configuration system, comprising: a SAS controller and a host device, wherein,

[0035] The SAS controller is configured to, upon receiving a parameter configuration message from the host device for updating a persistent configuration page in NVSRAM, extract the configuration page type, configuration page number, address information, and data to be updated from the parameter configuration message; determine the target configuration page in the persistent configuration page based on the configuration page type and the configuration page number, and determine the target data in the target configuration page using the address information, and update the target data using the data to be updated; upon successful update, construct a configuration success reply message using the configuration page type, the configuration page number, and a message status indicating successful update, and return the configuration success reply message to the host device.

[0036] The host device is used to send the parameter configuration message to the SAS controller, and to determine that the data update was successful upon receiving the success reply message.

[0037] The present invention also provides a computer-readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the parameter configuration method described above.

[0038] This invention provides a parameter configuration method, comprising: when a SAS controller receives a parameter configuration message from a host device for updating a persistent configuration page in NVSRAM, extracting a configuration page type, a configuration page number, address information, and data to be updated from the parameter configuration message; determining a target configuration page in the persistent configuration page based on the configuration page type and the configuration page number, and determining target data in the target configuration page using the address information, and updating the target data using the data to be updated; and, upon successful update, constructing a configuration success reply message using the configuration page type, the configuration page number, and a message status indicating successful update, and returning the configuration success reply message to the host device so that the host device determines that the data update was successful.

[0039] As can be seen, in this invention, the host device can directly send a parameter configuration message to the SAS controller for updating the persistent configuration page in NVSRAM. Upon receiving this message, the SAS controller automatically extracts the configuration page type, configuration page number, address information, and data to be updated from the message. Subsequently, the SAS controller queries the corresponding target configuration page in the persistent configuration page according to the configuration page type and configuration page number, and determines the corresponding target data in the target configuration page using the address information. Then, it updates the target data using the data to be updated, thereby controlling the SAS controller to update the persistent configuration page online. Simultaneously, it can also perform partial updates on the specific target data contained in the target configuration page within the persistent configuration page, significantly improving the update efficiency of the SAS controller's persistent configuration page. Furthermore, after confirming a successful update, the SAS controller can construct a configuration success reply message using the configuration page type, configuration page number, and message status indicating a successful update, and return the configuration success reply message to the host device, allowing the host device to confirm a successful data update, further facilitating the persistent configuration page update process. This invention also provides a parameter configuration system and a computer-readable storage medium, which have the above-mentioned beneficial effects. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0041] Figure 1 A flowchart illustrating a parameter configuration method provided in an embodiment of the present invention;

[0042] Figure 2 This is a schematic diagram of a persistent configuration page provided in an embodiment of the present invention;

[0043] Figure 3 This is a structural block diagram of a parameter configuration system provided in an embodiment of the present invention. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] In related technologies, to update the persistent configuration page, the configuration page to be updated needs to be merged with the SAS controller's firmware into a single file, and this file is then burned into the SAS controller's flash memory. Upon the next power-on, the SAS controller loads the file from flash memory into its internal memory and re-stores the configuration page from that file into the persistent data area. It is evident that the above method of updating the persistent configuration page is complex and cannot be done online, which causes difficulties for SAS controller maintenance. In view of this, the present invention provides a parameter configuration method that can control the SAS controller to update the persistent configuration page online, and can also partially update specific target data within the persistent configuration page, thereby improving the efficiency of persistent configuration page updates. Please refer to... Figure 1 , Figure 1 A flowchart of a parameter configuration method provided in an embodiment of the present invention, the method may include:

[0046] When the S101 and SAS controllers receive a parameter configuration message from the host device for updating persistent configuration pages in NVSRAM, they extract the configuration page type, configuration page number, address information, and data to be updated from the parameter configuration message.

[0047] It should be noted that all interactions between the host device and the SAS controller in this embodiment of the invention can be jointly completed by the SAS controller management tool located on the host device and the SAS firmware and controller driver located on the SAS controller. To perform online updates to the persistent configuration pages stored in NVSRAM by the SAS controller, this embodiment of the invention provides two message structures: a configuration request message structure and a configuration reply message structure. The host device can use the configuration request message structure to generate a configuration request message and send it to the SAS controller, enabling the latter to operate on the persistent configuration pages based on the content contained in the message. After completing the relevant operations, the SAS controller can use the configuration reply message structure to generate a configuration reply message and send it to the host device, allowing the host device to understand the execution status of the relevant operations. The two message structures will be described in detail below.

[0048] First, let's introduce the configuration request message structure. For easier understanding, please refer to [link / reference needed]. Figure 2 , Figure 2 This is a schematic diagram of a persistent configuration page provided in an embodiment of the present invention. The persistent configuration page includes various types of configuration pages, such as... Figure 2This includes SAS PHY configuration pages, BIOS configuration pages (Basic Input / Output System), SAS port configuration pages, SAS expansion card configuration pages, log configuration pages, etc. Different types of configuration pages contain different configuration data; therefore, when updating data, the type of configuration page corresponding to the target configuration page to be updated must first be determined. Furthermore, each configuration page contains multiple configuration pages, each recording different configuration data, and each page has a corresponding page number. Therefore, after determining the type of configuration page corresponding to the target configuration page to be updated, its corresponding page number must also be determined. Furthermore, it can be understood that each configuration page records multiple data entries, and some configuration pages record configuration data for multiple objects, such as SAS PHY configuration pages recording configuration data for multiple SAS PHY objects. Therefore, in order to update the configuration data at a specific location or the configuration data of a specific object within the target configuration page, it is also necessary to determine the address information corresponding to this configuration data within the configuration page, such as the specific configuration page address or address offset value. Clearly, to perform a partial update on a persistent configuration page, it is necessary to specify the configuration page type, page number, address information, and the data to be updated. This allows for the determination of a specific target data within the persistent configuration page based on the page type, page number, and address information, and the update target data is then used to update that target data. Therefore, to meet the requirements for updating persistent configuration pages, the configuration request message structure should at least include the configuration page type, page number, address information, and the location where the data to be updated will be written.

[0049] Of course, the configuration request message structure can also contain other content to meet other application requirements. For example, the configuration request message structure can not only satisfy the need to perform update operations on persistent configuration pages, but also the need to perform read operations on persistent configuration pages, as well as the need to perform update and read operations on configuration pages contained in other locations of the SAS controller. Therefore, the configuration request message structure can also include an "operation type" to distinguish the operation type corresponding to the current request. Furthermore, considering that the volume of the data to be updated may be large, or that a large amount of configuration data may be read from persistent configuration pages, the configuration request message structure can also include a "configuration page length" to record the length of the target configuration page to be updated or read, so that the SAS controller can allocate system memory space based on this length and use this space to cache the data to be updated or the data read from the target configuration page. The configuration request message structure can also include a "flag" to identify the system memory space allocated by the SAS controller. In addition, for convenient request log management, the configuration request message structure can also include a "configuration page version" to record the current version of the persistent configuration page. Furthermore, for convenient message identification, the configuration request message structure can also include a "function" to identify the configuration request message generated by the configuration request message structure. In one possible scenario, the configuration request message structure can take the form shown in the table below:

[0050]

[0051] Parameter explanation:

[0052] Operation types: Read NVSRAM configuration page, Write NVSRAM configuration page, Read current configuration page, Write current configuration page;

[0053] Flags: Specifies the memory address space of the SAS controller used for caching configuration page values;

[0054] Offset value: The offset address of the target data in the target configuration page;

[0055] Function: Get or modify NVSRAM configuration parameters;

[0056] Configuration page version: The version of a specific configuration page;

[0057] Configuration page length: The length of a specific configuration page;

[0058] Configuration page number: A specific configuration page number;

[0059] Configuration page type: Specifies the specific configuration page;

[0060] Configuration page address: The address of each configuration page for non-volatile data in NVSRAM;

[0061] Configuration page data: This is used to load data to be updated, or data read from the target configuration page.

[0062] The configuration response message structure will be described below. Since this structure is used by the SAS controller to generate a configuration response message after completing relevant operations, and this message should be returned to the host device so that the host device can understand the execution status of the operation, the configuration response message structure should at least include the configuration page type and page number mentioned above. This allows the host device to determine whether the data to be updated has been written to the correct location or read from the correct location. In addition, it needs to include a "message status" to record the execution status of the operation, such as success or failure. Of course, the "message status" can also further record the reason for failure, such as operation not supported or configuration page type not supported, so that the host device can understand the specific reason for the failure.

[0063] In addition, to meet other needs, the configuration response message structure can also include other fields, similar to the configuration request message structure, such as "Operation Type," "Flag," "Message Length" (to record the length of the configuration response message), "Function," "Configuration Page Version," and "Configuration Page Length." Furthermore, for easier log management, the configuration response message structure can also include a "Message Log" field to record detailed message information, such as the error code when an error occurs. In one possible scenario, the configuration response message structure can take the form shown in the table below:

[0064]

[0065] Parameter explanation:

[0066] Message Status: Returns the status of the message request processing result, such as success, operation not supported, configuration page type not supported, etc.

[0067] Message log: Records detailed message information, such as error codes when errors occur.

[0068] After setting the above two message structures, the host device can control the SAS controller to directly modify the configuration data in the persistent configuration page by sending messages to the SAS controller. Specifically, the host device can construct a parameter configuration message (i.e., a configuration request message with the operation type "write NVSRAM configuration page") and send it to the SAS controller; the SAS controller can then determine the specific target data in the persistent configuration page based on the configuration page type, configuration page number, and address information in the parameter configuration message, and update the target data using the data to be updated. Of course, for ease of use by relevant personnel, command-to-message conversion can also be performed on the host device side. That is, relevant personnel input parameter configuration commands, and the SAS controller management tool in the host device converts this command into a parameter configuration message and sends it to the SAS controller. It should be noted that the embodiments of the present invention do not limit the specific form of the parameter configuration command. It is understood that it should at least include the configuration page type, configuration page number, address information, and data to be updated. Of course, additional settings can be made based on other fields in the configuration request message structure, which can be set according to actual application requirements.

[0069] In one possible scenario, prior to receiving the parameter configuration message from the host device for updating the persistent configuration page in NVSRAM, the following may also be included:

[0070] Step 11: When the host device receives the parameter configuration command, it obtains the preset configuration request message structure;

[0071] Step 12: Write the configuration page type, configuration page number, address information, and data to be updated from the parameter configuration command into the configuration request message structure to obtain the parameter configuration message.

[0072] The following is a brief introduction to the form of parameter configuration commands. In one possible scenario, the basic form of a parameter configuration command can be:

[0073] . / scrtnycli.x86_64-i <n>cfg-t <pagetype> -n <pagenumber> -o <offset> -w <databyte>-a[address]-f[region]

[0074] In this command, `. / scrtnycli.x86_64` is the fixed header content and can be changed arbitrarily according to actual application requirements; `i` specifies the SAS controller to which the command is sent, starting from 1, such as N being 1; `cfg` is the function identifier, used to indicate that the current command is used to execute the NVSRAM non-volatile data configuration parameter function; `t` specifies the configuration page type (PageType); `n` specifies the configuration page number (PageNumber); `a` specifies the address value of a register in a configuration page of the SAS controller; `o` specifies the address offset in a configuration page of the SAS controller; `w` specifies the data to be updated (DataByte); and `f` specifies the storage region of the SAS controller configuration page (region), such as the persistent data area of ​​NVSRAM. It should be noted that the address offset and address value can exist alone or simultaneously. When both exist simultaneously, their corresponding meaning is: using the address value as the base address, offset forward by the corresponding data location.

[0075] The following is a specific example illustrating the above parameter configuration command. In one possible scenario, the command `. / scrtnycli.x86_64-i 1 cfg-t 2-n 1-o 0x14-w 02140002-f 1` means: modify the configuration data stored by SAS controller 1 in the persistent configuration table of type 2 (BIOS configuration page), page 1, with an offset value of 0x14, to 02140002.

[0076] S102. Determine the target configuration page in the persistent configuration page according to the configuration page type and configuration page number, determine the target data in the target configuration page using the address information, and update the target data using the data to be updated.

[0077] As mentioned above, the address information can be either an offset value or a configuration page address; these can appear individually or in combination. When the offset value appears alone, it means: using the starting address of the target configuration page as the base address, offsetting by the corresponding number of bits to obtain the data position of the target data within the target configuration page. Therefore, when the address information is an offset value, only the offset position of the target data needs to be determined based on the offset value to retrieve the target data.

[0078] In one possible scenario, the address information is an offset value. This address information is used to determine the target data within the target configuration page, including:

[0079] Step 21: The SAS controller finds the offset position corresponding to the offset value in the target configuration page and sets the data at the offset position as the target data.

[0080] Furthermore, the configuration page address refers to the specific address of a register within the target configuration page. When it appears alone, it means directly locating the data position corresponding to that configuration page address within the target configuration page. Therefore, when the address information is a configuration page address, the target data can be directly retrieved based on that address. It should be noted, however, that the target data obtained here includes all the configuration data contained in the corresponding register. Since a register may contain multiple bits of configuration data, if it is necessary to determine a specific bit of configuration data within a register, it is still necessary to further combine and use offset values.

[0081] In one possible scenario, the address information is the configuration page address. The target configuration page contains configuration parameters for multiple objects. The address information is used to determine the target data within the target configuration page, including:

[0082] Step 31: The SAS controller queries the object corresponding to the configuration page address in the target configuration page and sets all the configuration parameters corresponding to the object to the target data.

[0083] As mentioned above, when both the offset value and the configuration page address exist, the corresponding meaning is: using the configuration page address as the base address, offsetting by the corresponding number of bits to obtain the data position of the target data within the target configuration page. Therefore, the offset value and the configuration page address can be used in combination to achieve data query effects with different levels of granularity.

[0084] S103. Upon successful update, construct a configuration success reply message using the configuration page type, configuration page number, and message status indicating successful update, and return the configuration success reply message to the host device so that the host device can confirm that the data update was successful.

[0085] Upon completion of the update, the SAS controller can construct a configuration success reply message (i.e., a configuration reply message with the operation type "Write NVSRAM configuration page" and containing a message status indicating a successful update) using the configuration reply message structure described above, and return it to the host device so that the latter can confirm that the data update was successful.

[0086] In one possible scenario, a configuration success reply message is constructed using the configuration page type, configuration page number, and message status indicating a successful update, including:

[0087] Step 41: The SAS controller obtains the preset configuration response message structure;

[0088] Step 42: Write the configuration page type, configuration page number, and message status indicating successful update into the configuration reply message structure to obtain the configuration success reply message.

[0089] Of course, when an update fails, the SAS controller can also construct a configuration failure response message (i.e., a configuration response message containing a message status indicating that the update failed) to inform the host device that the current update operation has failed. The status information in the configuration failure response message can further include the reason for the failure, and the message can also further include log information corresponding to the failed operation, which can be configured according to actual application requirements.

[0090] In one possible scenario, after updating the target data using the data to be updated, it may also include:

[0091] When an update fails, the S104 and SAS controllers construct a configuration failure response message using the configuration page type, configuration page number, and message status indicating update failure, and return the configuration failure response message to the host device so that the host device can determine that the data update has failed.

[0092] Furthermore, considering that the configuration data in the persistent configuration page will only take effect when loaded into the internal memory of the SAS controller, the host device can also control the SAS controller to restart after the persistent configuration page update is completed, so that the latter loads the updated persistent configuration page into memory during the restart process.

[0093] In one possible scenario, after returning a configuration success reply message to the host device, the message may also include:

[0094] When the S105 and SAS controllers receive a restart command from the host device, they perform a restart operation and load the updated persistent configuration page into the internal memory during the restart process so that the updated persistent configuration page takes effect.

[0095] It should be noted that the embodiments of the present invention are not limited to a specific restart command, and relevant technologies of SAS controllers can be referred to. In one possible case, the restart command can be: . / scrtnycli.x86_64-i 1reset –c, where reset –c means restart.

[0096] Based on the above embodiments, in this invention, the host device can directly send a parameter configuration message for updating the persistent configuration page in NVSRAM to the SAS controller. Upon receiving this message, the SAS controller automatically extracts the configuration page type, configuration page number, address information, and data to be updated from the message. Subsequently, the SAS controller queries the corresponding target configuration page in the persistent configuration page according to the configuration page type and configuration page number, and determines the corresponding target data in the target configuration page using the address information. Then, it updates the target data using the data to be updated, thereby controlling the SAS controller to update the persistent configuration page online. At the same time, it can also perform partial updates on the specific target data contained in the target configuration page in the persistent configuration page, which can significantly improve the update efficiency of the persistent configuration page of the SAS controller. In addition, after confirming that the update is successful, the SAS controller can also construct a configuration success reply message using the configuration page type, configuration page number, and message status indicating that the update is successful, and return the configuration success reply message to the host device so that the host device can confirm that the data update is successful, which can further facilitate the update process of the persistent configuration page.

[0097] Based on the above embodiments, considering that the data to be updated may be large, or that a large amount of data may be read from the target configuration page, the configuration request message may also include a "configuration page length" so that the SAS controller can request system memory space based on this length. The specific setting method for the "configuration page length" and the specific response process of the SAS controller will be described below. In one possible case, the configuration page type, configuration page number, address information, and data to be updated from the parameter configuration command are written into the configuration request message structure to obtain the parameter configuration message, which may include:

[0098] Step 51: The host device determines the configuration page length of the target configuration page corresponding to the configuration page type and configuration page number based on the preset configuration page structure parameters;

[0099] Since the configuration page length of each configuration page is a basic configuration page structure parameter of the persistent configuration page, it can be preset in the host device. Therefore, after obtaining the configuration page type and configuration page number, the host device can look up the corresponding configuration page length in the configuration page structure parameters and write it into the parameter configuration message.

[0100] Step 52: Write the configuration page type, configuration page number, configuration page length, address information, and data to be updated into the configuration request message structure to obtain the parameter configuration message.

[0101] Accordingly, before determining the target configuration page in the persistent configuration page based on the configuration page type and configuration page number, the following may also be included:

[0102] Step 53: The SAS controller requests system memory space based on the configuration page length in the parameter configuration message, and writes the data to be updated in the parameter configuration message into the system memory space.

[0103] Accordingly, the target data is updated using the data to be updated, including:

[0104] Step 54: The SAS controller updates the target data using the data to be updated in the system memory space.

[0105] Since the SAS controller has cached the data to be updated in the system memory space, it is only necessary to read the data to be updated from this space and update the target data accordingly.

[0106] Based on the above embodiments, the process of reading persistent configuration pages is briefly described below. In one possible case, this method may further include:

[0107] When the S201 and SAS controllers receive a parameter read message from the host device for reading persistent configuration pages, they use the configuration page type, configuration page number, and address information in the parameter read message to determine the configuration page data in the persistent configuration page.

[0108] In this embodiment of the invention, the parameter read message is a configuration request message with an operation type of "read NVSRAM configuration page". Its specific usage is basically the same as the parameter configuration message. The difference is that the SAS controller determines the configuration page data to be read from the persistent configuration page based on the configuration page type, configuration page number, and address information in the parameter read message. The configuration methods of the parameter read message and the parameter configuration message are also basically the same. The difference is that the host device does not write data to the "configuration page data" field of the parameter read message; instead, the SAS controller writes the read data to the "configuration page data" field of the parameter read message.

[0109] As described above, during the generation of the parameter read message, the host device can perform a command-to-message conversion process. That is, the user inputs a parameter read command, and the host device writes the valid data from that command into the configuration request message structure to obtain the parameter read message. This embodiment of the invention does not limit the specific form of the parameter read command; it can be designed according to the form of the parameter configuration command. In one possible case, the basic form of the parameter read command can be:

[0110] . / scrtnycli.x86_64-i <n>cfg-t <pagetype> -n <pagenumber>-a[address]-f[region]

[0111] Here, `. / scrtnycli.x86_64` is the fixed header content of the command, which can be changed arbitrarily according to actual application requirements; `i` is used to specify the specific SAS controller to which the command is to be sent, starting from 1, such as N being 1; `cfg` is the function identifier, used to indicate that the current command is used to execute the NVSRAM non-volatile data configuration parameter function; `t` is used to specify the configuration page type (PageType); `n` is used to specify the configuration page number (PageNumber); `a` is used to specify the address value of a register in a configuration page of the SAS controller (address); `o` specifies the address offset in a configuration page of the SAS controller (offset); `f` specifies the storage region of the SAS controller configuration page (region), such as the persistent data area of ​​NVSRAM.

[0112] The following is a specific example illustrating the above parameter configuration command. In one possible scenario, the command `. / scrtnycli.x86_64-i 1 cfg-t 2-n 1` means: read all configuration data stored by SAS controller 1 in the persistent configuration table of type 2 (BIOS configuration page) on page 1 of the NVSRAM persistent data area (represented by 1).

[0113] Furthermore, it should be noted that if the parameter read message includes the configuration page length, the SAS controller should first allocate system memory space using that configuration page length before performing the read operation, then perform the read operation, and write the read configuration page data into the aforementioned system memory space. Subsequently, it should read the configuration page data from the system memory space and write it into the parameter read message.

[0114] S202. Write the configuration page data into the parameter read message, and when the read is successful, construct a read success reply message using the configuration page type, configuration page number and message status indicating successful read.

[0115] In this embodiment of the invention, the read success reply message is a configuration reply message with the operation type "read NVSRAM configuration page" and containing a message status indicating a successful read. Its construction method can be referred to the description in the above embodiments, and will not be repeated here. It should be noted that since the read success reply message only contains the execution status of the read operation, but is not used as the payload configuration page data, which is actually carried by the parameter read message payload, the SAS controller needs to return both the read success reply message and the parameter read message to the host device simultaneously.

[0116] S203. Return a successful read reply message and a parameter read completion message to the host device so that the host device can determine that the data read was successful and obtain the configuration page data from the parameter read message.

[0117] The parameter configuration system and computer-readable storage medium provided in the embodiments of the present invention are described below. The parameter configuration system and computer-readable storage medium described below can be referred to in correspondence with the parameter configuration method described above.

[0118] Please refer to Figure 3 , Figure 3 This is a structural block diagram of a parameter configuration system provided in an embodiment of the present invention. The system may include: a SAS controller 301 and a host device 302, wherein...

[0119] The SAS controller 301 is configured to, upon receiving a parameter configuration message from the host device 302 for updating a persistent configuration page in NVSRAM, extract the configuration page type, configuration page number, address information, and data to be updated from the parameter configuration message; determine the target configuration page in the persistent configuration page based on the configuration page type and configuration page number, and determine the target data in the target configuration page using the address information, and update the target data using the data to be updated; upon successful update, construct a configuration success reply message using the configuration page type, configuration page number, and message status indicating successful update, and return the configuration success reply message to the host device 302.

[0120] The host device 302 is used to send parameter configuration messages to the SAS controller 301, and to determine that the data update was successful when a successful reply message is received.

[0121] Optionally, the host device 302 is further configured to, before receiving the parameter configuration message sent by the host device 302 for updating the persistent configuration page in NVSRAM, obtain a preset configuration request message structure upon receiving the parameter configuration command; write the configuration page type, configuration page number, address information and data to be updated in the parameter configuration command into the configuration request message structure to obtain the parameter configuration message.

[0122] Optionally, the host device 302 is further configured to determine the configuration page length of the target configuration page corresponding to the configuration page type and configuration page number according to the preset configuration page structure parameters; and write the configuration page type, configuration page number, configuration page length, address information and data to be updated into the configuration request message structure to obtain the parameter configuration message;

[0123] Correspondingly, the SAS controller 301 is also used to request system memory space based on the configuration page length in the parameter configuration message before determining the target configuration page in the persistent configuration page according to the configuration page type and configuration page number, and to write the data to be updated in the parameter configuration message into the system memory space.

[0124] Correspondingly, the SAS controller 301 is also used to update the target data using the data to be updated in the system memory space.

[0125] Optionally, the SAS controller 301 is also used to find the offset position corresponding to the offset value in the target configuration page and set the data at the offset position as the target data.

[0126] Optionally, the SAS controller 301 is also used to query the object corresponding to the configuration page address in the target configuration page and set all configuration parameters corresponding to the object to the target data.

[0127] Optionally, the SAS controller 301 is also used to obtain a preset configuration reply message structure; write the configuration page type, configuration page number and message status indicating successful update into the configuration reply message structure to obtain a configuration success reply message.

[0128] Optionally, the SAS controller 301 is also configured to construct a configuration failure response message using the configuration page type, configuration page number, and message status indicating update failure when the update fails, and return the configuration failure response message to the host device 302 so that the host device 302 determines that the data update has failed.

[0129] Optionally, the SAS controller 301 is also configured to perform a restart operation when it receives a restart command sent by the host device 302, and load the updated persistent configuration page into the internal memory during the restart process so that the updated persistent configuration page takes effect.

[0130] Optionally, the SAS controller 301 is further configured to, upon receiving a parameter read message from the host device 302 for reading a persistent configuration page, determine the configuration page data in the persistent configuration page using the configuration page type, configuration page number, and address information in the parameter read message; write the configuration page data into the parameter read message; and, upon successful reading, construct a read success reply message using the configuration page type, configuration page number, and message status indicating successful reading; and return the read success reply message and the parameter read message indicating completion of writing to the host device 302, so that the host device 302 determines that the data reading was successful and obtains the configuration page data from the parameter read message.

[0131] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the parameter configuration method described in any of the above embodiments.

[0132] Since the embodiments of the computer-readable storage medium portion correspond to the embodiments of the parameter configuration method portion, the embodiments of the storage medium portion are described in the description of the embodiments of the parameter configuration method portion, and will not be repeated here.

[0133] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0134] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0135] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0136] The foregoing has provided a detailed description of a parameter configuration method, system, and computer-readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of the present invention.< / pagenumber> < / pagetype> < / n> < / databyte> < / offset> < / pagenumber> < / pagetype> < / n>

Claims

1. A parameter configuration method, characterized in that, include: When the SAS controller receives a parameter configuration message from the host device for updating a persistent configuration page in NVSRAM, it extracts the configuration page type, configuration page number, address information, and data to be updated from the parameter configuration message. The target configuration page in the persistent configuration page is determined according to the configuration page type and the configuration page number, and the target data in the target configuration page is determined using the address information, and the target data is updated using the data to be updated; Upon successful update, a configuration success reply message is constructed using the configuration page type, the configuration page number, and the message status indicating a successful update, and the configuration success reply message is returned to the host device so that the host device can determine that the data update was successful. Before receiving the parameter configuration message from the host device for updating the persistent configuration page in NVSRAM, the process also includes: When the host device receives a parameter configuration command, it obtains a preset configuration request message structure. The host device determines the configuration page length of the target configuration page corresponding to the configuration page type and the configuration page number based on preset configuration page structure parameters. The configuration page type, configuration page number, configuration page length, address information, and data to be updated are written into the configuration request message structure to obtain the parameter configuration message; Accordingly, before determining the target configuration page in the persistent configuration page based on the configuration page type and the configuration page number, the method further includes: The SAS controller requests system memory space based on the configuration page length in the parameter configuration message, and writes the data to be updated in the parameter configuration message into the system memory space. Accordingly, updating the target data using the data to be updated includes: The SAS controller uses the data to be updated in the system memory space to update the target data.

2. The parameter configuration method according to claim 1, characterized in that, The address information is an offset value, and the step of using the address information to determine the target data in the target configuration page includes: The SAS controller locates the offset position corresponding to the offset value in the target configuration page and sets the data at the offset position as the target data.

3. The parameter configuration method according to claim 1, characterized in that, The address information is a configuration page address, and the target configuration page contains configuration parameters for multiple objects. Determining the target data in the target configuration page using the address information includes: The SAS controller queries the target configuration page for the object corresponding to the configuration page address and sets all configuration parameters corresponding to the object to the target data.

4. The parameter configuration method according to claim 1, characterized in that, The step of constructing a configuration success reply message using the configuration page type, the configuration page number, and the message status indicating a successful update includes: The SAS controller obtains a preset configuration response message structure; Write the configuration page type, the configuration page number, and the message status indicating a successful update into the configuration reply message structure to obtain the configuration success reply message.

5. The parameter configuration method according to claim 1, characterized in that, After updating the target data using the data to be updated, the process further includes: When an update fails, the SAS controller constructs a configuration failure response message using the configuration page type, the configuration page number, and the message status indicating the update failure, and returns the configuration failure response message to the host device so that the host device can determine that the data update has failed.

6. The parameter configuration method according to claim 1, characterized in that, After returning the configuration success reply message to the host device, the process also includes: When the SAS controller receives a restart command from the host device, it performs a restart operation and loads the updated persistent configuration page into the internal memory during the restart process so that the updated persistent configuration page takes effect.

7. The parameter configuration method according to any one of claims 1 to 6, characterized in that, Also includes: When the SAS controller receives a parameter read message from the host device for reading the persistent configuration page, it uses the configuration page type, configuration page number, and address information in the parameter read message to determine the configuration page data in the persistent configuration page. Write the configuration page data into the parameter read message, and when the read is successful, construct a read success reply message using the configuration page type, the configuration page number, and the message status indicating successful read; The host device is returned a read success reply message and a parameter read completion message to confirm that the data was read successfully and to obtain the configuration page data from the parameter read message.

8. A parameter configuration system, characterized in that, include: SAS controllers and host devices, among which, The SAS controller is configured to, upon receiving a parameter configuration message from the host device for updating a persistent configuration page in NVSRAM, extract the configuration page type, configuration page number, address information, and data to be updated from the parameter configuration message; allocate system memory space according to the configuration page length in the parameter configuration message, and write the data to be updated in the parameter configuration message into the system memory space; determine the target configuration page in the persistent configuration page according to the configuration page type and the configuration page number, and determine the target data in the target configuration page using the address information, and update the target data using the data to be updated in the system memory space; and, upon successful update, construct a configuration success reply message using the configuration page type, configuration page number, and message status indicating successful update, and return the configuration success reply message to the host device. The host device is configured to, upon receiving a parameter configuration command, obtain a preset configuration request message structure; determine the configuration page length of the target configuration page corresponding to the configuration page type and the configuration page number based on preset configuration page structure parameters; write the configuration page type, the configuration page number, the configuration page length, the address information, and the data to be updated into the configuration request message structure to obtain the parameter configuration message; send the parameter configuration message to the SAS controller; and, upon receiving the success reply message, determine that the data update was successful.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the parameter configuration method as described in any one of claims 1 to 7.