This document provides an overview of core Linux concepts related to hardware configuration and system administration. It covers key areas like enabling and disabling peripherals, different storage device types, hardware IDs and settings. It also defines terms like BIOS, buses, ports, interrupts and DMA channels that are used to interface hardware devices with the CPU. Specific commands to view hardware information are also outlined, such as lspci and examining files in the /proc directory.
The conversion of the ARM Linux kernel over to the Device Tree as the mechanism to describe the hardware has been a significant change for ARM kernel developers. Nowadays, all developers porting the Linux kernel on new ARM platforms, either new SOCs or new boards, have to work with the Device Tree. Based on practical examples, this talk intends to provide a ""getting started guide"" for newcomers in the Device Tree world: what is the Device Tree? How is it written and compiled? How do the bootloader and kernel interact? How are Device Tree bindings written and documented? What are the best practices for writing Device Trees and their bindings?
Video available at https://www.youtube.com/watch?v=m_NyYEBxfn8.
The conversion of the ARM Linux kernel over to the Device Tree as the mechanism to describe the hardware has been a significant change for ARM kernel developers. Nowadays, all developers porting the Linux kernel on new ARM platforms, either new SOCs or new boards, have to work with the Device Tree. Based on practical examples, this talk intends to provide a ""getting started guide"" for newcomers in the Device Tree world: what is the Device Tree? How is it written and compiled? How do the bootloader and kernel interact? How are Device Tree bindings written and documented? What are the best practices for writing Device Trees and their bindings?
Video available at https://www.youtube.com/watch?v=m_NyYEBxfn8.
[DEFCON 16] Bypassing pre-boot authentication passwords by instrumenting the...Moabi.com
Pre-boot authentication software, in particular full hard disk encryption software, play a key role in preventing information theft. In this paper, we present a new class of vulnerability affecting multiple high value pre-boot authentication software, including the latest Microsoft disk encryption technology : Microsoft Vista's Bitlocker, with TPM chip enabled. Because Pre-boot authentication software programmers commonly make wrong assumptions about the inner workings of the BIOS interruptions responsible for handling keyboard input, they typically use the BIOS API without flushing or initializing the BIOS internal keyboard buffer. Therefore, any user input including plain text passwords remains in memory at a given physical location. In this article, we first present a detailed analysis of this new class of vulnerability and generic exploits for Windows and Unix platforms under x86 architectures. Unlike current academic research aiming at extracting information from the RAM, our practical methodology does not require any physical access to the computer to extract plain text passwords from the physical memory. In a second part, we will present how this information leakage combined with usage of the BIOS API without careful initialization of the BIOS keyboard buffer can lead to computer reboot without console access and full security bypass of the pre-boot authentication pin if an attacker has enough privileges to modify the bootloader. Other related work include information leakage from CPU caches, reading physical memory thanks to firewire and switching CPU modes.
Franchise opportunity from IIHT. Having pioneered most of the certification courses in India, IIHT has mastered the process of delivery of training on products and certification courses.
[DEFCON 16] Bypassing pre-boot authentication passwords by instrumenting the...Moabi.com
Pre-boot authentication software, in particular full hard disk encryption software, play a key role in preventing information theft. In this paper, we present a new class of vulnerability affecting multiple high value pre-boot authentication software, including the latest Microsoft disk encryption technology : Microsoft Vista's Bitlocker, with TPM chip enabled. Because Pre-boot authentication software programmers commonly make wrong assumptions about the inner workings of the BIOS interruptions responsible for handling keyboard input, they typically use the BIOS API without flushing or initializing the BIOS internal keyboard buffer. Therefore, any user input including plain text passwords remains in memory at a given physical location. In this article, we first present a detailed analysis of this new class of vulnerability and generic exploits for Windows and Unix platforms under x86 architectures. Unlike current academic research aiming at extracting information from the RAM, our practical methodology does not require any physical access to the computer to extract plain text passwords from the physical memory. In a second part, we will present how this information leakage combined with usage of the BIOS API without careful initialization of the BIOS keyboard buffer can lead to computer reboot without console access and full security bypass of the pre-boot authentication pin if an attacker has enough privileges to modify the bootloader. Other related work include information leakage from CPU caches, reading physical memory thanks to firewire and switching CPU modes.
Franchise opportunity from IIHT. Having pioneered most of the certification courses in India, IIHT has mastered the process of delivery of training on products and certification courses.
Top 10 electronics sales interview questions and answerschristinacami84
In this file, you can ref interview materials for electronics sales such as types of interview questions, electronics sales situational interview, electronics sales behavioral interview…
These are notes I made while I was studying. The Linux community is so friendly and shares so much, so I am uploading my work to give back to the community. You won't find answers to test questions here, but you will find some solid notes around each of the exam points.
BIOS (basic input/output system) is the program a personal computer's microprocessor uses to get the computer system started after you turn it on. It also manages data flow between the computer's operating system and attached devices such as the hard disk, video adapter, keyboard, mouse and printer.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
2. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Key Knowledge Areas
1.Enable and disable integrated peripherals.
2.Configure systems with or without external peripherals such as keyboards.
3.Differentiate between the various types of mass storage devices.
4.Set the correct hardware ID for different devices, especially the boot device.
5.Know the differences between coldplug and hotplug devices.
6.Determine hardware resources for devices.
7.Tools and utilities to list various hardware information (e.g. lsusb, lspci, etc.)
8.Tools and utilities to manipulate USB devices
9.Conceptual understanding of sysfs, udev, hald, dbus
System Architecture
Determine and configure hardware settings
Terms and Utilities
/sys /proc
/dev modprobe
lsmod lspci
lsusb
2
5. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
BIOS settings
A modern personal computer (or PC) system consists of a central processing unit
(CPU) for performing calculations, along with some memory for storing the data
that the processor is using.
To make such a device useful, we attach peripheral devices, such as keyboards,
mice, displays, hard drives, CD or DVD drives, printers, scanners, and network
cards, which allow us to enter, store, print, display, and transmit data.
The memory used by the processor is called Random Access Memory (RAM).
In a typical PC, this memory is volatile, meaning that it requires power to keep its
data. Turn off the PC and the memory is wiped clean.
When we turn off a PC, we turn it into a collection of hardware components that
will do nothing until reprogrammed.
This reprogramming occurs when we turn on the machine; the process is called
bootstrapping or booting the computer.
System and BIOS overview
5
6. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
BIOS settings
The process of booting involves loading an operating system from an external
storage device, such as a floppy disk, CD, DVD, hard drive, or memory key.
The program that does this initial loading is permanently stored in the computer
and is called the Basic Input Output System (BIOS).
The BIOS is stored in non-volatile memory called Read Only Memory (ROM).
Bootstrap process and BIOS
Updating the BIOS meant replacing the ROM chip.
Later, Electrically Erasable Programmable Read Only Memories (EEPROMs) were
used. EEPROMs allowed BIOS upgrade in field with a diskette instead of special tools.
Today you will more often find a form of non-volatile memory -Flash memory,
which is also used in digital cameras and memory keys.
Flash memory also permits BIOS upgrades in the field.
6
9. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
BIOS settings
1. CMOS memory chip for BIOS settings (Complementary Metal Oxide Semiconductor).
2. ROM chip containing the BIOS code
3. Battery CMOS settings are not lost when the power goes off.
BIOS architecture
In recent times, the BIOS has been relegated to a more limited set of functions:
•Power on self test. (P.O.S.T.) This includes testing the memory (although the test is not exhaustive).
•Putting the hardware in a sane an predictable state
(set display card's video; timing parameters to use text mode; setting power manag; initialising hd dsks)
• Chipset specific configuration for your machine (configuring the PCI bus and builtin peripherals)
• Loading the operating system from the disk (from floppy disk, IDE disk, SCSI, network ...)
• Providing basic I/O (keyboard, floppy, hard disk, CDROM).
9
11. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Buses, ports, IRQs, and DMA
Peripheral devices, including those that may be built in to the system board,
communicate with the CPU over a bus.
PCI and ISA buses /proc/{ioports,interrupts,dma,pci}
Common bus type is the Peripheral Component Interconnect or PCI bus
Which superseded earlier Industry Standard Architecture or ISA bus.
ISA bus - AT bus after the IBM PC-AT first used in 1984.
During transition from ISA to PCI bus, systems included both buses with slots.
ISA bus supports 8-bit and 16-bit cards, PCI bus support 32-bit and 64-bit devices.
Systems include Accelerated Graphics Port or AGP slot
special slot based on the PCI 2.1 bus optimized for high bandwidth for graphics cards.
replaced by PCI Express or PCI-E bus which addresses limitations of original PCI design.
11
13. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Buses, ports, IRQs, and DMA
/proc/pci
yourname@yourcomp~> cat /proc/pci
PCI devices found:
Bus 0, device 0, function 0:
Host bridge: Intel Corp. 82845G/GL [Brookdale-G] Chipset Host Bridge
(rev 1).
Prefetchable 32 bit memory at 0xd0000000 [0xdfffffff].
Bus 0, device 2, function 0:
VGA compatible controller: Intel Corp. 82845G/GL [Brookdale-G] Chipset
Integrated Graphics Device (rev 1).
IRQ 11.
Prefetchable 32 bit memory at 0x88000000 [0x8fffffff].
Non-prefetchable 32 bit memory at 0x80000000 [0x8007ffff].
Bus 0, device 29, function 0:
USB Controller: Intel Corp. 82801DB USB (Hub #1) (rev 1).
IRQ 11.
I/O at 0x1800 [0x181f].
...//...
Bus 2, device 8, function 0:
Ethernet controller: Intel Corp. 82801BD PRO/100 VE (LOM) Ethernet
Controller (rev 129).
IRQ 9.
Master Capable. Latency=66. Min Gnt=8.Max Lat=56.
Non-prefetchable 32 bit memory at 0xc0100000 [0xc0100fff].
I/O at 0x2000 [0x203f].
Ex:
13
14. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Buses, ports, IRQs, and DMA
/sbin/lspci
yourname@yourcomp~> /sbin/lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT8501 [Apollo MVP4] (rev 03)
00:01.0 PCI bridge: VIA Technologies, Inc. VT8501 [Apollo MVP4 AGP]
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev
19)
00:07.1 IDE interface: VIA Technologies, Inc. VT82C586B PIPC Bus Master IDE
(rev 06)
00:07.2 USB Controller: VIA Technologies, Inc. USB (rev 0a)
00:07.4 Non-VGA unclassified device: VIA Technologies, Inc. VT82C686 [Apollo
Super
ACPI] (rev 20)
00:07.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio
Controller (rev 21)
00:0a.0 CardBus bridge: O2 Micro, Inc. OZ6832/6833 Cardbus Controller (rev 34)
00:0a.1 CardBus bridge: O2 Micro, Inc. OZ6832/6833 Cardbus Controller (rev 34)
01:00.0 VGA compatible controller: Trident Microsystems CyberBlade/i7d (rev 5c)
Ex:
14
15. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Buses, ports, IRQs, and DMA
When CPU needs to communicate with peripheral device it does through IO port
or sometimes just simply port.
When CPU wants to send data or control info to peripheral, it writes to a port.
When device has data or status ready for the CPU, the CPU reads the data or
status from a port.
IO Ports /proc/{ioports,interrupts,dma,pci}
Most devices have more than one port associated with them,
power of 2, as 8, 16 or 32. Data transfer is usually done a byte or two at a time.
Devices cannot share ports, so if you have ISA cards, you must ensure that each
device has its own port or ports assigned.
Originally, this was done using switches or jumpers on the card.
later ISA cards used a system called Plug and Play.
PCI cards and later all have PnP configuration.
15
16. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Buses, ports, IRQs, and DMA
Within /proc file system, file /proc/ioports tells about IO ports available on system
and in use by devices for which a kernel module is loaded.
If two devices use the same IO ports, then it is unlikely that they will work
together.
One of them needs to be reconfigured – either by changing jumper settings, plug and play
settings, or reconfiguring internal peripherals.
IO Ports /proc/{ioports,interrupts,dma,pci}
Standard I/O Port Settings
1FO-1F8 - Hard Drive Controller, 16-bit ISA
200-20F - Game Control
210 - Game I/O
220 - Soundcard
278-27F - LPT2
2F8-2FF - COM2
320-32F - Hard Drive Controller, 8-bit ISA
378-37F - LPT1
3B0-3BF - Monochrome Graphics Adapter (MGA)
3D0-3DF - Colour Graphics Adapter (CGA)
3F0-3F7 - Floppy Controller
3F8-3FF – COM1
16
17. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Buses, ports, IRQs, and DMA
/proc/ioports
yourname@yourcomp~> cat /proc/ioports
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0070-007f : rtc
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
01f0-01f7 : ide0
03f8-03ff : serial(auto)
0cf8-0cff : PCI conf1
1000-10ff : VIA Technologies, Inc. VT82C686 AC97 Audio Controller
1000-10ff : via82cxxx_audio
1400-141f : VIA Technologies, Inc. UHCI USB
1400-141f : usb-uhci
Ex:
I/O port ranges are listed in hexadecimal.
The kernel tracks their port numbers so that it can prevent unexpected interference in
their operation (user space programs).
17
18. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Buses, ports, IRQs, and DMA
So how does the CPU know when the last output is finished or
when data is waiting to be read?
Interrupts /proc/{ioports,interrupts,dma,pci}
this information is available in a status register which may be accessed by reading
one (or more) of the IO ports associated with a device.
This as 2 problems:
1.CPU has to spend time checking the status
2.if the device has data coming from somewhere, such as an attached modem, the data must
be read by the CPU in a timely fashion otherwise it might be overwritten by the next available
data byte
The dual problems of not wasting unnecessary CPU cycles and ensuring that data is
read or written in a timely fashion are addressed by the concept of interrupts.
18
19. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Buses, ports, IRQs, and DMA
Interrupts /proc/{ioports,interrupts,dma,pci}
Interrupts are also called Interrupt Requests or IRQs.
When something happens in a device that CPU needs to know about, the device raises an
interrupt and CPU temporarily stops whatever else it was doing to deal with the situation.
Standard IRQ Settings
IRQ 0 - System Timer
IRQ 1 - Keyboard
IRQ 2(9) - Video Card
IRQ 3 - COM2, COM4
IRQ 4 - COM1, COM3
IRQ 5 - Available (LPT2 or Sound Card)
IRQ 6 - Floppy Disk Controller
IRQ 7 - LPT1
Standard IRQ Settings
IRQ 8 - Real-Time Clock
IRQ 9 - Redirected IRQ 2
IRQ 10 - Available
IRQ 11 - Available
IRQ 12 - PS/2 Mouse
IRQ 13 - Math Co-Processor
IRQ 14 - Hard Disk Controller
IRQ 15 – Available
Interrupt numbers are decimal in the range 0 through 15.
Originally, each device had its own private IRQ
19
23. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Buses, ports, IRQs, and DMA
boot messages view
Messages displayed during boot up correspond to kernel initializing the devices installed in
the system. The messages are usually appended to var/log/messages, and can be
displayed with dmesg after the system has booted up.
We can use the output to filter from the bootstrap messages about IRQs or DMA
dmesg
yourname@yourcomp~> dmesg | grep -i irq
PCI: Discovered primary peer bus 01 [IRQ]
PCI: Using IRQ router PIIX [8086/24c0] at 00:1f.0
PCI: Found IRQ 5 for device 00:1f.1
PCI: Sharing IRQ 5 with 00:1d.2
Serial driver version 5.05c (2001-07-08) with MANY_PORTS MULTIPORT … // …
Ex:
yourname@yourcomp~> dmesg | grep -i dma
ide0: BM-DMA at 0x1860-0x1867, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc:DMA, hdd:DMA
hda: 312581808 sectors (160042 MB) w/8192KiB Cache,
CHS=19457/255/63, UDMA(100)
hdc: 398297088 sectors (203928 MB) w/7936KiB Cache,
CHS=24792/255/63, UDMA(33)
ehci-hcd 00:1d.7: enabled 64bit PCI DMA
23
24. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Plug and play
Early PCs allocated fixed port numbers and IRQs for particular devices, such as
keyboard or parallel printer port.
This made it difficult to add new devices or even run two devices of the same type such as
two modems or two printers.
Plug and Play
The first serial port was usually called COM1 and the second COM2. Linux systems
usually refer to these as ttyS0 and ttyS1. Some cards were configurable usually
with hardware jumpers which allowed a modem to operate as COM1 or COM2.
As devices proliferated and the original space allocated for IO port addresses and
IRQs became scarce, Plug and Play or PnP was developed.
The idea was to allow a device to tell the system how many and what kind of
resources it needed and the BIOS to then tell the device which particular
resources it should use.
24
25. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Plug and play
This semi-automatic configuration was introduced with the IBM PS/2 which used a
bus architecture called microchannel.
Later, the idea, and the plug and play name were used for ISA cards,
particularly modems and sound cards which were popular add-on cards.
PCI and later buses advanced the idea and devices are inherently plug and play.
Plug and Play
In ISA Cards:
Ports cannot be shared between two devices; each device must have its own port.
The same applies for DMA channels, and in general cannot share IRQs
You may be able to resolve conflicts using tools to reassign some of the ports or IRQs on non-
PnP devices in order to get a working system.
25
30. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
IDE Hard drives
BIOS is involved in the usage of IDE disks:
1.BIOS must load the essential parts of the operating system from the disk during booting.
2.BIOS must provide correct information about the installed media to the operating system.
This information is the number of cylinders, heads and sectors on the disk.
•In the past these used to correspond to nº. spinning platters, nº. magnetic read-write heads and density
of the magnetic media.
•Although most hard disks have 1 read-write head, the nº. reported depends on the size of the disk.
BIOS and IDE drive sizes
In order to do the task of loading the operating system, the operating system
loader has to request data from exact locations on the disk.
Interrupt 13h
BIOS function to read a sector of data from disk is accessed via software interrupt,
interrupt 13h (hexadecimal).
To read from disk using interrupt 13h, you specify exact head, cylinder and sector numbers.
30
31. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
IDE Hard drives
IDE drives are formatted into sectors, data units of 512 bytes.
A drive might contain multiple rotating disk platters, so the sectors are arranged in
concentric circles with each circle called a cylinder.
Data from a particular platter is read or written by a head.
To find data in a particular sector, the disk moves the head assembly to the
cylinder, selects the appropriate head and waits for the right sector to come under
the head.
This is the disk geometry notion or CHS (Cylinder, Head and Sector) addressing.
disk geometry
Disk geometry refers to the logical dimensions of the disk –
how many cylinders, heads and sectors the disk controller can access.
31
32. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
IDE Hard drives
Early BIOS implemented a limit to the size permitted for each of C, H and S values
and DOS, implemented a different limitation.
During the 1990s, Disk sizes quickly outstripped the artificial CHS limitations
imposed by BIOS and DOS.
Several intermediate strategies involved translating real CHS values to "virtual"
values that would meet the constraints, either in the BIOS itself or by means of
low level software routines such as Ontrack's Disk Manager software.
BIOS and IDE drive sizes
Even without the artificial limits of BIOS or DOS, the CHS design allows for up to
65536 cylinders, 16 heads, and 255 sectors/track.
This limits the capacity to 267386880 sectors, or approximately 137 GB.
Note: disk capacities, unlike some other PC values, are measured in powers of 10, 1GB=1,000,000,000 bytes.
32
33. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
IDE Hard drives
The solution was to have the system ignore the geometry and leave that to the
drive to figure out.
The system, instead of asking for a CHS value simply asks for a Logical Block
Address or LBA and the drive electronics figure out which real sector to read or
write.
The process was standardized in 1996 with the adoption of the ATA-2 standard
(ANSI standard X3.279-1996, AT Attachment Interface with Extensions).
BIOS and IDE drive sizes
BIOS is needed to boot a system, so booting from a hard drive requires that the
BIOS understand enough of the disk layout to locate and load the initial program
that will then load the full operating system.
An older BIOS that does not understand LBA disks will probably be limited to booting from
within the first 1024 cylinders of a disk, or at least the first 1024 cylinders as the BIOS
understands the disk geometry!
33
34. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
IDE Hard drives
Many Linux partitioning tools will warn you that a partition extends beyond the
1024 cylinder limit
BIOS and IDE drive sizes
Summary of limits
The various modes of accessing a disk are subject to the following limitations:
Method Disk size limit Cylinders Bits
Normal mode (CHS addressing) 504Mb 1024 24
Interrupt 13h 8.4Gb 1024 24
Large mode (ECHS addressing) 8.4Gb 16384 24
ATA interface 128Gb - 28
Interrupt 13h extended 9.4 x 1021
bytes - 32
LBA mode 9.4 x 1021
bytes - 32
There’s kernel patchs to address disks with up to 48 /64 bits.
34
AHCI (Advanced Host Controller Interface)
application programming interface that defines one mode of operation for SATA.
Read more: Difference Between AHCI and IDE | Difference Between | AHCI vs IDE
http://www.differencebetween.net/technology/difference-between-ahci-and-ide/#ixzz1kaVH2SiX
36. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
IDE Hard drives
To show the disk available on a Linux system use the hdparm -I /dev/hda command.
Linux and IDE drive sizes
hdparm
/dev/hda:
ATA device, with non-removable media
Model Number: Maxtor 6Y250P0
Serial Number: Y638VBWE
Firmware Revision: YAR41BW0
Standards:
Supported: 7 6 5 4
Likely used: 7
Configuration:
Logical max current
cylinders 16383 65535
heads 16 1
sectors/track 63 63
--
CHS current addressable sectors: 4128705
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 490234752
device size with M = 1024*1024: 239372 MBytes
device size with M = 1000*1000: 251000 MBytes (251 GB)
.. // ..
Ex:
Note that CHS values limit addressing to 4,128,705 sectors and the LBA value is set to 268,435,455
sectors or 137GB. These values together imply that the real capacity is in the LBA48 value.
This is 490,234,752 sectors or 251GB.
36
37. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
IDE Hard drives
By default, a PC will boot from the first IDE drive in the system.
systems have BIOS settings that will allow you to override this, but most will boot this way.
The system will first load a small piece of code from the master boot record and that will, in
turn, provide information on which partition to boot. (Linux boot loaders)
Boot Order and MBR
Linux disk names
A important Linux file system, is the /dev filesystem.
Like /proc, is a pseudo file system which describes the devices that are or could be on a Linux system.
Within /dev filesystem there are entries as /dev/hda, /dev/hda5, /dev/sda, /dev/sdb1, etc.
There are entries for other device types, and disks they start with: /dev/hd or /dev/sd.
Devices that start with /dev/hd, such as /dev/hda or /dev/hda5 refer to IDE drives.
The 1st drive on 1st IDE controller is /dev/hda, the 2nd drive on 1st IDE controller is /dev/hdb;
The 1st drive on 2st IDE controller is /dev/hdc, the 2nd drive on 2st IDE controller is /dev/hdd;
37
39. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
IDE Hard drives
System has 2 IDE drives (hda and hdc) and a DVD-RW drive (hdd). No hdb, indicating that there is no
second drive on the first IDE controller. Drive hdc is actually a container (or extended partition) for the
logical partitions - Primary partition (hdc1) 4 logical partitions (hdc5, hdc6, hdc7, and hdc8).
An IDE drive can have up to four primary partitions and an unlimited number of logical partitions.
Hard drives found during bootup
yourname@yourcomp~> dmesg | grep "[hs]d[a-z]"
Kernel command line: ro root=LABEL=RHEL3 hdd=ide-scsi
ide_setup: hdd=ide-scsi
ide0: BM-DMA at 0x1860-0x1867, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc:DMA, hdd:DMA
hda: WDC WD1600JB-00EVA0, ATA DISK drive
hdc: Maxtor 6Y200P0, ATA DISK drive
hdd: SONY DVD RW DRU-700A, ATAPI CD/DVD-ROM drive
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 312581808 sectors (160042 MB) w/8192KiB Cache,
CHS=19457/255/63, UDMA(100)
hdc: attached ide-disk driver.
hdc: host protected area => 1
hdc: 398297088 sectors (203928 MB) w/7936KiB Cache,
CHS=24792/255/63, UDMA(33)
hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 hda9 hda10 hda11 >
hdc: hdc1 < hdc5 hdc6 hdc7 hdc8 >
hdd: attached ide-scsi driver.
Ex:
39
40. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
IDE Hard drives
Historically, devices such as sda and sdb were SCSI disks.
From 2.4 kernel, IDE CD and DVD devices were usually handled through SCSI emulation.
Device often appeared in /dev as something like /dev/cdrom which was a symbolic link to the SCSI emulated device.
Hard drives found during bootup
yourname@yourcomp~> dmesg | grep "[hs]d[a-z]"
Kernel command line: ro root=LABEL=RHEL3 hdd=ide-scsi
ide_setup: hdd=ide-scsi
ide0: BM-DMA at 0x1860-0x1867, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc:DMA, hdd:DMA
hda: WDC WD1600JB-00EVA0, ATA DISK drive
hdc: Maxtor 6Y200P0, ATA DISK drive
hdd: SONY DVD RW DRU-700A, ATAPI CD/DVD-ROM drive
..// ..
hdd: attached ide-scsi driver.
Ex:
yourname@yourcomp~> ls -l /dev/cdrom
lrwxrwxrwx 1 root root 9 Jan 11 17:15 /dev/cdrom -> /dev/scd0
Ex:
Ex. show that /dev/cdrom is link to /dev/scd0 rather than to /dev/hdd as might have been expected.
•Kernel parameter hdd=ide-scsi is the indicator that the ide-scsi driver was attached for hdd in scd
Today, both USB and SATA storage devices appear as sd, rather than hd, devices.
40
43. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Legacy peripherals
The legacy parallel ports are known as LPT1 through LPT4
Usually only two are present.
A system with single parallel port
will use default base address and IRQ for LPT1 = IO port 378 and IRQ 7.
Parallel ports (LPTn)
Parallel Ports Standard IO port addresses and IRQs:
Name Address IRQ Linux device
LPT1 378-37F 7 /dev/lp0
LPT2 278-27F 5 /dev/lp1
LPT* 3BC-3BE /dev/lp2
Note that IO ports 3BC-3BE were originally used on a Hercules graphics adapter that also had
a parallel port. Many BIOS systems will assign this range to LPT1 and then the other two
ranges would become LPT2 and LPT3 respectively instead of LPT1 and LPT2
Many systems do not use interrupts for printers, so the IRQ may or may not
actually be used. It is also common to share IRQ7 for sound (Sound Blaster compatible).
43
44. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Legacy peripherals
The parallel ports were originally used for printing with data flowing to the printer
and a few lines reserved for reporting status.
Later, the parallel port was used for attaching other devices (CD-ROMs, tape drives),
so the output-only nature of the data flow changed to a bidirectional data flow.
Parallel ports (LPTn)
Current standard applicable to parallel ports is:
IEEE Std. 1284-1994 Standard Signaling Method for a Bi-Directional Parallel Peripheral
Interface for Personal Computers, defined by 5 signaling modes in BIOS with the
common: bi-directional, EPP, ECP and EPP and ECP
•Bi-directional;
•EPP (Enhanced Parallel Port) designed for CD-ROMs and Tape drives that require large
amounts of data to flow in either direction.
•ECP (Enhanced Capabilities Port) designed for use with printers
The default BIOS choice is likely to be ECP.
44
45. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Legacy peripherals
If the system has a legacy floppy disk controller, it will use ports 3F0-3F7.
Floppy disk port
The keyboard/mouse controller uses ports 0060 and 0064 for legacy keyboards and
mice. That is, those connected by a round PS2 connector.
Keyboard and mouse
Many systems will generate a Power-On-Self-Test (POST) error if a keyboard is not attached.
Most machines have BIOS options to allow clean startup without keyboard or mouse.
You may need a customized boot disk or CD to perform a Linux system install
45
Servers frequently run without keyboard (or mouse).
Management is performed over network using web admin tools, or cmdline interface
(telnet or ssh).
Installation on keyboardless system is accomplished using a terminal (or terminal emulator)
attached through a serial port. Or, emulate a serial connection over a LAN.
46. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Modems and sound cards
Modem stands for modulator/demodulator
(Modulation) Modem converts binary information to analogue signals
(Demodulation) Modem decodes analogue signals into binary
binary signals are given by the computer, and analogue signals fly over the telephone lines.
Modems
In the early days of PCs, modems were external devices attached to a serial port.
Later, modems were implemented on cards installed inside the computer.
Another cost reduction occurred when:
Some functions done by a modem where transferred to software in the PC.
This modems where called:
softmodem, HCF modem, HSP modem, HSF modem, controllerless modem, other terms.
Those modems were designed to reduce cost of systems which ran MS Windows.
The term winmodem is used for such devices.
Although Winmodem® is a registered trademark of U.S. Robotics, who manufactured several modems under that name.
You will generally have to load a kernel module to make a Winmodem work. This may require some research and recompiling the Linux kernel.
46
47. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Modems and sound cards
Most external modems internal modems will work under Linux without problem.
Some of the modems that require software assistance from the PC operating
system will also work with Linux.
Software-assisted modems that work under Linux are often called linmodems and
there is a site dedicated to these (linmodems.org).
The first step should be to check linmodems site and download the latest version
of the scanModem tool. This will tell you about available drivers for your modem.
Modems
Modems discussed are asynchronous modems.
Another class of modems, are called synchronous modems (HDLC, SDLC, BSC, ISDN)
•Asynchronous Transmission is concerned with transmitting individual bytes of information
•Synchronous Communications is concerned with transmitting whole blocks of information
47
48. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Modems and sound cards
Modems
Most Linux communications occurs using the Internet Protocol or IP
So a Linux system will need to run IP over asynchronous line which was not originally designed
for block protocols such as IP.
The first method of doing this was called Serial Line Interface Protocol or SLIP.
A variant using compressed headers is called CSLIP.
Now, Internet Service Providers (ISPs) support dialup connections using Point-to-
Point Protocol or PPP.
The Linux Networking-HOWTO and The Network Administrators' Guide from
Linux Documentation Project provide info on SLIP, CSLIP, PPP configuration.
Using tools as kppp program gui for ppp or wvdial for dialconn
or general configs with the system-config-network tool.
48
49. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Modems and sound cards
Modems
When communicating using modem, there are a number of settings that you may
need to make on your Linux system, and tell Linux where the RS232 port is.
Set the speed of communications between your system and the modem.
(usually higher than nominal line speed and set to the maximum supported by the serial port chipset and the modem)
To set/view modem parameters used by the serial driver is with the setserial program.
yourname@yourcomp~# setserial /dev/ttyS0
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
[root@attic4 ~]# setserial -G /dev/ttyS0
/dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal skip_test
Ex:
setserial does not probe the hardware. It tells serial driver what parameters to use
unless using the parameters -autoconfig and -auto_irq. (ask kernel to probe hardware).
49
50. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Modems and sound cards
Sound cards
Creative Labs Sound Blaster sound cards have set industry standards.
Even though other brands of excellent exist, many of these provide compatibility mode for
one or more of the Sound Blaster series.
•The original Sound Blaster card was an 8-bit card that worked in the original IBM PC.
•Later 16-bit models for the PC-AT and compatibles used the 16-bit PC-AT or ISA bus.
•Today, these cards use PCI bus or provide a sound chip compatibility onboard.
•Sound devices may also be attached through USB connections.
Ports used by an ISA bus Sound Blaster card are 0220-022F.
base addresses of 240, 260 or 280 were also configurable.
IRQ is usually configurable, with common choices 2, 5, 7, or 10.
The default setting is to use IRQ 5.
Cards could usually be configured to use alternate DMA channels too.
Sound cards had interface to attach a MIDI Device (Musical Instrument Digital Interface).
This interface emulates the Roland MPU-401.
Standard ports used by the MPU-401 ISA interface are 0200-020F.
50
55. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Modems and sound cards
Sound cards
sndconfig is the console based RedHat sound configuration tool.
Automatically sets ISA PnP sound cards by configuring them to default settings as given by pnpdump.
It is not included on a default installation
Sound support on < 2.4 is provided by Open Sound System (OSS) Free drivers.
Many systems today use the Advanced Linux sound architecture or ALSA drivers.
sndconfig utility was created by Red Hat to assist in configuring ISA PnP sound
cards. It also works with PCI sound cards.
This utility may be present on systems that do not use the ALSA drivers.
Modern module support has made it unnecessary.
The utility will probe for sound cards, lay a test sound of Linus Torvalds speaking,
and then update the /etc/modules.conf file (or /etc/modules).
55
58. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
Modems and sound cards
Sound cards
Kernel modules, the preferred support for devices. Are modules that need only to be
loaded for the devices and may be unloaded and reloaded without rebooting the system.
yourname@yourcomp~# cat /etc/modprobe.conf
alias eth0 e100
alias snd-card-0 snd-intel8x0
install snd-intel8x0 /sbin/modprobe --ignore-install snd-intel8x0 &&
/usr/sbin/alsactl restore >/dev/null 2>&1 || :
remove snd-intel8x0 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; };
/sbin/modprobe -r --ignore-remove snd-intel8x0
alias usb-controller ehci-hcd
alias usb-controller1 uhci-hcd
< Kernel 2.4 Kernel module configuration information is stored in:
/etc/modules.conf
> Kernel 2.6 Kernel module system was redesigned and information is stored in:
/etc/modprobe.conf
In either case, lsmod cmd formats contents of /proc/modules and display status of loaded modules.
/etc/modprobe.conf (2.6 kernel)Ex:
58
65. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
SCSI devices
SCSI-3
ANSI standard X3.270-1996 known as SCSI-3 Architecture Model or SAM.
(Earlier SCSI standards are now in the SCSI Parallel Interface or SPI standards)
Speed - 16-bit devices with 320MBps data transfers at bus speed of 160MBps.
65
new connector: Single Connector Attachment or SCA
SCA is an 80-pin connector only used for wide (16-bit) devices.
There are two versions of connector: SCA-1 and SCA-2, is used in most systems.
There are Single-Ended (SE) and Low Voltage Differential (LVD) types of the SCA.
SCA has only one plug which carries data and power - allows devices to be safely hot-plugged .
Server Racks; RAID storage systems; Network Attached Storage.
SCSI-3 introduced Fiber Channel SCSI with support to 126 devices per bus
With connection of fiber channel links - 1GBps or 2GBps for distances to several kilometers.
70. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
SCSI devices
SCSI Ids Priority
70
Devices on SCSI bus have priority.
•Narrow devices: 0 (lowest) - 7 (highest) controller at address7 = highest priority.
•Wide SCSI: 8 (lowest) - 15 (highest), with 15 having lower priority than 0.
Priority sequence is: 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7.
devices that cannot tolerate delays (DVD recorders) must have high priority IDs
•RAID controllers may present a single ID to the bus but may incorporate several disks.
•SCSI addressing also as a Logical Unit Number or LUN.
Tapes and single disk drives do not report a LUN or report an LUN of 0.
SCSI adapter supports more than one SCSI cable or channel,
there may be multiple SCSI adapters in a system.
Full ID of a device consists of:
- Adapter number - Channel number - Device ID - LUN.
71. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
SCSI devices
Linux names and files for SCSI devices
71
To a IDE controller that supports one or two hard drives.
Linux assigns names to IDE devices, as /dev/hda and /dev/hdc.
With SCSI there’s a mix of hard drives, tapes, CD and DVD drives.
Linux will assign device names as devices are detected during boot.
• 1st hard drive on 1st channel of 1st adapter will become /dev/sda, 2nd /dev/sdb, …
• 1st tape drive will be /dev/st0, 2nd /dev/st1, ...
• 1st CD will be /dev/sr0 or /dev/scd0 , 2nd /dev/sr1 or /dev/scd1, …
Devices using SCSI emulation, such as USB storage devices and (prior to the 2.6 kernel) IDE CD or DVD drives will also be
allocated names in this namespace.
Important:
Numbering is redone at each boot.
If you add or remove a SCSI hard drive or device, then all drives or devices will have different
device names next time you boot.
72. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
SCSI devices
Linux names and files for SCSI devices
72
An example of Linux SCSI device name is /dev/sda, (first SCSI hard disk)
Name Meaning Usage
sd SCSI disk fdisk, mount and hdparm
sr or scd SCSI CD ROM Audio data CD ROMs
st SCSI tape tar, cpio, and mt (magnetic tape) for control
sg SCSI generic scanners (SANE), CD writers (cdrecord, cdrdao) and reading audio
CD's digitally Character interface (cdda2wav, cdparanoia)
kernel supplies to the SCSI adapter:
•host – SCSI adapter number: SCSI adapter is a host on SCSI bus. The numbers start at 0 and are allocated arbitarily.
•bus – Channel number: A single SCSI adapter may have a number of SCSI buses attached.
•target – id number: Which remote host on the SCSI bus is being addressed.
•lun – Logical Unit Number: Which of the devices attached to the remote host is being addressed.
Sometimes bus 1, target 3 and lun 40 is written as “1,3,0”.
74. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
SCSI devices
SCSI devices Info in Linux
74
Some distros have an entry for SCSI adapter (or the SCSI Driver) in /proc.
driver name Ex. /proc/scsi/aic7xxx/0.
digit is the bus number - For some drivers parameters can be set to this file.
Ex: yourname@yourcomp~# cat /proc/scsi/aic7xxx/0
Adaptec AIC7xxx driver version: 5.1.19/3.2.4
Compile Options:
TCQ Enabled By Default : Disabled
AIC7XXX_PROC_STATS : Disabled
AIC7XXX_RESET_DELAY : 5
Adapter Configuration:
SCSI Adapter: Adaptec AHA-294X Ultra SCSI host adapter
Ultra Wide Controller
PCI MMAPed I/O Base: 0xeb001000
Adapter SEEPROM Config: SEEPROM found and used.
Adaptec SCSI BIOS: Enabled
IRQ: 10
SCBs: Active 0, Max Active 2,
Allocated 15, HW 16, Page 255
Interrupts: 160328
...// ...
78. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
USB devices
USB overview
78
In 1994 Compaq, Intel, Microsoft and NEC designed the Universal Serial Bus (USB)
with the goal of providing a single, simple bus for attachment of peripherals.
allows devices to be hot-plugged and uses standard connectors for connecting devices.
keyboards, mice, printers, scanners, hard drives, flash memory drives, cameras, modems, eth adapters, speakers...
USB is a hierarchical bus and it is controlled by one host.
•A computer system may provide one or more controllers or hubs.
to which either a USB device or another (external) hub may be connected.
•A hub can support up to 7 devices, some or all may be additional hubs.
•The hub in the system is called root hub.
Each star topology supports to 127 hubs or devices (USB v1).
Frequently, we speak of a USB ports which refers to the USB capability in a computer and the connecting socket rather than the
internal port addresses used by the device
81. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
USB devices
Linux USB module support
81
USB is well supported in Linux.
Much development occurred in 2.6 kernel.
Because of the hot-pluggable nature of USB, support is usually through kernel modules
which can be loaded or unloaded as necessary.
Linux systems founds the USB existence, with lspci command.
Ex: yourname@yourcomp~# lspci | grep -i usb
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM
(ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM
(ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM
(ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM
(ICH4/ICH4-M) USB2 EHCI Controller (rev 01)
Indication of: AHCI (Advanced Host Controller Interface)
is for app programming interface that defines operation for SATA apposed to the IDE controller.
http://en.wikipedia.org/wiki/Advanced_Host_Controller_Interface
In Linux kernel since v2.6.19.
82. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
USB devices
USB chipsets and drivers
82
There are 2 USB host controller available.
Supported by 2 kernel modules available.
Common Drivers:
1. usb-ohci.o – Open Host Controller Interface (OHCI by Compaq)
used by Nvidia chipset
2. usb-uhci.o – Universal Host Controller Interface (UHCI by Intel)
used by Intel chipset, VIA chipset (simpler hardware, more complex software, higher CPU load).
Driver Chipset
OHCI Compaq, iMacs, PowerBooks, SiS, ALi chipsets
UHCI Intel, VIA chipsets
JE Alternate to UHCI for 2.4 kernels. (If UHCI doesn’t work, and have Intel/VIA chipset, try JE)
EHCI USB 2.0 Support - requires one of UHCI, OHCI or JE
http://www.linuxjournal.com/article/8093
83. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
USB devices
USB chipsets and drivers
83
To determine usb controller driver in a particular computer, again use lspci
Ex: yourname@yourcomp~# lspci | grep -i usb
00:07.2 USB Controller: VIA Technologies, Inc. USB (rev 0a) (prog-if 00 [UHCI])
Subsystem: VIA Technologies, Inc. (Wrong ID) USB Controller
For module config files modules.conf (kernel 2.4) ; /etc/modprobe.conf (kernel2.6)
or newer /proc/modules use lsmod to view modules loaded associated with USB
Ex: yourname@yourcomp~# lsmod | egrep 'usb|hci|hid|mouse|Module'
Module Size Used by Not tainted
usbserial 23420 0 (autoclean) (unused)
mousedev 5524 1
hid 22244 0 (unused)
input 5888 0 [keybdev mousedev hid]
ehci-hcd 20008 0 (unused)
usb-uhci 25740 0 (unused)
usbcore 77376 1 [usbserial hid ehci-hcd usb-uhci]
84. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
USB devices
Displaying USB information
84
Info of USB devices attached to the system is found in /proc/bus/usb (some Karnels).
USB identifies themselves on bus by vendor, and by USB class (mouse, keyboard)
Ex: yourname@yourcomp~# cat /proc/bus/usb/devices
T: Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 6
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.04
S: Manufacturer=Linux 2.4.21-32.0.1.EL ehci-hcd
S: Product=Intel Corp. 82801DB USB2
S: SerialNumber=00:1d.7
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=256ms
T: Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB UHCI Root Hub
S: SerialNumber=1840
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
.. // ..
85. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
USB devices
Displaying USB information
85
Best option to file /proc/bus/usb is lsusb cmd. With –t giving attachment hierarchy
Ex:
yourname@yourcomp~# lsusb -s 001:007 -v | head -11
Bus 001 Device 007: ID 04a5:20b0 Acer Peripherals Inc. S2W
3300U/4300U
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 255 Vendor Specific Subclass
bDeviceProtocol 255 Vendor Specific Protocol
bMaxPacketSize0 8
idVendor 0x04a5 Acer Peripherals Inc.
idProduct 0x20b0 S2W 3300U/4300U
bcdDevice 1.20
iManufacturer 1 Color
iProduct 2 FlatbedScanner 23
yourname@yourcomp~# lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 007: ID 04a5:20b0 Acer Peripherals Inc. S2W
3300U/4300U
86. CoreLinuxforRedHatandFedoralearningunderGNUFreeDocumentationLicense-Copyleft(c)AcácioOliveira2012
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,changingisallowed
RAID Levels
RAID information
86
0 (Spanning):
Drives simply combined, one after another, to form one large, continuous storage space. No
performance or reliability advantages. Used to get large amounts of storage space for cheap.
0 (Striping):
Drives are combined into one large storage space, but the data is split up and striped across
the disks. Provides improved read and write performance through
parallel operations. Still no reliability benefit.
1 (Mirroring):
Each drive in the set is a complete copy of the data. Read performance benefit through
parallel read operations. Exceptional reliability benefit through redundancy.
Storage limited to size of smallest member.
5 (Stripe w/ parity):
Most common. Similar to Striped RAID 0, but adds parity information, allowing for improved
reliability. Minimum 3 members to operate, but can tolerate a drive failure without data loss.
Improved performance through parallel operations.