TW202326428A - Processing system and method of dynamic adjust hardware kernel in booting - Google Patents
Processing system and method of dynamic adjust hardware kernel in booting Download PDFInfo
- Publication number
- TW202326428A TW202326428A TW110149225A TW110149225A TW202326428A TW 202326428 A TW202326428 A TW 202326428A TW 110149225 A TW110149225 A TW 110149225A TW 110149225 A TW110149225 A TW 110149225A TW 202326428 A TW202326428 A TW 202326428A
- Authority
- TW
- Taiwan
- Prior art keywords
- component
- program
- flag
- tested
- environment
- Prior art date
Links
Landscapes
- Stored Programmes (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
Description
關於一種計算機的硬體核心的處理系統與方法,特別有關一種開機過程中動態調整硬體核心的處理系統與方法。The invention relates to a processing system and method for a computer hardware core, in particular to a processing system and method for dynamically adjusting the hardware core during startup.
對於計算機裝置而言,硬體元件的環境配置是一項重要的課題。隨著硬體元件的多樣化,計算機裝置也需要即時的更新內核(kernel)的配置設定。當計算機裝置開機時,計算機的引導程序(bootloader)將會調用前述的配置設定檔案。For computer devices, the environmental configuration of hardware components is an important issue. With the diversification of hardware components, computer devices also need to update the configuration settings of the kernel (kernel) in real time. When the computer device is turned on, the bootloader of the computer will invoke the aforementioned configuration setting file.
配置設定檔案從中央處理器、匯流排與週邊元件均會記錄相應的環境參數。為能方便編寫配置設定檔,因此開發廠商提出核心裝置樹源(device tree source)的硬體配置的開發機制。開發者可以透過核心裝置樹源檔案的新增、修改或刪除的處理,進而決定週邊元件的增加、變更或移除的目的。由於週邊元件的數量與種類的增加,因此核心裝置樹源的編寫也日益繁複。The configuration setting file will record the corresponding environmental parameters from the CPU, bus and peripheral components. In order to facilitate the writing of configuration configuration files, the development company proposes a development mechanism of the hardware configuration of the core device tree source. Developers can determine the purpose of adding, changing or removing peripheral components through adding, modifying or deleting core device tree source files. Due to the increase in the number and types of peripheral components, the compilation of the core device tree source is also becoming more and more complicated.
有鑑於此,在一些實施例中,開機過程中動態調整硬體核心的處理系統包括記憶體、待測週邊元件與處理器。記憶體儲存核心裝置樹源檔案、引導程序與旗標識別程序,核心裝置樹源檔案記錄多個元件旗標資訊且每一元件旗標資訊具有多個元件環境參數;待測週邊元件具有元件旗標資訊;處理器電性連接於記憶體與待測週邊元件,處理器執行引導程序與旗標識別程序,引導程序載入核心裝置樹源檔案,引導程序獲取待測週邊元件的元件旗標資訊,以供旗標識別程序讀取核心裝置樹源檔案,旗標識別程序根據待測週邊元件的元件旗標資訊從核心裝置樹源檔案中獲取相應的所述元件環境參數,旗標識別程序從所述元件環境參數選擇其中之一為目標環境參數,引導程序以目標環境參數對待測週邊元件進行環境測試,獲取環境測試產生的評測結果,引導程序根據目標環境參數與相應的評測結果產生運作環境資訊。開機過程中動態調整硬體核心的處理系統提供一種泛用的核心裝置樹源檔案。對於開發者而言,開發者不需重複對核心裝置樹源檔案進行更新或修改。對於電子設備而言,電子設備改版時也可以沿用現有的核心裝置樹源檔案也可以保證其運作。In view of this, in some embodiments, the processing system that dynamically adjusts the hardware core during booting includes a memory, peripheral components to be tested, and a processor. The memory stores the core device tree source file, the boot program and the flag identification program. The core device tree source file records multiple component flag information and each component flag information has multiple component environment parameters; the peripheral components to be tested have component flags Flag information; the processor is electrically connected to the memory and the peripheral components to be tested, the processor executes the boot program and the flag recognition program, the boot program loads the core device tree source file, and the boot program obtains the component flag information of the peripheral components to be tested , for the flag recognition program to read the core device tree source file. The flag recognition program obtains the corresponding component environment parameters from the core device tree source file according to the component flag information of the peripheral components to be tested. The flag recognition program obtains the corresponding component environment parameters from the core device tree source file. One of the component environment parameters is selected as the target environment parameter, and the guide program uses the target environment parameter to perform an environmental test on the surrounding components to be tested, and obtains the evaluation results generated by the environment test, and the guide program generates an operating environment according to the target environment parameters and the corresponding evaluation results. Information. A processing system that dynamically adjusts hardware cores during boot provides a generic core device tree source file. For the developer, the developer does not need to repeatedly update or modify the core device tree source file. For electronic equipment, the existing core device tree source file can also be used to ensure its operation when the electronic equipment is revised.
在一些實施例中,待測週邊元件根據測試呼叫返回回應訊息至引導程序。In some embodiments, the peripheral device under test returns a response message to the bootstrap program according to the test call.
在一些實施例中,開機過程中動態調整硬體核心的處理方法,其係包括以下步驟由引導程序從記憶體載入核心裝置樹源檔案,其中,核心裝置樹源檔案記錄多個元件旗標資訊,元件旗標資訊具有多個元件環境參數;由旗標識別程序獲取待測週邊元件的元件旗標資訊;由旗標識別程序讀取記憶體的核心裝置樹源檔案,從核心裝置樹源檔案獲取元件旗標資訊的所述元件環境參數;旗標識別程序從所述元件環境參數選擇其中之一為目標環境參數;引導程序以目標環境參數對待測週邊元件進行環境測試,獲取環境測試產生的評測結果;引導程序根據目標環境參數的評測結果產生運作環境資訊。In some embodiments, the processing method for dynamically adjusting the hardware core during boot process includes the following steps: loading the core device tree source file from the memory by the boot program, wherein the core device tree source file records a plurality of component flags information, the component flag information has multiple component environment parameters; the component flag information of the peripheral components to be tested is obtained by the flag recognition program; the core device tree source file of the memory is read by the flag recognition program, and the core device tree source The file obtains the component environment parameters of the component flag information; the flag recognition program selects one of the component environment parameters as the target environment parameter; the guide program uses the target environment parameters to perform environmental tests on the surrounding components to be tested, and obtains the environment test results evaluation results; the bootstrap program generates operating environment information according to the evaluation results of the target environment parameters.
在一些實施例中,在由旗標識別程序讀取記憶體的核心裝置樹源檔案,以從核心裝置樹源檔案獲取相應元件旗標資訊的所述元件環境參數的步驟包括旗標識別程序根據運作強度的排序結果依序選出目標環境參數。In some embodiments, the step of reading the core device tree source file of the memory by the flag recognition program to obtain the component environment parameters of the corresponding component flag information from the core device tree source file includes the flag recognition program according to The sorting results of the operating intensity sequentially select the target environmental parameters.
在一些實施例中,在引導程序以目標環境參數對待測週邊元件進行環境測試,獲取環境測試產生的評測結果的步驟包括引導程序根據元件環境參數產生評測結果。In some embodiments, after the boot program conducts environmental tests on the surrounding components to be tested with target environmental parameters, the step of obtaining the evaluation results generated by the environmental tests includes guiding the program to generate evaluation results according to the component environmental parameters.
所述的開機過程中動態調整硬體核心的處理系統與方法提供一種泛用的核心裝置樹源檔案。對於開發者而言,開發者不需重複對核心裝置樹源檔案進行更新或修改。對於電子設備而言,電子設備改版時也可以沿用現有的核心裝置樹源檔案也可以保證運作。所述的處理系統不需變更現有電子設備的相關硬體,即可實現開機時動態配置待測週邊元件的環境參數。The processing system and method for dynamically adjusting the hardware core during the startup process provides a general-purpose core device tree source file. For the developer, the developer does not need to repeatedly update or modify the core device tree source file. For electronic equipment, the existing core device tree source file can also be used to ensure operation when the electronic equipment is revised. The processing system can dynamically configure the environmental parameters of the surrounding components to be tested when the device is turned on without changing the relevant hardware of the existing electronic equipment.
請參考圖1所示,其係為一實施例的開機過程中動態調整硬體核心的處理系統架構示意圖。開機過程中動態調整硬體核心的處理系統001包括記憶體100、至少一待測週邊元件200、處理器300與儲存單元400。所述的處理系統001可以應用於計算機、伺服器或嵌入式設備(embedded systems)之中。處理器300電性連接於記憶體100、待測週邊元件200與儲存單元400。Please refer to FIG. 1 , which is a schematic diagram of a processing system architecture for dynamically adjusting hardware cores during booting according to an embodiment. The processing system 001 for dynamically adjusting the hardware core during booting includes a memory 100 , at least one peripheral component to be tested 200 , a processor 300 and a storage unit 400 . The processing system 001 can be applied in computers, servers or embedded systems. The processor 300 is electrically connected to the memory 100 , the peripheral components to be tested 200 and the storage unit 400 .
待測週邊元件200可以是但不限定為背板(backplane)、風扇、感測器、連接埠、訊號燈或控制晶片等。例如:待測週邊元件200可以是串行外設介面(Serial Peripheral Interface Bus,簡稱SPI)、積體匯流排電路(Inter-Integrated Circuit,簡稱I²C)、改良積體匯流排電路(Improved Inter Integrated Circuit,I3C)、中央處理器(Central Processing Unit,CPU)、動態記憶體(Dynamic Random Access Memory,DRAM)、媒體存取控制器(Media Access Control,MAC)或物理層接(Physical Layer,PHY)。每一待測週邊元件200具有各自的元件旗標資訊210。元件旗標資訊210可用於識別新增的硬體元件(意即待測週邊元件200)。The peripheral component 200 to be tested can be, but not limited to, a backplane, a fan, a sensor, a connection port, a signal light, or a control chip. For example: the peripheral component 200 to be tested may be a Serial Peripheral Interface Bus (SPI for short), an Inter-Integrated Circuit (I²C for short), an Improved Inter Integrated Circuit (I²C) , I3C), central processing unit (Central Processing Unit, CPU), dynamic memory (Dynamic Random Access Memory, DRAM), media access controller (Media Access Control, MAC) or physical layer connection (Physical Layer, PHY). Each peripheral device 200 to be tested has its own device flag information 210 . The component flag information 210 can be used to identify the newly added hardware component (that is, the peripheral component to be tested 200).
記憶體100儲存核心裝置樹源檔案110(Device Tree Source)、引導程序120(boot loader)、旗標識別程序130與驅動檔案131(driver)。所述記憶體100可以是非揮發記憶體100(Non-Volatile Memory)、硬式磁碟(Hard Disk)或固態磁碟(Solid-state drive)等。在此實施例中,核心裝置樹源檔案110不限定為未編譯原始檔案或已編譯後的目的檔案。例如:後綴副檔為「dts」的為編譯檔案或後綴副檔為「dtb」的已編譯檔案均可視為核心裝置樹源檔案110。核心裝置樹源檔案110提供引導程序120的核心(kernel)配置,特別是對硬體元件的配置與運算環境的參數等。The memory 100 stores a core device tree source file 110 (Device Tree Source), a boot program 120 (boot loader), a flag recognition program 130 and a driver file 131 (driver). The memory 100 may be a non-volatile memory 100 (Non-Volatile Memory), a hard disk (Hard Disk) or a solid-state disk (Solid-state drive) and the like. In this embodiment, the core device tree source file 110 is not limited to an uncompiled original file or a compiled target file. For example, a compiled file with the suffix extension “dts” or a compiled file with the suffix extension “dtb” can be regarded as the core device tree source file 110 . The kernel device tree source file 110 provides the kernel configuration of the boot program 120 , especially the configuration of hardware components and parameters of the computing environment.
核心裝置樹源檔案110記錄至少一個元件旗標資訊210,而每一個元件旗標資訊210具有多個元件環境參數132。元件環境參數132記錄待測週邊元件200運作時的相關設定參數。例如:元件的運作時脈、功耗、記憶體位寬、記憶體頻寬或中斷向量(interrupt)等。不同的元件環境參數132對應各自的運作環境與參數。驅動檔案131提供硬體元件與作業系統411的交互處理。為能區別新增的硬體元件與已配置完成的硬體元件,將已配置完成的硬體元件稱為預設週邊元件(無標號),而新增的硬體元件即為待測週邊元件200。The core device tree source file 110 records at least one component flag information 210 , and each component flag information 210 has a plurality of component environment parameters 132 . The component environment parameter 132 records related setting parameters when the peripheral component 200 to be tested operates. For example: operating clock, power consumption, memory bit width, memory bandwidth, or interrupt vector (interrupt) of components. Different component environment parameters 132 correspond to respective operating environments and parameters. The driver file 131 provides interactive processing between hardware components and the operating system 411 . In order to distinguish the newly added hardware components from the configured hardware components, the configured hardware components are called default peripheral components (without labels), and the newly added hardware components are the peripheral components to be tested 200.
儲存單元400儲存作業系統411與運作環境資訊412。作業系統411提供處理系統001的操作環境。作業系統411的種類係為Linux作業系統、UNIX作業系統或其他BSD的作業系統。運作環境資訊412係對應於引導程序120的核心(kernel)配置結果。如果儲存單元400中儲存運作環境資訊412時,處理器300將根據運作環境資訊412進行處理系統001開機與配置週邊元件的環境參數。The storage unit 400 stores the operating system 411 and the operating environment information 412 . The operating system 411 provides an operating environment for the processing system 001 . The type of operating system 411 is Linux operating system, UNIX operating system or other BSD operating systems. The operating environment information 412 corresponds to the kernel configuration result of the boot program 120 . If the storage unit 400 stores the operating environment information 412, the processor 300 will start the processing system 001 and configure the environmental parameters of peripheral components according to the operating environment information 412.
如果儲存單元400中無儲存運作環境資訊412時,在處理系統001開機初始時,處理器300首先會執行引導程序120,並偵測有無新增的待測週邊元件200。引導程序120從記憶體100中載入核心裝置樹源檔案110,引導程序120並獲取核心裝置樹源檔案110的元件旗標資訊210。接著,處理器300執行旗標識別程序130。旗標識別程序130根據元件旗標資訊210獲取相應的元件環境參數132。旗標識別程序130可以是獨立程序也可以是內嵌於引導程序120之中的副程序,例如:旗標識別程序130可以是uboot 函式庫(library)。以下為清楚說明開機過程中動態調整硬體核心的運作流程,還請請參考圖2所示,其係為一實施例的開機過程中動態調整硬體核心的處理方法流程示意圖。開機過程中動態調整硬體核心的處理方法包括以下步驟: 步驟S210:由引導程序從記憶體載入核心裝置樹源檔案; 步驟S220:引導程序根據元件旗標資訊判斷待測週邊元件是否為新增的硬體元件; 步驟S230:若待測週邊元件為新增的硬體元件,由旗標識別程序獲取待測週邊元件的元件旗標資訊; 步驟S240:由旗標識別程序讀取記憶體的核心裝置樹源檔案,從核心裝置樹源檔案獲取元件旗標資訊的所述元件環境參數; 步驟S250:旗標識別程序從所述元件環境參數選擇其中之一為目標環境參數; 步驟S260:引導程序以目標環境參數對待測週邊元件進行環境測試,獲取環境測試產生的評測結果; 步驟S270:引導程序根據目標環境參數的評測結果產生運作環境資訊;以及 步驟S280:若待測週邊元件不是新增的硬體元件,引導程序加載預設週邊元件的驅動檔案。 If the storage unit 400 does not store the operating environment information 412 , when the processing system 001 is initially powered on, the processor 300 will first execute the boot program 120 and detect whether there is an additional peripheral component 200 to be tested. The boot program 120 loads the core device tree source file 110 from the memory 100 , boots the program 120 and obtains the component flag information 210 of the core device tree source file 110 . Next, the processor 300 executes the flag identification program 130 . The flag recognition program 130 obtains the corresponding component environment parameters 132 according to the component flag information 210 . The flag recognition program 130 can be an independent program or a subprogram embedded in the boot program 120 , for example, the flag recognition program 130 can be a uboot library. The following is a clear description of the operation process of dynamically adjusting the hardware core during the boot process. Please also refer to FIG. 2 , which is a schematic flowchart of a processing method for dynamically adjusting the hardware core during the boot process of an embodiment. The processing method for dynamically adjusting the hardware core during the boot process includes the following steps: Step S210: loading the core device tree source file from the memory by the boot program; Step S220: the boot program determines whether the peripheral component to be tested is a newly added hardware component according to the component flag information; Step S230: if the peripheral component to be tested is a newly added hardware component, the component flag information of the peripheral component to be tested is obtained by the flag recognition program; Step S240: read the core device tree source file of the memory by the flag recognition program, and obtain the component environment parameters of the component flag information from the core device tree source file; Step S250: the flag recognition program selects one of the component environment parameters as the target environment parameter; Step S260: guide the program to perform an environmental test on the surrounding components to be tested with the target environmental parameters, and obtain the evaluation results generated by the environmental test; Step S270: the boot program generates operating environment information according to the evaluation results of the target environment parameters; and Step S280: If the peripheral component to be tested is not a new hardware component, the boot program loads the driver file of the default peripheral component.
首先,處理系統001進行開機,處理器300執行引導程序120與旗標識別程序130。引導程序120從記憶體100載入核心裝置樹源檔案110。引導程序120從核心裝置樹源檔案110中獲取所有的元件旗標資訊210。引導程序120根據元件旗標資訊210的清單逐項向待測週邊元件200發送確認呼叫。當待測週邊元件200接收確認呼叫時,待測週邊元件200將會回應訊息至引導程序120。First, the processing system 001 is powered on, and the processor 300 executes the boot program 120 and the flag identification program 130 . The boot program 120 loads the core device tree source file 110 from the memory 100 . The bootloader 120 obtains all component flag information 210 from the core device tree source file 110 . The boot program 120 sends confirmation calls to the peripheral components 200 to be tested item by item according to the list of component flag information 210 . When the peripheral device 200 to be tested receives the confirmation call, the peripheral device 200 to be tested will respond a message to the boot program 120 .
因此引導程序120可以根據回應訊息確認待測週邊元件200已連接於處理器300,同時引導程序120也可以判斷待測週邊元件200是否為新增的硬體元件。若待測週邊元件200為新增的硬體元件,待測週邊元件200將會回應訊息至引導程序120。若待測週邊元件200不是新增的硬體元件(意即預設週邊元件),預設週邊元件將會回傳其他內容的回應訊息。引導程序120加載預設週邊元件的驅動檔案131。Therefore, the boot program 120 can confirm that the peripheral component 200 to be tested has been connected to the processor 300 according to the response message, and the boot program 120 can also determine whether the peripheral component 200 to be tested is a new hardware component. If the peripheral component 200 to be tested is a newly added hardware component, the peripheral component 200 to be tested will respond a message to the boot program 120 . If the peripheral component 200 to be tested is not a newly added hardware component (that is, a default peripheral component), the default peripheral component will return a response message with other contents. The boot program 120 loads the driver file 131 of the default peripheral components.
待測週邊元件200傳送回應訊息至引導程序120,引導程序120將該筆元件旗標資訊210傳送至旗標識別程序130。由於核心裝置樹源檔案110包括元件旗標資訊210的多個元件環境參數132。旗標識別程序130根據元件旗標資訊210從核心裝置樹源檔案110獲取相對應的元件環境參數132。The peripheral component 200 to be tested sends a response message to the boot program 120 , and the boot program 120 sends the device flag information 210 to the flag recognition program 130 . Because the core device tree source file 110 includes a plurality of component environment parameters 132 of the component flag information 210 . The flag recognition program 130 obtains the corresponding component environment parameter 132 from the core device tree source file 110 according to the component flag information 210 .
因此,旗標識別程序130會從所有元件環境參數132中選擇其中之一,而將所選的元件環境參數132即為目標環境參數133。旗標識別程序130將目標環境參數133傳送至引導程序120。引導程序120根據目標環境參數133對待測週邊元件200進行環境測試,藉以判斷待測週邊元件200是否適用於目標環境參數133。無論待測週邊元件200是否通過環境測試,引導程序120將會獲取該次環境測試的評測結果。評測結果記錄待測週邊元件200通過環境測試或未通過環境測試。引導程序120根據目標環境參數133與相應的評測結果產生運作環境資訊412。Therefore, the flag recognition program 130 selects one of all the component environment parameters 132 , and the selected component environment parameter 132 is the target environment parameter 133 . The flag recognition program 130 transmits the target environment parameter 133 to the boot program 120 . The boot program 120 performs an environmental test on the peripheral component 200 to be tested according to the target environment parameter 133 , so as to determine whether the peripheral component 200 to be tested is suitable for the target environment parameter 133 . Regardless of whether the peripheral component 200 to be tested passes the environmental test or not, the boot program 120 will obtain the evaluation result of the environmental test. The evaluation result records whether the peripheral element 200 to be tested passes the environmental test or fails the environmental test. The boot program 120 generates the operating environment information 412 according to the target environment parameters 133 and corresponding evaluation results.
在一些實施例中,每一個元件環境參數132具有各自的運作強度。運作強度可以是但不限定為元件的運作時脈、功耗、記憶體位寬或記憶體頻寬。在旗標識別程序130讀取記憶體100的核心裝置樹源檔案110獲取相應元件旗標資訊210的元件環境參數132中更包括以下步驟,請配合圖3所示: 步驟S310:根據運作強度排序所有的元件環境參數; 步驟S320:旗標識別程序根據運作強度的排序結果依序選出目標環境參數; 步驟S330:引導程序根據元件環境參數產生評測結果; 步驟S340:引導程序判斷該評測結果為成功或失敗; 步驟S350:若目標環境參數為失敗,旗標識別程序根據運作強度的排序結果選擇次一元件環境參數為新的目標環境參數;以及 步驟S360:若目標環境參數為成功,引導程序令該旗標識別程序中止選擇新的元件環境參數。 In some embodiments, each component environment parameter 132 has a respective operating intensity. The operating strength can be but not limited to the operating clock, power consumption, memory bit width or memory bandwidth of the device. The flag recognition program 130 reads the core device tree source file 110 of the memory 100 to obtain the component environment parameter 132 of the corresponding component flag information 210, and further includes the following steps, as shown in FIG. 3 : Step S310: Sorting all component environmental parameters according to the operating intensity; Step S320: the flag recognition program sequentially selects the target environment parameters according to the sorting results of the operation intensity; Step S330: the boot program generates an evaluation result according to the component environment parameters; Step S340: the boot program judges whether the evaluation result is success or failure; Step S350: If the target environment parameter is failure, the flag recognition program selects the next component environment parameter as the new target environment parameter according to the ranking result of the operation intensity; and Step S360: If the target environment parameter is successful, the boot program makes the flag recognition program stop selecting new component environment parameters.
首先,引導程序120根據運作強度對所有的元件環境參數132進行排序,在此將運作強度以降冪方式排序。元件環境參數132中記錄至少一運作參數,不同組合的運作參數會影響待測週邊元件200運行效能。一般而言,運作強度越高時對於待測週邊元件200的運行效能越高,反之亦然。運作強度可以是由待測週邊元件200的任一運作參數所決定,或由開發人員自行指定。舉例來說,運作參數若為運作時脈,則高運作時脈對應高運作強度,而低運作時脈則對應低運作強度。Firstly, the boot program 120 sorts all the component environment parameters 132 according to the operating intensity, and here the operating intensity is sorted in a descending power manner. At least one operating parameter is recorded in the component environment parameter 132 , and different combinations of operating parameters will affect the operating performance of the peripheral component 200 to be tested. Generally speaking, the higher the operating intensity, the higher the operating efficiency of the peripheral component 200 to be tested, and vice versa. The operating intensity may be determined by any operating parameter of the peripheral device 200 to be tested, or specified by the developer. For example, if the operating parameter is the operating clock, a high operating clock corresponds to a high operating intensity, and a low operating clock corresponds to a low operating intensity.
請參考圖4所示,其係為一實施例的元件環境參數與相應的運作強度的示意圖。圖4上方側為核心裝置樹源檔案110的元件旗標資訊210、所屬的元件環境參數132與運作強度。圖4下方側為根據運作強度以降冪排序後的結果。旗標識別程序130根據運作強度的排序結果,從元件環境參數132中由高至低的方式依序選擇。旗標識別程序130將所選出的元件環境參數132視為目標環境參數133(對應於圖4的虛線框),並將目標環境參數133發送至引導程序120。接著,由引導程序120以目標環境參數133對待測週邊元件200進行環境測試。引導程序120判斷該評測結果為成功或失敗。Please refer to FIG. 4 , which is a schematic diagram of component environmental parameters and corresponding operating intensity in an embodiment. The upper side of FIG. 4 shows the component flag information 210 of the core device tree source file 110 , the associated component environment parameters 132 and the operating strength. The bottom side of Figure 4 shows the results sorted by descending power according to the operation intensity. The flag recognition program 130 selects from the component environment parameters 132 in order from high to low according to the sorting result of the operation intensity. The flag recognition program 130 regards the selected component environment parameter 132 as a target environment parameter 133 (corresponding to the dashed box in FIG. 4 ), and sends the target environment parameter 133 to the boot program 120 . Next, the boot program 120 conducts an environmental test on the peripheral element 200 to be tested with the target environmental parameters 133 . The bootstrap program 120 judges the evaluation result as success or failure.
在待測週邊元件200進行環境測試的過程中(對應步驟S340之中),引導程序120將會分時且多次的方式向待測週邊元件200發送測試呼叫。換句話說,引導程序120將在一時段區間中以固定時間間隔向待測週邊元件200發送測試呼叫,藉以確認待測週邊元件200是否還處於運作狀態。若待測週邊元件200仍處於運作狀態,則待測週邊元件200將會根據測試呼叫返回一回應訊息至引導程序120。引導程序120可以根據有無回應訊息與回應訊息的次數判斷目標環境參數133是否符合待測週邊元件200,請配合圖5所示。 步驟S341:引導程序向待測週邊元件發送測試呼叫; 步驟S342:判斷回應訊息是否超過回應時間; 步驟S343:若本次的回應訊息未超過回應時間,判斷回應次數是否大於門檻次數; 步驟S344:若回應次數大於或等於門檻次數,引導程序記錄目標環境參數; 步驟S345:若回應次數小於門檻次數,引導程序計數發送呼叫次數是否超過上限; 步驟S346:選擇新的目標環境參數;以及 步驟S347:若本次的回應訊息超過回應時間,執行步驟S345。 During the environmental test of the peripheral device 200 under test (corresponding to step S340 ), the boot program 120 will send a test call to the peripheral device 200 under test in a time-division and multiple times manner. In other words, the boot program 120 will send a test call to the peripheral device 200 to be tested at a fixed time interval in a period of time, so as to confirm whether the peripheral device 200 to be tested is still in the operating state. If the peripheral device 200 to be tested is still in the operating state, the peripheral device 200 to be tested will return a response message to the boot program 120 according to the test call. The boot program 120 can determine whether the target environment parameter 133 matches the peripheral component 200 to be tested according to whether there is a response message and the number of response messages, as shown in FIG. 5 . Step S341: the boot program sends a test call to the peripheral component to be tested; Step S342: determine whether the response message exceeds the response time; Step S343: If the current response message does not exceed the response time, determine whether the response times are greater than the threshold times; Step S344: if the number of responses is greater than or equal to the threshold number, the boot program records the target environment parameters; Step S345: If the number of responses is less than the threshold number, whether the boot program counts and sends the number of calls exceeds the upper limit; Step S346: selecting new target environment parameters; and Step S347: If the current response message exceeds the response time, execute step S345.
首先,引導程序120選擇任一目標環境參數133並對待測週邊元件200進行測試呼叫。引導程序120會分別計數待測週邊元件200的回應次數與發送測試呼叫的次數,並計時回應訊息的時間。引導程序120發送測試呼叫後將會計時接收到回應訊息的回應時間是否超時。若待測週邊元件200超過回應時間才發送回應訊息,則引導程序120也將該筆回應訊息視為無效。若引導程序120於回應時間內接收回應訊息,則引導程序120將會判斷測試呼叫的回應次數是否大於或等於門檻次數。Firstly, the boot program 120 selects any target environment parameter 133 and makes a test call to the peripheral element 200 to be tested. The boot program 120 will respectively count the number of responses and the number of test calls sent by the peripheral component 200 to be tested, and time the response time. After the pilot program 120 sends the test call, it will count whether the response time for receiving the response message is overtime. If the peripheral component 200 under test sends the response message after the response time, the boot program 120 also regards the response message as invalid. If the guiding program 120 receives the response message within the response time, the guiding program 120 will determine whether the response times of the test call are greater than or equal to the threshold times.
待測週邊元件200的回應次數大於或等於所設定的門檻次數,則引導程序120判定待測週邊元件200匹配於該組目標環境參數133。若待測週邊元件200的回應次數小於所設定的門檻次數,可能是測試呼叫的回應次數還未達到上限。引導程序120將會繼續發送測試呼叫至待測週邊元件200。若待測週邊元件200的回應次數小於所設定的門檻次數且呼叫次數達到上限,引導程序120將判定待測週邊元件200不匹配該組目標環境參數133。If the response times of the peripheral component 200 to be tested are greater than or equal to the set threshold times, the boot program 120 determines that the peripheral component 200 to be tested matches the set of target environment parameters 133 . If the response times of the peripheral component 200 to be tested are less than the set threshold times, it may be that the response times of the test call has not reached the upper limit. The bootstrap program 120 will continue to send the test call to the peripheral device 200 to be tested. If the response times of the peripheral component 200 to be tested are less than the set threshold and the call times reach the upper limit, the boot program 120 will determine that the peripheral component 200 to be tested does not match the set of target environment parameters 133 .
舉例來說,引導程序120可以以分時方式向待測週邊元件200發送”三次”的測試呼叫,而門檻次數係為”兩次”,若待測週邊元件200的回應次數為”兩次”時,則引導程序120判定待測週邊元件200匹配於該組目標環境參數133。若待測週邊元件200的回應次數為”一次”時,引導程序120判定待測週邊元件200不匹配該組目標環境參數133。並且如前文所述,若待測週邊元件200的回應訊息超過回應時間,則引導程序120也不會將該筆回應訊息記錄於回應次數中。因此,引導程序120可以根據回應訊息的回應狀態判斷該組目標環境參數133是否符合待測週邊元件200的運作。For example, the boot program 120 can send "three" test calls to the peripheral component 200 to be tested in a time-sharing manner, and the threshold number of times is "twice". If the response times of the peripheral component 200 to be tested are "twice" , the guide program 120 determines that the peripheral element 200 to be tested matches the set of target environment parameters 133 . If the response times of the peripheral component 200 to be tested is “one time”, the boot program 120 determines that the peripheral component 200 to be tested does not match the set of target environment parameters 133 . And as mentioned above, if the response message of the peripheral component 200 to be tested exceeds the response time, the boot program 120 will not record the response message in the response times. Therefore, the boot program 120 can judge whether the set of target environment parameters 133 conforms to the operation of the peripheral component 200 to be tested according to the response state of the response message.
在引導程序120完成前述的目標環境參數133與待測週邊元件200的測試後,引導程序120從剩餘的元件環境參數132中選擇最高運作強度的元件環境參數132為新的目標環境參數133。引導程序120對新選出的目標環境參數133重複前述環境測試並獲得相應的評測結果。引導程序120除了可以從所有元件環境參數132的評測結果中選擇匹配的元件環境參數132外,引導程序120也可以從運作強度之中選擇匹配的元件環境參數132。前述匹配的環境參數係對應於前文中待測週邊元件200可以在目標環境參數133下正常運作。另一方面,引導程序120可以從回應次數的集合中選擇最大者為待測週邊元件200所匹配的元件環境參數132。引導程序120將匹配的元件環境參數132記錄至運作環境資訊412中。After the boot program 120 completes the aforementioned testing of the target environment parameter 133 and the surrounding component 200 to be tested, the boot program 120 selects the component environment parameter 132 with the highest operating intensity from the remaining component environment parameters 132 as the new target environment parameter 133 . The boot program 120 repeats the aforementioned environmental test on the newly selected target environment parameter 133 and obtains corresponding evaluation results. In addition to selecting the matching component environment parameters 132 from the evaluation results of all component environment parameters 132 , the bootstrap program 120 can also select the matching component environment parameters 132 from the operation intensity. The aforementioned matched environmental parameters correspond to the above-mentioned peripheral element 200 to be tested can operate normally under the target environmental parameters 133 . On the other hand, the guidance program 120 may select the largest element environment parameter 132 matched with the surrounding element 200 to be tested from the set of response times. The boot program 120 records the matched component environment parameters 132 into the operating environment information 412 .
如果處理系統001中存在一個以上的新增週邊元件,引導程序120完成當前待測週邊元件200與運作環境資訊412後,引導程序120從其他的週邊元件中選擇新的待測週邊元件200。引導程序120對新選出的待測週邊元件200進行前述的元件環境參數132的環境測試,並將評測結果記錄至運作環境資訊412中。引導程序120重複步驟S341~S347,直至完成所有新增的週邊元件的相關評測為止。If there is more than one new peripheral component in the processing system 001, after the boot program 120 completes the current peripheral component 200 to be tested and the operating environment information 412, the boot program 120 selects a new peripheral component 200 to be tested from other peripheral components. The boot program 120 performs the environmental test of the aforementioned component environmental parameters 132 on the newly selected peripheral components 200 to be tested, and records the evaluation results into the operating environment information 412 . The bootstrap program 120 repeats steps S341 - S347 until the relevant evaluation of all newly added peripheral components is completed.
在一實施例中,核心裝置樹源檔案110更包括預設環境參數414,元件旗標資訊210具有預設環境參數414。請參考圖6所示,其係為一實施例的開機過程中動態調整硬體核心的處理系統架構示意圖。若所有的元件環境參數132無法通過環境測試,旗標識別程序130將預設環境參數414傳送至引導程序120。引導程序120將預設環境參數414記錄至運作環境資訊412。In one embodiment, the core device tree source file 110 further includes a default environment parameter 414 , and the component flag information 210 has the default environment parameter 414 . Please refer to FIG. 6 , which is a schematic diagram of a processing system architecture for dynamically adjusting hardware cores during a boot process according to an embodiment. If all the component environment parameters 132 fail the environment test, the flag recognition program 130 transmits the default environment parameters 414 to the boot program 120 . The boot program 120 records the default environment parameter 414 into the operation environment information 412 .
在一實施例中,引導程序120完成運作環境資訊412的相關處理後,處理器300會執行作業系統411。作業系統411讀取儲存單元400的運作環境資訊412。作業系統411根據運作環境資訊412識別相應的待測週邊元件200,以利作業系統411直接調用待測週邊元件200。作業系統411不需要從核心裝置樹源檔案110重新測試每一個待測週邊元件200。In one embodiment, after the boot program 120 finishes processing the operating environment information 412 , the processor 300 executes the operating system 411 . The operating system 411 reads the operating environment information 412 of the storage unit 400 . The operating system 411 identifies the corresponding peripheral device 200 to be tested according to the operating environment information 412 , so that the operating system 411 can directly invoke the peripheral device 200 to be tested. The operating system 411 does not need to retest each peripheral device 200 to be tested from the core device tree source file 110 .
在處理系統001進行開機時,引導程序120除了讀取運作環境資訊412外,引導程序120也可以透過內核命令行(kernel command line)傳輸運作環境資訊412至作業系統411。作業系統411就可以省下向儲存單元400讀取運作環境資訊412的時間。When the processing system 001 is booted, besides reading the operating environment information 412 , the boot program 120 can also transmit the operating environment information 412 to the operating system 411 through a kernel command line. The operating system 411 can save the time of reading the operating environment information 412 from the storage unit 400 .
為清楚說明此實施例的運作,請配合圖7所示,其係為一實施例的核心裝置樹源檔案的部分內容示意圖。圖7上方係為核心裝置樹源檔案110係為I2C的部分參數。旗標識別程序130根據核心裝置樹源檔案110中的元件旗標資訊210獲取相應的元件環境參數132。圖7下方係為元件旗標資訊210的元件環境參數132。In order to clearly illustrate the operation of this embodiment, please refer to FIG. 7 , which is a schematic diagram of part of the content of the core device tree source file of an embodiment. The upper part of FIG. 7 is the core device tree source file 110 which is part of the parameters of I2C. The flag recognition program 130 obtains the corresponding component environment parameters 132 according to the component flag information 210 in the core device tree source file 110 . The lower part of FIG. 7 is the component environment parameter 132 of the component flag information 210 .
核心裝置樹源檔案110的虛線框表示元件旗標資訊210,但並非僅侷限於此一示例。旗標識別程序130獲取元件旗標資訊210後,引導程序120從元件環境參數132中選擇頻率「800000」為第一次測試的目標環境參數133。若引導程序120以頻率「800000」執行環境測試失敗,則引導程序120改選頻率「400000」為新的目標環境參數133,直至獲得成功的目標環境參數133為止。The dotted box of the core device tree source file 110 represents the component flag information 210, but it is not limited to this example. After the flag recognition program 130 obtains the component flag information 210 , the boot program 120 selects the frequency “800000” from the component environment parameters 132 as the target environment parameter 133 for the first test. If the boot program 120 fails to execute the environmental test with the frequency "800000", then the boot program 120 reselects the frequency "400000" as the new target environment parameter 133 until a successful target environment parameter 133 is obtained.
所述的開機過程中動態調整硬體核心的處理系統與方法提供一種泛用的核心裝置樹源檔案110。對於開發者而言,開發者不需重複對核心裝置樹源檔案110進行更新或修改。對於電子設備而言,電子設備改版時也可以沿用現有的核心裝置樹源檔案110也可以保證期運作。所述的處理系統001不需變更現有電子設備的相關硬體,即可實現開機時動態配置待測週邊元件200的環境參數。 The processing system and method for dynamically adjusting the hardware core during the boot process provides a general-purpose core device tree source file 110 . For the developer, the developer does not need to repeatedly update or modify the core device tree source file 110 . For electronic equipment, the existing core device tree source file 110 can also be used when the electronic equipment is updated, and the long-term operation can also be guaranteed. The processing system 001 can dynamically configure the environmental parameters of the peripheral components 200 to be tested when starting up without changing the relevant hardware of the existing electronic equipment.
001:處理系統 100:記憶體 110:核心裝置樹源檔案 120:引導程序 130:旗標識別程序 131:驅動檔案 132:元件環境參數 133:目標環境參數 200:待測週邊元件 210:元件旗標資訊 300:處理器 400:儲存單元 411:作業系統 412:運作環境資訊 414:預設環境參數 S210~280、S310~S360、S341~S347:步驟 001: Processing system 100: memory 110: Core device tree source file 120: bootloader 130:Flag recognition program 131: Driver file 132: Component environment parameters 133: target environment parameters 200: Peripheral components to be tested 210: Component flag information 300: Processor 400: storage unit 411: operating system 412: Operational environment information 414: Preset environment parameters S210~280, S310~S360, S341~S347: steps
[圖1]為一實施例的開機過程中動態調整硬體核心的處理系統架構示意圖。 [圖2]為一實施例的開機過程中動態調整硬體核心的處理方法流程示意圖。 [圖3]為一實施例的獲取相應元件旗標資訊的元件環境參數的細部流程示意圖。 [圖4]為一實施例的元件環境參數與相應的運作強度的示意圖。 [圖5]為一實施例的待測週邊元件與目標環境參數的環境測試之運作流程示意圖。 [圖6]為一實施例的開機過程中動態調整硬體核心的處理系統架構示意圖。 [圖7]為一實施例的核心裝置樹源檔案的部分內容示意圖。 [ FIG. 1 ] is a schematic diagram of an embodiment of a processing system architecture for dynamically adjusting hardware cores during booting. [ FIG. 2 ] is a schematic flow chart of a processing method for dynamically adjusting hardware cores during boot process according to an embodiment. [ FIG. 3 ] is a detailed flowchart of obtaining component environment parameters corresponding to component flag information according to an embodiment. [ FIG. 4 ] is a schematic diagram of component environment parameters and corresponding operating intensity of an embodiment. [ FIG. 5 ] is a schematic diagram of the operation flow of the environmental testing of the peripheral components to be tested and the target environmental parameters according to an embodiment. [ FIG. 6 ] is a schematic diagram of an embodiment of a processing system architecture for dynamically adjusting hardware cores during booting. [ FIG. 7 ] is a schematic diagram of partial content of a core device tree source file in an embodiment.
001:處理系統 001: Processing system
100:記憶體 100: memory
110:核心裝置樹源檔案 110: Core device tree source file
120:引導程序 120: bootloader
130:旗標識別程序 130:Flag recognition program
131:驅動檔案 131: Driver file
132:元件環境參數 132: Component environment parameters
200:待測週邊元件 200: Peripheral components to be tested
210:元件旗標資訊 210: Component flag information
300:處理器 300: Processor
400:儲存單元 400: storage unit
411:作業系統 411: operating system
412:運作環境資訊 412: Operational environment information
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110149225A TWI789185B (en) | 2021-12-28 | 2021-12-28 | Processing system and method of dynamic adjust hardware kernel in booting |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110149225A TWI789185B (en) | 2021-12-28 | 2021-12-28 | Processing system and method of dynamic adjust hardware kernel in booting |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI789185B TWI789185B (en) | 2023-01-01 |
TW202326428A true TW202326428A (en) | 2023-07-01 |
Family
ID=86669981
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW110149225A TWI789185B (en) | 2021-12-28 | 2021-12-28 | Processing system and method of dynamic adjust hardware kernel in booting |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI789185B (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8621481B2 (en) * | 2011-06-13 | 2013-12-31 | Oracle International Corporation | Apparatus and method for performing a rebalance of resources for one or more devices at boot time |
US9760158B2 (en) * | 2014-06-06 | 2017-09-12 | Intel Corporation | Forcing a processor into a low power state |
US9128729B1 (en) * | 2014-09-08 | 2015-09-08 | Quanta Computer Inc. | System and method for automatically configuring bios performance profiles |
WO2016053310A1 (en) * | 2014-09-30 | 2016-04-07 | Hewlett-Packard Development Company, L.P. | Managing access to peripheral devices |
US20210294613A1 (en) * | 2020-03-17 | 2021-09-23 | Toshiba Tec Kabushiki Kaisha | Method and system for dual mode boot-up in multi-function device |
-
2021
- 2021-12-28 TW TW110149225A patent/TWI789185B/en active
Also Published As
Publication number | Publication date |
---|---|
TWI789185B (en) | 2023-01-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6158000A (en) | Shared memory initialization method for system having multiple processor capability | |
JP5593856B2 (en) | Information processing apparatus and driver execution control method | |
CN106569904A (en) | Information storage method and device and server | |
JP2013016182A (en) | Booting memory device from host | |
KR970071273A (en) | Apparatus and method for downloading data to an electronic device | |
US12118339B2 (en) | Image file obtaining method and apparatus | |
US7350111B2 (en) | Method of providing a real time solution to error occurred when computer is turned on | |
US20170109175A1 (en) | Selective loading of components within a node to speed up maintenance actions | |
CN115495275B (en) | Storage system and control method thereof | |
US20220413766A1 (en) | Method and apparatus and non-transitory computer-readable storage medium for debugging solid-state disk (ssd) device | |
CN113377586B (en) | Automatic detection method and device for server and storage medium | |
JP2004021990A (en) | Firmware selector of computer including processor | |
TWI789185B (en) | Processing system and method of dynamic adjust hardware kernel in booting | |
US20130097412A1 (en) | Performing A Boot Sequence In A Multi-Processor System | |
US9003172B2 (en) | Intelligently controlling loading of legacy option ROMs in a computing system | |
US8997048B1 (en) | Method and apparatus for profiling a virtual machine | |
CN116400975A (en) | Processing system and method for dynamically adjusting hardware core in starting process | |
CN115145595A (en) | Dependency library installation method and device, server, electronic equipment and storage medium | |
CN109918239B (en) | Computer apparatus, diagnostic method, and non-transitory computer-readable storage medium | |
JP2004326773A (en) | Processor type determination | |
CN116383091B (en) | Starting method and starting device of eMMC verification platform and storage medium | |
US8898636B1 (en) | Method and apparatus for testing an application running in a virtual machine | |
CN109426506B (en) | Loading method for selecting read-only memory | |
TW202103000A (en) | Booting processors | |
JP6356544B2 (en) | Information processing apparatus, memory inspection method, and program |