Display configuration method and device, electronic equipment and readable storage medium
A configuration method and a technology for configuring registers, applied in the computer field, can solve the problems such as the display screen is not bright, the display controller cannot be properly initialized, and the display controller cannot be properly initialized.
Pending Publication Date: 2020-10-09
LOONGSON TECH CORP
0 Cites 1 Cited by
AI-Extracted Technical Summary
Problems solved by technology
[0003] On non-X86 platforms, the processor cannot directly run the above-mentioned VBIOS, resulting in the failure of the display controller to be correctly initialized. Further, it will cause the display screen to be off. Simulate the VBIOS operating environment to solve the above problems
[0004] In practical applications, when the ...
Method used
Because the display emulator in the firmware and the problem of VBIOS incompatibility exist in the firmware level, and the function of kernel is more perfect than firmware, therefore, carry out the initialization of display controller according to VBIOS under kernel, by displaying under kernel Whether the screen is displayed normally can determine whether the VBIOS matches the current device, which ensures the correctness of the display configuration information obtained later. Display configuration information can only be obtained when the display under the kernel is normally displayed.
In the present embodiment, by specifying VBIOS in kernel in advance, kernel carries out the initialization of display controller according to VBIOS, because the function of kernel is more perfect, can effectively guarantee that display controller is correctly initialized, guarantees that display screen can be normal under kernel light up. Further, this embodiment obtains the display configuration information under the kernel, adopts a direct configuration method, and applies the display configuration information to the display initialization part of the firmware, so as to realize correct initialization of the display control under the firmware when the firmware is incompatible with VBIOS device, so as to light up the display screen under the firmware. In addition, by adopting the method of this embodiment, there is no need to expand the display simulator in the firmware, and the code complexity can also be reduced.
In the present embodiment, pass the address information of VBIOS to kernel by adopting the mode of passing parameters, kernel carries out the correct initialization of display controller according to the address information received, not only guarantees that display screen can light normally under kernel , and the address information stored in the memory storage space by the VBIOS is transmitt...
Abstract
The invention provides a display configuration method and device, electronic equipment and a readable storage medium. Correct initialization of a display controller is carried out in a kernel; the method comprises the steps that a VBIOS of a video card is acquired, display configuration information corresponding to the VBIOS of the video card is acquired in a kernel, the display configuration information comprises an offset address of a display configuration register corresponding to the VBIOS and a numerical value in the display configuration register, and further firmware is reconfigured according to the display configuration information. According to the method, the display configuration information is obtained in the kernel; direct configuration, according to the method, the display configuration information is applied to the display initialization position of the firmware, so that when the display simulator in the firmware is incompatible with the VBIOS, the display controller iscorrectly initialized and the display screen is lightened under the firmware, in addition, by adopting the method, the display simulator does not need to be expanded in the firmware, and the code complexity can also be reduced.
Application Domain
Bootstrapping
Technology Topic
Electronic equipmentFirmware
Image
Examples
- Experimental program(1)
Example Embodiment
[0040] In order to make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
[0041] Definition of professional terms:
[0042] Basic Input Output System: Basic Input Output System, abbreviated as: BIOS, is a standard firmware interface. It is a set of programs solidified on the motherboard chip. Its main function is to provide the computer with the lowest and most direct Hardware setup and control.
[0043] Graphics card basic input output system: Vedio Basic Input Output System, abbreviated as: VBIOS, is a binary code of X86 instructions, mainly used to initialize the display controller, usually stored in the ROM of the graphics card, and the processor generally cannot run this code directly.
[0044] Firmware: A program written in non-volatile memory such as ROM and EPROM to control and coordinate integrated circuits. For example, it may include PMON firmware, UEFI firmware, etc.
[0045] PMON: It is an open source software with some BIOS functions. It is the interface between the hardware and the kernel. PMON is mainly used to initialize the hardware in the computer. PMON is a part of the hardware.
[0046] UEFI firmware: Also known as Unified Extensible Firmware Interface (Unified Extensible Firmware Interface), it is a standard that describes the type of interface in detail. This interface is used to automatically load the operating system from a pre-boot operating environment to an operating system.
[0047] Kernel: It is the most basic part of the operating system. It is part of the software that provides secure access to computer hardware for many applications and is mainly responsible for managing system resources. Among them, the classification of cores can be divided into single core, dual core and micro core.
[0048] Low-Voltage Differential Signaling (LVDS) is a level standard as well as a data transmission and interface technology. Its core is to use extremely low voltage swing to transmit data at high speed, which can be realized Point-to-point or point-to-multipoint connection has the characteristics of low power consumption, low bit error rate, low crosstalk and low radiation, and is widely used in motherboard displays and LCD screen interfaces.
[0049] Video Graphics Array (VGA for short): It is a video transmission standard with the advantages of high resolution, fast display rate, and rich colors.
[0050] Digital Visual Interface (DVI): It is an interface standard for high-speed transmission of digital signals.
[0051] In the prior art, since the processor cannot directly run the VBIOS of the X86 instructions on the non-X86 platform, usually, the corresponding display simulator will be extended on the basis of the firmware to simulate the VBIOS operating environment, so that the display controller can be Initialize properly.
[0052] However, in actual applications, when the display simulator in the firmware is incompatible with VBIOS, the display controller still cannot be initialized correctly, which will further cause the display screen to not light up. Therefore, when the display simulator in the firmware is not compatible with VBIOS, how to correctly initialize the display controller to light up the display is a problem that needs to be solved urgently.
[0053] Based on the above problems, the embodiment of the present invention provides a display configuration method, so as to correctly initialize the display controller and light the display screen when the display simulator in the firmware is incompatible with the VBIOS. The embodiment of the present invention is mainly applied to a non-X86 platform, for example, it can be applied to a microprocessor without interlocked pipelined stages (MIPS) platform.
[0054] figure 1 This is a schematic flowchart of Embodiment 1 of the display configuration method provided by the present invention. The execution subject of the display configuration method shown in this embodiment may be the display configuration device provided in the embodiment of the present invention, and the device may be implemented by any software and/or hardware. For example: the display configuration device may be a computer.
[0055] Such as figure 1 As shown, the method of this embodiment includes:
[0056] S101. Perform correct initialization of the display controller under the kernel.
[0057] In this step, the criterion for determining whether the display controller is initialized correctly is whether the display screen is lit, that is, whether the display screen is displayed normally.
[0058] In practical applications, when the board is powered on, the modules and controls will be initialized. Specifically, after the board is powered on, the firmware is first started. After the firmware is started, the kernel is loaded and the kernel is initialized. After the kernel is initialized, the kernel boots and starts the operating system, and then enters the operating system. Optionally, the firmware may be PMON firmware or UEFI firmware.
[0059] Because the problem of incompatibility between the display simulator and VBIOS in the firmware exists at the firmware level, and the function of the kernel is more complete than the firmware, therefore, the display controller is initialized according to the VBIOS under the kernel, and the display is normal under the kernel. Display, can determine whether the VBIOS matches the current device, and ensure the correctness of the display configuration information obtained subsequently. The display configuration information can be obtained only when the display screen is normally displayed under the kernel.
[0060] Among them, the type of the display screen may be an LVDS display screen, a VGA display screen or a DVI display screen. Here, it should be noted that the interface standards adopted by different types of displays are different. When the display controller is initialized, some default states may be different. For example, the resolution is different. Then, accordingly, the display configuration obtained under the kernel There will also be differences in the information, which is manifested in the different values stored in the display configuration register of the storage resolution.
[0061] S102. Obtain display configuration information corresponding to the VBIOS under the kernel.
[0062] The purpose of this step is to obtain the display configuration information corresponding to the VBIOS when it is determined that the display screen is displayed normally, where the display configuration information includes the offset address of the display configuration register corresponding to the VBIOS and the value in the display configuration register.
[0063] Wherein, the offset address of the display configuration register may be the start offset address of the display configuration register, and the value in the display configuration register is the data stored in the display configuration register.
[0064] S103. Reconfigure the firmware according to the displayed configuration information.
[0065] A possible implementation method is to modify the code in the firmware according to the value in the display configuration register to reset the graphics card-related configuration in the firmware, and then compile the modified firmware, and then use the programmer to re-write the firmware Binary files. Because VBIOS is configured in the reconfigured firmware, after the board is restarted, the display controller can be initialized directly and correctly under the firmware to light up the display.
[0066] In this step, the embodiment of the present invention does not limit the specific model of the burner, as long as it can realize the function of re-burning the firmware binary file.
[0067] In this embodiment, the display controller is correctly initialized under the kernel, and the display configuration information corresponding to the VBIOS is obtained under the kernel. The display configuration information includes the offset address of the display configuration register corresponding to the VBIOS and the display configuration register. Further, according to the displayed configuration information, reconfigure the firmware. In this embodiment, the display configuration information is obtained under the kernel, and the display configuration information is applied to the display initialization part of the firmware by means of direct configuration, so that when the firmware is incompatible with VBIOS, the display controller is correctly initialized under the firmware. The display screen is bright. In addition, the method of this embodiment does not need to extend the display simulator in the firmware, and the code complexity can also be reduced.
[0068] Optionally, in figure 1 On the basis of the illustrated embodiment, after step S103, the following step S104 ( figure 1 Not shown in):
[0069] S104. Restart the board, and the display controller performs display initialization under the reconfigured firmware.
[0070] Specifically, since VBIOS is stored in the reconfigured firmware, after the board is restarted, when the firmware is started, the display controller can be reconfigured according to the VBIOS stored in the firmware, so that the firmware and VBIOS can be fully compatible. The initialization of the display controller can be completed under the firmware, and the display screen can display normally.
[0071] The following are some specific examples figure 1 The illustrated embodiment is described in detail.
[0072] figure 2 This is a schematic flowchart of Embodiment 2 of the display configuration method provided by the present invention. Such as figure 2 As shown, the method of this embodiment is figure 1 On the basis of the illustrated embodiment, step S101, correct initialization of the display controller under the kernel, can be implemented by the method in step S201 to step S202 in this embodiment:
[0073] S201. The kernel receives address information delivered by the firmware.
[0074] In this step, the firmware transfers the address information of the VBIOS to the kernel in the form of parameter transfer, where the address information transferred by the firmware includes the starting address of the VBIOS stored in the memory storage space. In practical applications, the PMON firmware parses the VBIOS to obtain the address information therein. The address information includes the starting address of the VBIOS stored in the memory storage space. After that, the firmware transmits the address information to the kernel. In this step, the address information of the VBIOS in the memory storage space is passed to the kernel by means of parameter transfer, which can ensure the stability of the operating system.
[0075] S202: Perform correct initialization of the display controller according to the received address information.
[0076] The kernel parses the received address information, determines the offset address of the display configuration register, and reads the value in the display configuration register, and further, performs correct initialization of the display controller according to the value stored in the display configuration register.
[0077] Optionally, step S102, obtaining the display configuration information corresponding to the VBIOS under the kernel, can be implemented in the manner in step S203 to step S204, specifically:
[0078] S203. Modify the display driver in the kernel, and print the display configuration information.
[0079] S204: Export the display configuration information.
[0080] Exemplarily, when the operating system is a Linux system and the firmware is PMON firmware, the display configuration information can be exported in the following ways: In the Linux operating system, first, modify the display driver in the kernel to add printing to print out When the display controller is initialized correctly, the offset address of the display configuration register corresponding to the VBIOS and the value in the display configuration register, further, through the dmesg command, the printed display configuration information is exported, and the data format of the exported display configuration information is Data format recognized by PMON firmware. Since in the Linux operating system, the dmesg command is used to display boot information, if the display configuration information is not printed, the dmesg command cannot be used to export the displayed configuration information.
[0081] When the operating system of the board is other types of operating systems, or other types of firmware, the display configuration information can also be exported in the above manner.
[0082] S205. Reconfigure the firmware according to the displayed configuration information.
[0083] In this embodiment, step S205 and figure 1 Step S103 in the illustrated embodiment is similar, please refer to figure 1 The detailed description in the illustrated embodiment will not be repeated here.
[0084] In this embodiment, the address information of the VBIOS is passed to the kernel by means of parameter transfer, and the kernel performs the correct initialization of the display controller according to the received address information, which not only ensures that the display screen can be normally lit under the kernel, but also passes The parameter transfer method transfers the address information of the VBIOS stored in the memory storage space, which can effectively ensure the reliability of the operating system. Further, in this embodiment, the display configuration information is obtained under the kernel, and the display configuration information is applied to the display initialization place of the firmware by the direct configuration method, so that the display controller can be correctly initialized under the firmware when the firmware is incompatible with VBIOS , Light up the display screen. In addition, the method of this embodiment does not need to extend the display simulator in the firmware, and the code complexity can be reduced.
[0085] image 3 This is a schematic flowchart of Embodiment 3 of the display configuration method provided by the present invention. Such as image 3 As shown, the method of this embodiment is figure 1 On the basis of the illustrated embodiment, step S101, the correct initialization of the display controller under the kernel, can be implemented by the method in step S301 in this embodiment:
[0086] S301. Specify the VBIOS in the kernel in advance, and the kernel performs correct initialization of the display controller according to the VBIOS.
[0087] In practical applications, the VBIOS can be pre-designated in the kernel by modifying the kernel code, so that when the kernel is initialized, the display controller can be initialized directly according to the VBIOS.
[0088] S302. Modify the display driver in the kernel, and print the display configuration information.
[0089] S303. Export the display configuration information.
[0090] S304. Reconfigure the firmware according to the displayed configuration information.
[0091] In this embodiment, steps S302 to S304 and figure 2 Steps S203 to S205 in the illustrated embodiment are similar, please refer to figure 2 The detailed description in the embodiment will not be repeated here.
[0092] In this embodiment, by pre-designating VBIOS in the kernel, the kernel initializes the display controller according to the VBIOS. Since the function of the kernel is more complete, it can effectively ensure that the display controller is initialized correctly and the display screen can be normally lit under the kernel. Further, in this embodiment, the display configuration information is obtained under the kernel, and the display configuration information is applied to the display initialization place of the firmware by the direct configuration method, so as to realize the correct initialization of the display control under the firmware when the firmware is incompatible with VBIOS In addition, using the method of this embodiment, there is no need to extend the display simulator in the firmware, and the code complexity can also be reduced.
[0093] Figure 4 This is a schematic structural diagram of Embodiment 1 of the display configuration device provided by the present invention. Such as Figure 4 As shown, the display configuration device 40 of this embodiment includes: an initialization module 41, an acquisition module 42, and a configuration module 43.
[0094] Among them, the initialization module 41 is used to properly initialize the display controller under the kernel, so that the display screen can be displayed normally.
[0095] The obtaining module 42 is configured to obtain the display configuration information corresponding to the VBIOS of the graphics card basic input output system under the kernel. The display configuration information includes the offset address of the display configuration register corresponding to the VBIOS and the value in the display configuration register.
[0096] The configuration module 43 is used to reconfigure the firmware according to the displayed configuration information.
[0097] Optionally, the type of the display screen is: a low-voltage differential signal LVDS display screen or a video graphics array VGA display screen or a digital video interface DVI display screen.
[0098] The display configuration device provided in this embodiment can be used to execute figure 1 The implementation principles and technical effects of the technical solutions of the illustrated method embodiments are similar, and will not be repeated here.
[0099] Optionally, in Figure 4 On the basis of the illustrated embodiment, it further includes: a restart module 44 ( Figure 4 Not shown in ), used to restart the board, and the display controller performs display initialization under the reconfigured firmware.
[0100] Figure 5 This is a schematic structural diagram of Embodiment 2 of the display configuration device provided by the present invention. Such as Figure 5 As shown, the device 50 of this embodiment is Figure 4 Based on the illustrated embodiment, the acquisition module 42 includes: a printing sub-module 421 and an export sub-module 422.
[0101] Among them, the printing sub-module 421 is used to modify the display driver in the kernel, and print the display configuration information.
[0102] The export sub-module 422 is used to export the display configuration information after the display configuration information is exported from the directory by the printing operation adding device.
[0103] Optionally, in some embodiments, the initialization module 41 is specifically configured to receive address information transmitted by the firmware, and perform correct initialization of the display controller according to the address information, wherein the address information includes the VBIOS storage The starting address in the memory storage space.
[0104] Optionally, in some other embodiments, the initialization module 41 is specifically configured to specify the VBIOS in the kernel in advance, and perform correct initialization of the display controller according to the VBIOS.
[0105] The display configuration device provided in this embodiment can be used to execute figure 2 or image 3 The implementation principles and technical effects of the technical solutions of the illustrated method embodiments are similar, and will not be repeated here.
[0106] Image 6 This is a schematic structural diagram of Embodiment 1 of the electronic device provided by the present invention. Such as Image 6 As shown, the electronic device 60 provided in this embodiment includes: a memory 61, a processor 62, and a computer program.
[0107] Wherein, the computer program is stored in the memory 61 and is configured to be executed by the processor 62 to realize Figure 1 to Figure 3 The display configuration method shown in any embodiment. Please refer to the corresponding instructions Figure 1 to Figure 3 The relevant description and effects corresponding to the steps of the above are understood, so I won’t repeat them here.
[0108] Among them, in this embodiment, the memory 61 and the processor 62 are connected by a bus 63.
[0109] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to realize the present invention Figure 1 to Figure 3 The display configuration method shown in any embodiment.
[0110] In the several embodiments provided by the present invention, it should be understood that the disclosed device and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative, for example, the division of modules is only a logical function division, and there may be other divisions in actual implementation, for example, multiple modules or components can be combined or integrated. To another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or modules, and may be in electrical, mechanical or other forms.
[0111] The modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
[0112] In addition, the functional modules in each embodiment of the present invention may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0113] The program code used to implement the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to processors or controllers of general-purpose computers, special-purpose computers, or other programmable data processing devices, so that the program codes, when executed by the processors or controllers, enable the functions specified in the flowcharts and/or block diagrams/ The operation is implemented. The program code can be executed entirely on the machine, partly executed on the machine, partly executed on the machine and partly executed on the remote machine as an independent software package, or entirely executed on the remote machine or server.
[0114] In the context of the present invention, a machine-readable medium may be a tangible medium, which may contain or store a program for use by the instruction execution system, apparatus, or device or in combination with the instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include electrical connections based on one or more wires, portable computer disks, hard drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
[0115] In addition, although the operations are depicted in a specific order, this should be understood as requiring such operations to be performed in the specific order shown or in a sequential order, or requiring that all illustrated operations should be performed to obtain desired results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations individually or in any suitable subcombination.
[0116] Although the subject matter has been described in language specific to structural features and/or logical actions of the method, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely exemplary forms of implementing the claims.
PUM


Description & Claims & Application Information
We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.