• Non ci sono risultati.

• Se CR0.PG = 1 e CR4.PAE = 0 ⇒ 32-bit paging.

N/A
N/A
Protected

Academic year: 2021

Condividi "• Se CR0.PG = 1 e CR4.PAE = 0 ⇒ 32-bit paging."

Copied!
11
0
0

Testo completo

(1)

Figura 1: Segmentazione e paginazione. Il riferimento ` e alla GDT, ma pu` o essere anche alla LDT.

Paginazione

Modalit` a di paginazione

La paginazione in tre modalit` a (si veda la parte sui registri di controllo).

• Se CR0.PG = 1 e CR4.PAE = 0 ⇒ 32-bit paging.

• Se CR0.PG = 1, CR4.PAE = 1, e IA32 EFER.LME = 0 ⇒ PAE paging.

• Se CR0.PG = 1, CR4.PAE = 1, e IA32 EFER.LME = 1 ⇒ ×32e paging.

(2)

Paginazione a 32 bit

Le pagine possono essere di 4KB o 4MB. Lo standard ` e la misura di 4 KB.

Figura 2: Traduzione dell’indirizzo lineare con pagine da 4KB.

Figura 3: Traduzione dell’indirizzo lineare con pagine da 4MB.

(3)
(4)

Paginazione con PAE (32 bit)

A partire dal Pentium-Pro ` e stata introdotta (su alcuni modelli) la cosiddetta Phyical Address Extension (PAE).

A tale scopo il bus degli indirizzi ` e stato portato a 36 bit. In tal modo lo spazio fisico indirizzabile arriva a 2

36

= 2

4

× 2

32

= 64GB. Le pagine ora sono di 4KB o di 2MB. Viene introdotta una ulteriore tabella (PDPTE) puntata da CR3. Gli elementi nelle tabelle diventano di 64 bit (anzich´ e di 32 bit come in precedenza).

Ovviamente un programma in un dato momento pu` o al massimo indirizzare 4GB.

Figura 4: Traduzione dell’indirizzo lineare (pagine da 4K e PAE). In questa figura e nelle successiva non compare

CR3. In realt` a CR3 entra ancora in gioco come puntatore tabella di registri PDPT.

(5)

Figura 5: Traduzione dell’indirizzo lineare (pagine da 2M e PAE). Anche qui non viene rappresentato CR3.

(6)

Paginazione a 64 bit

I livelli crescono. Le pagine sono di 4KB o 2MB.

(7)
(8)

Registri di controllo

CR0 - Contains system control flags that control operating mode and states of the processor.

CR1 - Reserved.

CR2 - Contains the page-fault linear address (the linear address that caused a page fault).

CR3 - Contains the physical address of the base of the paging-structure hierarchy and two flags (PCD and PWT). Only the most-significant bits (less the lower 12 bits) of the base address are specified; the lower 12 bits of the address are assumed to be 0. The first paging structure must thus be aligned to a page (4-KByte) boundary. The PCD and PWT flags control caching of that paging structure in the processor’s internal data caches (they do not control TLB caching of page-directory information). When using the physical address extension, the CR3 register contains the base address of the page-directory-pointer table In IA-32e mode, the CR3 register contains the base address of the PML4 table.

CR4 - Contains a group of flags that enable several architectural extensions, and indicate operating system or executive support for specific processor capabilities.

The control registers can be read and loaded (or modified) using the moveto- or-from-control-registers forms of the MOV instruction. In protected mode, the MOV instructions allow the control registers to be read or loaded (at privilege level 0 only). This restriction means that application programs or operatingsystem procedures (running at privilege levels 1, 2, or 3) are prevented from reading or loading the control registers.

Significato di alcuni bit dei registri di controllo

PG - Paging (bit 31 of CR0) Enables paging when set; disables paging when clear.

WP - Write Protect (bit 16 of CR0) When set, inhibits supervisor-level procedures from writing into read-only pages; when clear, allows supervisor-level procedures to write into read-only pages (regardless of the U/S bit setting).

PE - Protection Enable (bit 0 of CR0) Enables protected mode when set.

PAE - Physical Address Extension (bit 5 of CR4) When set, enables paging to produce physical addresses with more than 32 bits.

PSE - Page Size Extensions (bit 4 of CR4) Enables 4-MByte pages with 32-bit paging when set.

EM - Emulation (bit 2 of CR0) Indicates that the processor does not have an internal or external x87 FPU when

set; indicates an x87 FPU is present when clear. It also affects the execution of MMX/SSE/SSE2/SSE3/SSSE3/SSE4

instructions.

(9)
(10)

Organizzazione dell’architettura IA-32e

(11)

Riferimenti

Documenti correlati

In fact, at the current rates, the number of refugees reallocated is lower than the number of asylum seekers arriving in Europe in a single month (Cerretelli,

in Mathematics, Rutgers University, New Jersey, USA 1981 Laurea in Matematica, 110 e lode, Sapienza Università di Roma.. Research Interests: Lie Theory, Vertex Operator

Example 16 is interesting not only because it is one of the few cases in which the pronoun has been rendered explicit in the Italian subtitles, but also because of the fact that it

To standardize and interpret the data collected and to facilitate comparison between different realities, in 1998 the EU has decided to finance a European surveillance network

If a process invokes the join() operation and does not leave the system for at least 3δ time units, or invokes the read() operation, or invokes the write () operation and does not

Double-balloon endoscopy permits insertion of the endoscope into regions not accessible to the conventional endoscope and allows endoscopic diagnosis of lesions in the distal

The Uppsala trial compared preoperative short-course radiotherapy versus postoperative radiotherapy to 60 Gy in patients with a tumour at stage B or C [3], and the Swedish Rectal

This effort parallels the national health care providers’ (The Swedish Board of Health and Welfare) demand that individual patient outcome should be reported from all national