Programare și securitate la nivelul arhitecturii x86

Slides:



Advertisements
Similar presentations
The PCI bus. Main features coupling of the processor and expansion bus by means of a bridge, 32-bit standard bus width with a maximum transfer rate of.
Advertisements

Peripheral Component Interconnect (PCI).
Chapter 7: System Buses Dr Mohamed Menacer Taibah University
Digital Computer Fundamentals
8086 [2] Ahad. Internal! External? 8086 vs _bit Data Bus 20_bit Address 8_bit Data Bus 20_bit Address Only external bus of 8088 is.
CSNB373: Microprocessor Systems
EECS 470 Busses in the real world Lecture 22 – Fall 2013.
Programming Super-VGA Graphics Devices Introduction to VESA graphics modes and to organization of the linear frame-buffer memory.
Accessing network hardware The Network Interface Controllers are part of a larger scheme used in modern PCs for device control.
1 TK2633TK Microprocessor Architecture DR MASRI AYOB.
University College Cork IRELAND Hardware Concepts An understanding of computer hardware is a vital prerequisite for the study of operating systems.
Detecting PCI devices On identifying the peripheral equipment installed in our PC.
Accessing the NIC A look at the mechanisms that software can use to interact with our 82573L network interface.
CPU Chips The logical pinout of a generic CPU. The arrows indicate input signals and output signals. The short diagonal lines indicate that multiple pins.
Input/Output Systems and Peripheral Devices (03-2)
PCI & PCI-E Sephiroth Kwon GRMA
Microcomputer & Interfacing Lecture 2
Computer Organization CSC 405 Bus Structure. System Bus Functions and Features A bus is a common pathway across which data can travel within a computer.
Spring EE 437 Lillevik 437s06-l2 University of Portland School of Engineering Advanced Computer Architecture Lecture 2 NSD with MUX and ROM Class.
NS Training Hardware.
PCI Team 3: Adam Meyer, Christopher Koch,
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
BUS IN MICROPROCESSOR. Topics to discuss Bus Interface ISA VESA local PCI Plug and Play.
Organisasi Sistem Komputer Materi VIII (Input Output)
80386DX. Features of 80386DX It supports 8/16/32 bit data operands It has 32-bit internal registers It supports 32-bit data bus and 32-bit non-multiplexed.
80386DX functional Block Diagram PIN Description Register set Flags Physical address space Data types.
Processor Memory Processor-memory bus I/O Device Bus Adapter I/O Device I/O Device Bus Adapter I/O Device I/O Device Expansion bus I/O Bus.
8085 Microprocessor: Architecture & Support Components.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
PCI 9052 소개 권 동혁. Contents 1.Introduction 2.Major features 3.PCI 9052RDK-LITE.
Chapter 2: Computer Function And Interconnection
Department of Computer Science and Engineering
Chapter 6 Input/Output Organization
HISTORY OF MICROPROCESSORS
Subject Name: Microprocessors Subject Code:10EC46 Department: Electronics and Communication Date:
Memory and IO Addressing
Introduction to the processor and its pin configuration
CPU Sequencing 6/30/2018.
8086 Microprocessor.
CS 286 Computer Organization and Architecture
Dr. Michael Nasief Lecture 2
8085 microprocessor.
8085 Microprocessor Architecture
Februarie 2018 ASE Bucuresti
Placa de bază.
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
William Stallings Computer Organization and Architecture 6th Edition
Dispozitive de stocare
Avalon Switch Fabric.
CONFIGURAREA SWITCHURILOR
Примери на CPU чипови и магистрали
Retele de calculatoare
Instruction cycle Instruction: A command given to the microprocessor to perform an operation Program : A set of instructions given in a sequential.
Ethernet.
Architecture & Support Components
ECEG-3202 Computer Architecture and Organization
8085 Microprocessor Architecture
Today’s agenda Hardware architecture and runtime system
I/O BUSES.
Computer Organization
第四章 80386的存贮器和输入/输出接口 作业:P335 5,7,13,17,21,25,36,37,41,44,45,46,48,52,65 21:46.
CSC3050 – Computer Architecture
8085 Microprocessor Architecture
Chapter 13: I/O Systems.
Computer Operation 6/22/2019.
CPU Sequencing 7/20/2019.
Presentation transcript:

Programare și securitate la nivelul arhitecturii x86 Prof. dr. ing. Gheorghe Sebestyen Cursul 5. Magistrala PCI, Placi PCI, PCIe Identificarea resurselor din sistem

