GPU mainly calculates graphics conversion, such as the shadow of the graphic, the color control of the graphic, the line thickness of the graphic, and summarizes some similar graphics characteristics comprehensively, which can quickly output the pixel data of this type of graphics, which is much faster than the individual calculation of pixel data.
The way the GPU boots up is similar to the CPU, almost exactly the same, this is the detailed running process.
The first step, power the GPU, the GPU automatically runs the firmware program, the so-called firmware, is some library functions, each library function packages a basic function, such as: open, close, write and other basic functions, the operating system kernel has some applications, can directly run these firmware library functions.
These firmware are stored in ROM chips, CPU, GPU, SOC, Wifi, BT, TBT and other chips have a matching separate ROM memory chip for storing firmware programs.
The second step is to read the start address in the memory of the GPU chip ROM. This address is not fixed, but determined by the manufacturer, can also be modified by software, the default address is 0, if you want to use on different machines, stipulate that the starting address of each type of machine is the same, so that different machines can be perfectly compatible.
The third step is memory mapping, that is, assigning an address to each memory cell at the start address.
The basic structure of the memory is the storage unit, these units have an address code, the starting address starts within the size of 64KB, and an address encoding file is stored, which has many addresses, which is memory mapping.
Jump to other storage units through the address in the address encoding file, each storage unit corresponds to a storage block, and important functions are stored in the storage fast.
This address encoding file is also called virtual memory. Virtual memory is divided into two parts:
User space: Stores user code and data
Kernel space: Holds operating system code
Step 4: Program jump.
There are three blocks, BL0, BL1, BL2.
BL0 stores important data, these data are some boot chip control programs, such as chip power supply, chip operation, chip stop, the program can also be modified at any time, each operating system specified programs are different.
BOOTSE=0x07C0/*Set BL1 Start Address*/
jmpl$BOOTSEG, $start 2/*BOOTSEG is the segment address 0x07C0, jump to start2*/
start2:
movw%cs,%ax
movw%ax,%ds
movw%ax,%es
movw%ax,%ss
movw$0x7c00,%sp/*Jump to BL1*/
BL0 finishes running, runs BL1, BL1’s data area is some initialization instructions, copy operating system data to memory, the action is as follows:
1. Initialize the memory
2. Initialize the clock
3. Copy the operating system bootloader from storage to memory
During BL1, run BL2, which is used to allocate memory to the kernel.
SECTIONS
{
.=0x23E00000;/*Address to jump from BL1*/
. text:{/*Code snippet: A memory area used to store the code that the program executes*/
start.o
*(.text)
}
. data:{/* Data Section: A memory area used to store the initialized global variables in the program. */
*(.data)
}
bss_start=.;
. bss:{/*BSS segment: A memory area used to hold uninitialized global variables in the program*/
*(.bss)
}
bss_end=.;
}
BL0 maximum 64K, BL1 maximum 16K, will jump to BL2 during running, if the program stored in BL1 is executed, it will jump to BL0 again to continue to execute the data in BL0.
In the fifth step, run the Main() function.
After executing the first four steps, the initialization of the computer has been completed, the required chips have all been run in standby, and the kernel has allocated memory space, then start the last step, run the operating system Main program, intMain(){……};
Through the above process, it can be clearly known that the graphics card is linked to the game engine through the code in the Main() function, and it is also necessary to call the library functions in the firmware program, in order to enhance the efficiency of the GPU, it is also necessary to constantly adjust the code parameters in BL0, BL1, BL2.
To sum up, the so-called CPU, GPU design and operating system design is not a great secret at all, but requires a lot of work to carefully debug, essentially mathematical calculations, tens of thousands of scientific researchers in Redstone City have been doing this research for hundreds of years, most of which is used in materials research and mathematical research.
While Fang Hao was obsessed with game engine and GPU research, an epoch-making story occurred in Redstone City.
Honghuang’s first mobile phone, the kamikaze mobile phone, was born, this mobile phone uses LCD screen, physical buttons, lead-zinc batteries, resin shells, and the most cutting-edge semiconductor chip manufacturing, which exploded the trend as soon as it was born.
Because although the computer is magical, but the size is not small, the mobile phone is only the size of a palm, you can display text on it, browse the web, etc., although the performance is not strong enough, but it is an epoch-making product.
##########
“Brother Hao, this kamikaze group is so hateful that it actually stole our research data, and the research and development of mobile phones ran ahead of us.” In the brilliant laboratory, He Feng ran in angrily and said, holding a mobile phone in his hand.
“Hey, I haven’t been out for months, and my phone has appeared?” Fang Hao took the mobile phone in Hefeng’s hand, checked it, and asked in surprise.
The mobile phone is indeed exquisite, and it is very different from the mobile phone in the previous life
“However, they stole our research results, and we just wanted to announce the completion of the mobile phone research, and they announced the news earlier.” He Feng was very angry.
“Interesting, how did they steal it? You have so many Wu Clan masters, I don’t believe they can steal them quietly. Fang Hao asked strangely.
“They were stolen through the network, all our data was placed on the server, but there were traces of downloads on the server, and the IP was Kamikaze Group’s.” He Feng said.
Fang Hao entered the name of the Kamikaze Group on the Internet, and quickly searched for the information of the Kamikaze Group.
Kamikaze Group, a technology company established in Redstone City ten years ago, has a strong research lineup, and the leader is a Taiyi Golden Immortal powerhouse, but this Taiyi Jinxian powerhouse is a scientific and technological cow with a lot of achievements in the technology industry.
You'll Also Like
-
Start from the God of Death and break through the world
Chapter 293 7 hours ago -
Evening Bell Church
Chapter 729 8 hours ago -
Players' NPC boss
Chapter 802 9 hours ago -
After becoming Noah, choose Gagra
Chapter 256 9 hours ago -
The copy has 0 error tolerance, and the last words on the ground are all wrong for me
Chapter 197 11 hours ago -
After the Lord of the Abyss awakens
Chapter 151 11 hours ago -
I created the Gods
Chapter 67 11 hours ago -
It is better to be a demon than a god. All demons are created by me.
Chapter 237 12 hours ago -
One Piece: Building the Roxas Empire
Chapter 165 14 hours ago -
My little sister is too Versailles
Chapter 134 14 hours ago