Tuesday, March 8, 2011
Murphy's law
"The first time you enable the compiler's optimization feature, your previously working program will suddenly fail"
The ARM processor
ARM has seven basic operating modes:
1. USER: Unprivileged mode under which most tasks run
2. FIQ: Entered when a high priority(fast) interrupt is raised
3. IRQ: Entered when a low priority(normal) interrupt is raised
4. SUPERVISOR: Entered on RESET and when a software interrupt instruction(SWI) is executed.(Protected mode for operating system support)
5. ABORT: Used to handle memory access violations
6. UNDEF: Used to handle undefined instructions
7. SYSTEM: Privileged mode using same registers as user mode
- Except USER mode all other modes are privileged
---------------------------------
T = Thumb instruction set support
D = Debug interface support(JTAG/ICE)
M = Multiplier (clock related)
I = Interrupt (Fast interrupt support)
E = Enhanced DSP instructions
J = Jazelle (Java byte code execution)
S = Synthesizable core
T2= Thumb2 instruction set
Z = TrustZone instructions
-----------------------------------
R0 - R12 are general purpose registers
R13 is Stack pointer(SP)
R14 is subroutine link regiser(LR)
R15 is program counter(PC)
CPSR is current program status regiser
NOTE: R0-R3
When a function is called the arguments are passed in these registers.
The return values of a function are also placed in these registers.
(R0 - for a 32bit value)
-----------------------------------
Exceptions have priorities:
Reset (highest priority)
Data Abort
FIQ
IRQ
Prefetch Abort
SWI (Lowest priority)
----------------------------------
1. USER: Unprivileged mode under which most tasks run
2. FIQ: Entered when a high priority(fast) interrupt is raised
3. IRQ: Entered when a low priority(normal) interrupt is raised
4. SUPERVISOR: Entered on RESET and when a software interrupt instruction(SWI) is executed.(Protected mode for operating system support)
5. ABORT: Used to handle memory access violations
6. UNDEF: Used to handle undefined instructions
7. SYSTEM: Privileged mode using same registers as user mode
- Except USER mode all other modes are privileged
---------------------------------
T = Thumb instruction set support
D = Debug interface support(JTAG/ICE)
M = Multiplier (clock related)
I = Interrupt (Fast interrupt support)
E = Enhanced DSP instructions
J = Jazelle (Java byte code execution)
S = Synthesizable core
T2= Thumb2 instruction set
Z = TrustZone instructions
-----------------------------------
R0 - R12 are general purpose registers
R13 is Stack pointer(SP)
R14 is subroutine link regiser(LR)
R15 is program counter(PC)
CPSR is current program status regiser
NOTE: R0-R3
When a function is called the arguments are passed in these registers.
The return values of a function are also placed in these registers.
(R0 - for a 32bit value)
-----------------------------------
Exceptions have priorities:
Reset (highest priority)
Data Abort
FIQ
IRQ
Prefetch Abort
SWI (Lowest priority)
----------------------------------
Sunday, February 27, 2011
Tuesday, February 22, 2011
Two to Three
1. Classroom: (2 classroom trainings)
1. Performance Management(Goal setting)
2. 1 of the following:
1. Winfluence
2. E1 booster program
3. Conflict resolution
4. Customer centricity
5. Problem Solving
6. Facing customer interview
7. Assertive communication
8. Presentation skills
2. E-learning: (3 e-learning modules)
1. Time management
2. Email Etiquette
3. Meetings that matter
4. IT security awareness (MUST)
3. Technical training:
2 persondays in last 6 months OR
4 persondays in last 1 year
4. KMAP level 5 or above
1. Performance Management(Goal setting)
2. 1 of the following:
1. Winfluence
2. E1 booster program
3. Conflict resolution
4. Customer centricity
5. Problem Solving
6. Facing customer interview
7. Assertive communication
8. Presentation skills
2. E-learning: (3 e-learning modules)
1. Time management
2. Email Etiquette
3. Meetings that matter
4. IT security awareness (MUST)
3. Technical training:
2 persondays in last 6 months OR
4 persondays in last 1 year
4. KMAP level 5 or above
Shibumi Strategy
1. Koko(austerity)
#Refrain from adding what is not absolutely necessary in the first place.
2. Kanso(simplicity)
KISS(Keep it simple, stupid)
#Eliminate what doesn't matter to make more room for what does.
3. Shizen(naturalness)
To achieve a balance between being of nature, yet distinct from it - to be viewed as being without pretense, without artifice, not forced, yet intentional rather than accidental or haphazard.
#Before taking action, look for naturally occuring patterns and rhythms, and construct your ideas to fit them.
4. Yugen(subtlety)
#Leave something to the imagination by limiting information.
5. Fukinsei(Imperfection, asymmetry)
#Appreciate the beauty of natural imperfection. Leave the doors open for others to co-create with you.
6. Seijaku(stillness, quietude, solitude)
"Stand still when the hippos charge"
#Learn to quiet your mind; designate a time and place for creative solitude.
7. Datsuzoku(Break from routine)
#Re-energize your creativity by taking regular "timeouts" every 90 minutes.
#Refrain from adding what is not absolutely necessary in the first place.
2. Kanso(simplicity)
KISS(Keep it simple, stupid)
#Eliminate what doesn't matter to make more room for what does.
3. Shizen(naturalness)
To achieve a balance between being of nature, yet distinct from it - to be viewed as being without pretense, without artifice, not forced, yet intentional rather than accidental or haphazard.
#Before taking action, look for naturally occuring patterns and rhythms, and construct your ideas to fit them.
4. Yugen(subtlety)
#Leave something to the imagination by limiting information.
5. Fukinsei(Imperfection, asymmetry)
#Appreciate the beauty of natural imperfection. Leave the doors open for others to co-create with you.
6. Seijaku(stillness, quietude, solitude)
"Stand still when the hippos charge"
#Learn to quiet your mind; designate a time and place for creative solitude.
7. Datsuzoku(Break from routine)
#Re-energize your creativity by taking regular "timeouts" every 90 minutes.
Wednesday, February 24, 2010
Device Drivers: From LDD3
DEFINITION:
Device drivers are black boxes that make a particular piece of hardware respond to a well defined software interface. This is done using a standard set of system calls. The device driver maps the system calls to device specific operations that act on real hardware.
ROLE:
Software can be split into two parts: (1) Mechanism & (2) Policy
Mechanism - What capabilities are to be provided?
Policy - How those capabilities can be used?
The role of the device driver is providing mechanism, not policy
Note: Write device driver to access the hardware, but don't force particular policies on the user. {"POLICY-FREE DRIVERS"}
Device drivers are black boxes that make a particular piece of hardware respond to a well defined software interface. This is done using a standard set of system calls. The device driver maps the system calls to device specific operations that act on real hardware.
ROLE:
Software can be split into two parts: (1) Mechanism & (2) Policy
Mechanism - What capabilities are to be provided?
Policy - How those capabilities can be used?
The role of the device driver is providing mechanism, not policy
Note: Write device driver to access the hardware, but don't force particular policies on the user. {"POLICY-FREE DRIVERS"}
Monday, November 3, 2008
First kernel module (2.6 kernel) - hello
/* First kernel module - hello.c */
/*
--------------------------------------
Steps to be followed
#vi hello.c - Enter the given c code
#vi Makefile - Enter the following
obj-m += hello.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) clean
install:
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules_install
#make
#insmod hello.ko
#dmesg tail -4 --> view message
#rmmod hello
#dmesg tail -4 --> view message
--------------------------------------
*/
#include <linux/kernel.h>
#include <linux/module.h >
#include <linux/init.h>
static int __init hello_init(void)
{
printk(KERN_INFO "Hello world\n");
return 0;
}
static void __exit hello_exit(void)
{
printk(KERN_INFO "Goodbye world\n");
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("KERNO");
MODULE_DESCRIPTION("First kernel module");
/*
--------------------------------------
Steps to be followed
#vi hello.c - Enter the given c code
#vi Makefile - Enter the following
obj-m += hello.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) clean
install:
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules_install
#make
#insmod hello.ko
#dmesg tail -4 --> view message
#rmmod hello
#dmesg tail -4 --> view message
--------------------------------------
*/
#include <linux/kernel.h>
#include <linux/module.h >
#include <linux/init.h>
static int __init hello_init(void)
{
printk(KERN_INFO "Hello world\n");
return 0;
}
static void __exit hello_exit(void)
{
printk(KERN_INFO "Goodbye world\n");
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("KERNO");
MODULE_DESCRIPTION("First kernel module");
Subscribe to:
Posts (Atom)
