EmbLogic's Blog

Time Stamp Counter

Starting with the Pentium, many recent Intel 80×86 microprocessors include a 64-bit Time
Stamp Counter (TSC ) register that can be read by means of the rdtsc assembly language
instruction. This register is a counter that is incremented at each clock signal: if, for instance,
the clock ticks at 400 MHz, the Time Stamp Counter is incremented once every 2.5
nanoseconds.

Posted in Uncategorized | Leave a comment

kobjects

t is rare (even unknown) for kernel code to create a standalone kobject;
instead, kobjects are used to control access to a larger, domain-specific object. To
this end, kobjects are found embedded in other structures. If you are used to think-
ing of things in object-oriented terms, kobjects can be seen as a top-level, abstract
class from which other classes are derived. A kobject implements a set of capabilities
that are not particularly useful by themselves but that are nice to have in other
objects.

Posted in Uncategorized | Leave a comment

Differnece between Konsole, Terminal and Shell.

Posted in Uncategorized | 2 Comments

Timing measurement by Linux kernel

Two main kinds of timing measurement that must be performed by the
Linux kernel:

  1. Keeping the current time and date, so that they can be returned to user programs
    through the time( ), ftime( ), and gettimeofday( ) system calls.
  2. Maintaining timers, that is, mechanisms that are able to notify the kernel or a user program that a certain interval of time has elapsed.
Posted in Uncategorized | Leave a comment

Memory management

The Memory management unit consists of
Segmentation unit and
Paging unit.

Segmentation unit allows the use of two address components, viz. segment and offset for relocability and sharing of code and data.
•Segmentation unit allows segments of size 4Gbytes at max.
•The Paging unit organizes the physical memory in terms of pages     of        4kbytes size each.

Paging unit works under the control of the segmentation unit, i.e. each     segment is further divided into pages. The virtual memory is also organizes in terms of segments and pages by the memory management unit.

Posted in Uncategorized | Leave a comment

cd driver

In init()

it call cdrom_sysctl_register() which initialied different parameter like autoclose, autoeject, debug, lockdoor, check_media_change.

Posted in Uncategorized | Leave a comment

kernel control path

The sequence of instructions executed in Kernel Mode to handle a kernel request is denoted as kernel control path : when a User Mode process issues a system call request, for instance, the first instructions of the corresponding kernel control path are those included in the initial part of the system_call( ) function, while the last instructions are those included in the
ret_from_sys_call( ) function.

Posted in Uncategorized | Leave a comment

Reentrant kernel

??All Unix kernels are reentrant : this means that several processes may be executing in Kernel
Mode at the same time. Of course, on uniprocessor systems only one process can progress,
but many of them can be blocked in Kernel Mode waiting for the CPU or the completion of
some I/O operation. For instance, after issuing a read to a disk on behalf of some process, the
kernel will let the disk controller handle it and will resume executing other processes.
An interrupt notifies the kernel when the device has satisfied the read, so the former process
can resume the execution.

Posted in Uncategorized | Leave a comment

Spi communication

In spi communication , master controls  the clock for transmission.

whenever master has data to be sent , it load the data in SDO and then high the clock status. slave check for high clock and then reads data from SDI pin.While slave reading the data master low the status of clock and this whole cycle continue until master has data to be

Posted in Uncategorized | Leave a comment

Block Nonentry Request

Block drivers often attempt to retry requests that fail the first time. This behavior can
lead to a more reliable system and help to avoid data loss. The kernel, however,
sometimes marks requests as not being retryable. Such requests should simply fail as
quickly as possible if they cannot be executed on the first try.
If your driver is considering retrying a failed request, it should first make a call to:
int blk_noretry_request(struct request *req);
If this macro returns a nonzero value, your driver should simply abort the request
with an error code instead of retrying it

Posted in Uncategorized | Leave a comment

SPI Protocol

The Serial Peripheral Interface Bus is a synchronous serial data link standard  that operates in full duplex mode. Devices communicate in master/slave mode where the master device initiates the data frame. Multiple slave devices are allowed with individual slave select (chip select) lines.

The SPI bus specifies four logic signals:

  • SCLK: Serial Clock (output from master);
  • MOSI; SIMO: Master Output, Slave Input (output from master);
  • MISO; SOMI: Master Input, Slave Output (output from slave);
  • SS: Slave Select (active low, output from master).

Operation

The SPI bus can operate with a single master device and with one or more slave devices.If a single slave device is used, the SS pin may be fixed to logic low if the slave permits it. Some slaves require the falling edge (high?low transition) of the slave select to initiate an action such as the Maxim MAX1242 ADC, which starts conversion on said transition. With multiple slave devices, an independent SS signal is required from the master for each slave device.

Posted in Uncategorized | Leave a comment

end request function

prototype of end request function is

void end_request(struct request *, int )

here if we pass 0 as second argument if  request is not complete and 1 if it’s complete

Posted in Uncategorized | Leave a comment

The Bio Structure

The bio structure contains everything that a block driver needs to carry out the request without reference to the user-space process that caused that request to be initiated.
The bio structure, which is defined in <linux/bio.h>, contains a number of fields that
may be of use to driver.

The core of a bio, however, is an array called bi_io_vec, which is made up of the fol-
lowing structure:
struct bio_vec {
struct page
unsigned int
unsigned int
};

Posted in Uncategorized | Leave a comment

USB Devices

There are different types of USB devices as they can be used for different purposes. First a device can be self powered, bus powered or both. The USB can provide a power supply up to 500mA for its devices. If there are only bus powered devices on the bus the maximum power dissipation could be exceeded and therefore self powered devices exist. They need to have their own power supply. Devices that support both power types can switch to self powered mode when attaching an external power supply.

Posted in Uncategorized | Leave a comment

Building Embedded linux

Can anybdy tell me …what are the various steps involved in building of a tool chain in some details…if u hv any kind of docs(what to do after installing Uboot and initrd)..plz tell me…ur comments may fulfil sum1 needs…

Posted in Uncategorized | Leave a comment