Definire, caracteristici PCI - Peripheral Component Interconnect PCI Local Bus – magistrala universala (independenta de arhitectura, procesor) pentru conectarea unor interfete de viteza mai mare(.. dar nu foarte mare) Caracteristici: Asigura transfer pe blocuri de date Viteza de transfer 66-133-266-532 Mocteti/s Consum redus (alimentare pe 5V si 3,3V) Magistrala de 64-biti Numar redus de pini (semnale de adrese si date multiplexate) Operatii concurente pe magistrala suport pentru master de magistrala Arbitrare transparenta a magistralei Facilitati de autoconfigurare Facilitati pentru magistrala multi-master

Configuratie de magistrare

Alta vedere asupra configuratiei de magistrale CPU are 2 magistrale: Backside bus – pentru cache Frontside bus - pentru restul componentelor Conexiunea intre magistrale – prin bridge-uri Pentru controlul magistralelor – chipset-uri (nord si sud)

A treia vedere μP Chipset N S SVGA AGP PCI Mem Net Tastatura Mouse

Comparatie intre diferite magistrale Bus Type Bus Width Bus Speed MB/sec ISA 16 bits 8 MHz 16 MBps EISA 32 bits 32 MBps VL-bus 25 MHz 100 MBps 33 MHz 132 MBps PCI 64 bits 264 MBps 66 MHz 512 MBps 133 MHz 1 GBps

Terminologie PCI Initiator sau Mater Target (tinta) sau Slave Agent Detine magistrala si initiaza transferuri de date Orice initiator trebuie sa fie si o tinta (Target) Target (tinta) sau Slave Este tinta unui transfer de citire sau scriere Agent orice initiator/tinta sau (doar) tinta pe magistrala PCI

Semnale pe magistrala PCI AD[63-0] adrese si date multiplexate C/BE[7-0] – semnale pentru comenzi sau validare date Semnale pentru controlul si confirmarea selectiei sau a transferului (Interface control) Semnale de arbitrare a magistralei REQ, GNT Semnale de sistem CLK, RST Intreruperi INTA, B, C, D De testare? JTAG

Detaliere semnale PCI ACK64 # : acknowledge 64-bit transfer AD31-AD0: 32 address and data pins form the multiplexed PCI address and data bus C/BE3#-C/BE0#: command and byte-enable CLK: PCI clock signal DEVSEL#: device select FRAME: GNT#: grant IDSEL: device select during configuration INTA#, INTB#, INTC#, INTD#: interrurpt signals IRDY#: initiator ready LOCK: defines an atomic access PAR: even parity for AD31-AD0 and C/BE3#-C/BE0# PERR#: parity error

Detaliere semnale PCI PRSNT1#, PRSNT2#: indicate that an adapter is installed REQ#: request signal to the bus arbitration unit REQ64#: 64-bit transfer request RST: resets all PCI units SBO#: snoop backoff, indicates a hit to a modified cache line SDONE: snoop done SERR#: system error STOP: target-abort TCK, TDI, TDO, TMS, TRST#: JTAG boundary scan test signals TRDY: target ready 64 bit expansion AD63-AD32: 32 address and data pins form the expansion of the multiplexed PCI address and data bus C/BE7#-C/BE4# PAR64: even parity for the 64bit expansion

Tipuri de cicluri de transfer PCI INTA sequence (0000) special cycle (0001) I/O read access (0010) I/O write access (0011) memory read access (0110) memory write access (0111) configuration read access (1010) configuration write access (1011) memory multiple read access (1100) dual addressing cycle (1101) line memory read access (1110) memory write access with invalidation (1111)

Transfer “burst” de citire

Transfer “burst” de scriere

Alta vedere a unui transfer

Semnale pentru controlul unui ciclu de transfer

Spatii de adresare pe PCI Un Target PCI poate contine 3 tipuri de spatii de adresare Spatiu de configurare Contine informatii de baza despre dispozitiv (256 octeti): Permite SO sa programeze dispozitivul cu setari de operare Spatiul de I/E Folosit doar de unele periferice din calculatoarele personale (mouse, tastatura, etc.) Spatiul de memorie Folosit pentru orice altceva

Spatiul de configurare Contine informatii generale despre dispozitiv cum ar fi: producatorul sau tipul dispozitivului Permite functionare Plug-N-Play Registrele adreselor de baza permit plasarea unui agent in mod dinamic in cadrul spatiului de memorie si de I/E O setare a unei linii de intrerupere programabila permite unui driver software sa programeze o placa de PC la pornirea sistemului (fara jumpere) Contine 256 octeti din care: Primii 64 octeti (00h – 3Fh) formeaza headerul standard, predefinit in specificatiile PCI Restul de 192 octeti (40h – FFh) reprezinta un spatiu de configurare definit de utilizator Poate contine de exemplu informatii specifice pentru un anumit tip de placa (interfata) utile pentru driverul placii

