Linux core - Chapter 1 hardware foundation

xiaoxiao2021-03-05  26

Chapter 1 Hardware Foundation

An operating system must be closely coupled with its support-hardware system. Operating system requires some only by hardware

Some services are available. For a good understanding of the Linux operating system, the reader needs to understand some of the low hardware knowledge.

This chapter describes some of the hardware of contemporary PC system.

In January 1975, when the "Popular Electronics" magazine gave a photo of Altair 8080 on its cover, a leather

The life will begin.

The price at Altair 8080 is not $ 397. For today, its Intel 8080 processor, 256-byte inside

Save, no screen and keyboard configuration is negligible. Its inventors ED ROBERTS referred to in its new invention

"Personal computer".

Computer enthusiasts see Altair's potential and start writing software for it and configures hardware on it. For these pioneers

For example, this is a freedom to get rid of the batch-based large machine. Some dropped students through these students

A huge wealth has been achieved overnight overnight. A large number of hardware devices have appeared in the market. Software HACKERS

I am very happy to write software for these new machines. Interestingly, IBM has created contemporary PC - IBM in 1981

The PC is used to use in 1982. At that time, the IBM PC configuration was Intel 8088 processor, 64K memory (scalable)

256K), two soft disk and a 80-character, 25 row of CGA display adapters. In 1983, IBM launched IBM

PC-XT contains a 10M hard disk. Soon, many companies, such as Compaq, launched the IBM PC compatible machine.

The architecture of the PC becomes an industrial standard. This industrial standard makes a lot of hardware companies in a basis.

Competition. This makes the PC prices get cheaper. Many structural features of early PC are inherited by modern PC. example

For example, even if the advanced Intel Pentium Pro system is also running in address mode of Intel 8086 at the beginning. When Linus

When Torvald started LinUX, he chose the most, the price, the price, the more affordable Intel 80386 PC.

Figure 1.1 A typical PC motherboard

Seeing a PC from the outside, the most obvious part is a system host, keyboard, mouse, and a display. Most systems are still

CD ROM. If you want to protect the data, you can have a tape drive for data backup. These devices are generally called peripherals.

Although the CPU is the main control component of the system, it is not the only smart in the system. All peripheral controllers, for example, IDE control

There are certain intelligent components. In the interior of a PC (as shown in Figure 1.1), the reader can see a motherboard containing the CPU.

Memory and some ISA or PCI peripheral controller slots. Some controllers, such as IDE disk controllers, may be directly made on the system board.

1.1 CPU

CPU, or microprocessor, is the heart of any computer system. CPU calculates by reading and performing instructions in memory,

Row logic operation and management quantity flow.

(About the CPU) About the CPU, please refer to the relevant books)

1.2 memory

All systems have a hierarchy of memory. The speed and size of each layer are different. The fastest memory is buffer (cache)

The reservoir is used to temporarily store the contents of the main memory. This memory is very fast but the price is very expensive, so most processors are only included in the chip.

There are few Cache memory. More, on the system board. Some processors are mixed in Cache to store data and instructions; some are separated

Store. A cache is an instruction; other Cache is data. The alpha processor contains two internal storage cache; D-Cache is

Store data; i-cache is the storage instruction. External Cache (B-Cache) mixed storage data. Finally, the storage architecture is the main memory. The main memory is slower relative to the external Cache. If compared with Cache inside the CPU, the speed of the main memory is like climbing.

The cushion must be consistency between the buffer and the main memory. In other words, if one word in the main memory is one or more places in Cache

Square, the system must ensure that the contents in Cache are consistent with the main memory. Part of the Cache consistency is completed by hardware, one is

There is a operating system complete. This is the same for most systems. Software and hardware in the system must cooperate with each other.

1.3 bus

The components on the system board are connected via a bus. Three logical functions outside the system generalline: address bus, data bus and control bus. address

The bus specifies the address of the data transfer. The data bus is responsible for transporting data to be transmitted. The data bus is two-way. Allow data to read into CPU and from

The CPU is written. The control bus contains some signal lines to control other control signals in the timing and the system.

1.4 controller and peripheral

Peripherals are real devices such as display cards or disks. The peripherals are controlled by the controller on the system board. IDE disk by IDE controller

Chip control; SCSI disk is controlled by the SCSI disk controller. Between the controller, the controller is connected to the CPU through the bus. Most lines

The components of the system are connected to the PCI and ISA bus. The controller is the same as the CPU, which can be seen as a smart assistant of the CPU.

The CPU is the control center of the system.

All controllers are different. But usually they have some registers used to control. The software running on the CPU must be able to

Read and write these control registers. A register may contain a state used to describe errors; another register may be used

As the control, such as changing the mode of the controller. Each controller on the bus can be accessed by the CPU separately. So the device is driven

The program software can write the above registers to control these controllers.

1.5 address space

The system bus connects the CPU to the main memory, which is separate from the bus connected to the system hardware peripheral. Overall, hardware peripherals

The occupied storage space is called I / O space. The CPU can access system storage or access I / O space. however

The controller can only access the system main memory with the help of the CPU. From the perspective of the device, such as a floppy controller, it can only see

It controls the address of the ISA space in the register. In general, the CPU uses different instruction systems to access system memory and

I / O space. For example, there may be an instruction "read one byte from I / O address 0x3f0 to register X". CPU is like this

Read and write the control system's hardware peripheral. In I / O space, some common hardware peripherals (Ide controller, serial port,

The register address of the floppy disk drive, etc.) has been fixed. For example, 0x3f0 is exactly a control register of serial port (COM1).

Sometimes, the controller needs to transmit a large amount of data between the system main memory. For example, write data into a disk. In this case, directly

Save Access (DMA) controller is used to allow hardware peripherals directly access system memory. But this process is the strict control of the CPU and

Under supervision.

1.6 timer

All operating systems need to know time. Therefore, the PC contains a special device called real time clock.

RTC provides two functions: daily time and accurate time pulse. RTC has its own level. So even if the PC does not turn on the power,

RTC is also running. This is why your PC has been updated. The time pulse provided by RTC makes the operating system

Accurate scheduling must work.

转载请注明原文地址:https://www.9cbs.com/read-38170.html

New Post(0)