Pages

May 8, 2012

101.1 Determine and configure hardware settings


Topic 101: System Architecture
101.1 Determine and configure hardware settings
  • Weight: 2
  • Description: Candidates should be able to determine and configure fundamental system hardware.
Key Knowledge Areas
  • Enable and disable integrated peripherals.
    BIOS(Basic Input/Output System): It is the firmware located in a PC, which is responsible for bringing all of the system hardware to a state at which it is ready to boot an operating system. When the PC starts up, the first job for the BIOS is the power-on self-test  (POST), which initializes and identifies system devices such as the CPU, RAM, video display card, keyboard and mouse, hard disk drive, optical disc drive and other hardware. The BIOS then locates boot loader software held on a peripheral device (designated as a 'boot device') and loads and executes that software, giving it control of the PC. This process is known as booting. A BIOS has a user interface (UI), typically a menu system accessed by pressing a certain key on the keyboard when the PC starts. In the BIOS UI, a user can:
    • configure hardware
    • set the system (h/w) clock, which will provide time to OS on startup. #hwclock synchronize
    • enable or disable system components
    • select which devices are eligible to be a potential boot device
    • set various password prompts, such as a password for securing access to the BIOS user interface functions itself and preventing malicious users from booting the system from unauthorized peripheral devices.
  • Configure systems with or without external peripherals such as keyboards.
  • Differentiate between the various types of mass storage devices. Attachment interfaces :
  • IDE/ATA (Integrated Drive Electronics / Advanced Technology Attachment) 
  • SATA (Serial Advanced Technology Attachment)
  • PATA (Parallel Advanced Technology Attachment)
    all use the ATA (Advanced Technology Attachment) standard to communicate with the device.
    The SCSI family of attachment interfaces is not hardware-compatible with the ATA family.
  • Set the correct hardware ID for different devices, especially the boot device.
  • Know the differences between coldplug and hotplug devices.
  • Determine hardware resources for devices.
    /proc kernel.org
    /proc
      /proc is a pseudo-filesystem(contain virtual files, size zero) which is used as an interface to kernel data structures. The numbered directories in /proc represent processes running on the system(number = process id number from ps command).

    The proc files, interrupts, dma, and ioports, show how system resources are currently utilized.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    # /proc/interrupts
            CPU0          
      0:   80448940          XT-PIC  timer 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    The first column refers to the IRQ number(interrupt request priority, 1-15). Each CPU in the system has its own column and its own number of interrupts per IRQ. The next column reports the type of interrupt(XT-PIC , IO-APIC-edge,IO-APIC-level) , and the last column contains the name of the device that is located at that IRQ.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    # /proc/dma
     4: cascade
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    This file contains a list of the registered ISA direct memory access (DMA) channels in use.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    # /proc/ioports
    0000-001f : dma1
    0020-003f : pic1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    a list of currently registered port regions, used for input or output communication with a device.
    The first column gives the I/O port address range reserved for the device listed in the second column.
    
    

  • Tools and utilities to list various hardware information

    Report hardware => lsmod, lsdev, and lspci.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    #lsmod
    Module Size      Used by         Not tainted
    vfat       12844   0 (autoclean)
    fat         38328   0 (autoclean)   [vfat]
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    The lsmod command displays all the information available about currently loaded modules. The output of lsmod is a series of columns identifying the module name, its size, its use number(number of modules referring it), and its status(name of referring modules).

    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    # lspci
    00:00.0 Host bridge: Intel Corporation 82815 815 (contd.)
    00:02.0 VGA compatible controller: Intel Corporation 82815 (contd.)
    00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 03)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    The lspci command displays information about your system’s PCI(Peripheral Component Interconnect) buses and your installed PCI devices. This information is found primarily within /proc.

    ~~~~~~~~~~~~~~~~~~~~
    #lsdev
    Device    DMA  IRQ  I/O Ports
    ------------------------------
    ATI                             c800-c8ff
    bttv                     10
    Creative                       e800-e81f ec00-ec07
    dma                              0080-008f
    ~~~~~~~~~~~~~~~~~~~~
    The lsdev command displays information about your system’s hardware, such as interrupt addresses
    and I/O ports. The command is useful for obtaining information prior to installing devices that may have hardware addressing conflicts, such as ISA (Industry Standard Architecture is a computer bus standard) devices. This command uses DMA files in /proc to also report I/O addresses and IRQ and DMA channel information. There are no options for lsdev. The output lists information in four columns: device name, DMA address, IRQ address, and I/O ports.

    Manipulating Modules=> lsmod, insmod, rmmod, modinfo, modprobe. (to list, insert, remove and query modules)

    insmod
    #insmod [options -s, -v] modulename
    Insert a module into the running kernel.(has to be superuser) Exist status 1 indicate error(dependency error of prerequisite modules, use modeprob)

    rmmod
    #rmmod [options -s, -a] modulename
    The rmmod command is used to remove modules from the running kernel.(superuser, no referring modules)

    modinfo
    #modinfo [options -a, -d, -p] module_object_file
    Display information about a module from its module_object_file
    eg: modinfo -d /lib/modules/2.2.5-15smp/misc/zftape.o

    modprob
    #modprobe [options -a, -c, -l, -s, -r, -t] module [symbol=value ...]
    In addition to loading single modules, modprobe has the ability to load modules along with their prerequisites or all modules stored in a specific directory. The modprobe command can also remove modules when combined with the -r option. (-t moduletype : Attempt to load multiple modules found in the directory moduletype until a module succeeds or all modules in moduletype are exhausted. Attempt to load available network modules until one succeeds: # modprobe -t net .Attempt to load all available network modules: # modprobe -at net)
  • Tools and utilities to manipulate USB devices
  • Conceptual understanding of sysfs, udev, hald, dbus

Terms and Utilities

  • /sys
  • /proc
  • /dev
  • modprobe
  • lsmod
  • lspci
  • lsusb 
=================================================================

No comments:

Post a Comment

About Me

My photo
There are a lot of fun things I do and want to do in my life. If you ask me what is the objective of my life, I would say that I want to experience a lot of things so that when I look back from old age I have lot of good memories.... I write this blog to show you a glimpse of what all I do, think, like, wish for etc... Motto: Dream high and work hard to realize it.

views

free counters