Statiul adreselor de configurare Dwords DeviceID 0x1677 VendorID 0x14E4 Class Code Class/SubClass/ProgIF Revision ID Base Address 0 CardBus CIS Pointer Expansion ROM Base Address reserved Base Address 2 Base Address 4 31 0 Status Register Command BIST Cache Line Size Subsystem Device ID Vendor ID reserved capabilities pointer Minimum Grant Interrupt Pin Latency Timer Header Type Base Address 1 Base Address 3 Base Address 5 Maximum 31 0 0 -1 2 - 3 4 - 5 6 - 7 8 - 9 10 - 11 12 - 13 14 - 15

Spatii de adresare pentru un calculator PC Spatiul de adrese pentru memorie - Accesat prin adrese fizice de memorie de majoritatea instructiunilor ISAx86 Spatiu de intrare/iesire Accesat prin adrese de porturi de instructiuni IN si OUT Spatiu de memorie (4GB) Spatiul de configurare PCI Spatiu de configurare PCI (16MB) Spatiu I/E (64KB) porturile de I/E 0x0CF8-0x0CFF dedicate pentru accesarea spatiului de configurare

Accesul la spatiul de configurare PCI Port pentru adresa spatiului de configurare PCI (32 biti) 31 23 16 15 11 10 8 7 2 0 CONFADD ( 0x0CF8) E N reserved bus (8-bits) device (5-bits) function (3-bits) doubleword (6-bits) 00 Enable Configuration Space Mapping (1=yes, 0=no) Port pentru date in spatiul de configurare PCI (32-biti) 31 0 CONFDAT ( 0x0CFC)

Citirea datei de configurare varianta 1 Pasul 1: scrie adresa dorita (bus, device, function, si dword) cu bitul 31 setat pe 1 (pentru a valida accesul) la portul de adresa al spatiului de configurare Pasul 2: Citeste data dorita de la la portul de date al spatiului de configurare: # citeste campul de tip-header PCI (octetul 2 al dublucuvantului 3) pentru bus=0, device=0, function=0 mov eax, 8000000CH ;setup address in EAX mov dx,0CF8H ; setup port-number in DX out dx, eax ; output address to port mov dx, 0CFCH ; setup port-number in DX in eax,dx ; input configuration longword shr eax,16 ; shift word 2 into AL register mov header_type,al ; store Header Type in variable

Citirea datei de configurare varianta 2 (pentru sisteme PC) 4k de adrese de I/E intre c000h si cfffh

Registre adrese de baza PRF: Prefetching not possible/prefetching possible Type: Positioning type 00=any 32-bit address, 01=less than 1M, 10=any 64-bit address, 11=reserved AD: Address decoding and expansion ROM deactivated/activated

PCI Express Bus Protocol/magistrala serial(a) de tip Point-to-point x1, x2, x4, x8, x12, x16 or x32 point-to-point Link Codificare diferentiala

Sistem PCI Express de cost redus

Sistem server PCI Express performant (cost marit)

Proprietati ale PCI Express Protocol bazat pe pachete Latime de banda si frecventa de ceas 2.5 Gbits/sec/lane/direction Codificare pe 8b/10b 250 Mbytes/sec/lane/direction Satiu de adresare Memorie I/O Configurare (extins de la 256 octeti la 4 Kocteti)

Tranzactii PCI Express Transactii memory read / write I/O read / write configuration read / write new transaction type: Message transactions

Proprietati PCI Express Quality of Service (QoS) Intarzieri si latime de banda deterministe Clase de trafic (TCs) TCs diferite clase de trafic traverseaza reteaua PCI cu prioritati diferite Canale virtuale (VCs) Fiecare clasa de trafic este mapata pe un canal virtual separat

PCI Express Properties Administrarea intreruperilor Fire virtuale de intrerupere Managementul puterii/consumului de putere Stari de consum ale unui dispozitiv: D0, D1, D2, D3-Hot si D3-Cold D0 putere maxima/nominala D3-Cold nivelul cel mai scazut de consum. Starile de putere ale liniei: L0, L0s, L1, L2 si L3 Suport pentru “hot plug” Are mod de lucru compatibil PCI

PCI Express Topology

Memory Read initiat de CPU si tintit catre un punct terminal

Nivelele de dispozitiv PCI Express

Pachet Transaction Layer