I am confused in clearing my concepts regarding these three questions
why do we need a secondary program loader ?
in which memory it gets loade
Let me explain it using OMAP platform as an example (just to provide some actual background rather than just theory or common knowledge). Take a look at some facts for starters:
So this first-stage bootloader is U-Boot SPL; and second-stage bootloader is regular U-Boot (or U-Boot proper). To be clear: SPL stands for Secondary Program Loader. Which means that ROM code is the first thing that loads (and executes) other program, and SPL is the second thing that loads (and executes) other program. So usually boot sequence is next: ROM code -> SPL -> u-boot -> kernel. And actually it's very similar to PC boot, which is: BIOS -> MBR -> GRUB -> kernel.
UPDATE
To make things absolutely clear, here is the table describing all stages of boot sequence (to clarify possible uncertainty in terminology used):
+--------+----------------+----------------+----------+
| Boot | Terminology #1 | Terminology #2 | Actual |
| stage | | | program |
| number | | | name |
+--------+----------------+----------------+----------+
| 1 | Primary | - | ROM code |
| | Program | | |
| | Loader | | |
| | | | |
| 2 | Secondary | 1st stage | u-boot |
| | Program | bootloader | SPL |
| | Loader (SPL) | | |
| | | | |
| 3 | - | 2nd stage | u-boot |
| | | bootloader | |
| | | | |
| 4 | - | - | kernel |
| | | | |
+--------+----------------+----------------+----------+
So I'm just using bootloader as synonym for U-Boot, and Program Loader as common term for any program that loads other program.
See also:
[1] SPL (at Wikipedia)
[2] TPL: SPL loading SPL - Denx
[3] Bootloader (at OSDev Wiki)
[4] Boot ROM vs Bootloader
There is no theoretical need for a Secondary Program Loader (SPL). However, there are often pragmatic reasons for having one. Two off the top of my head.
The primary loader does whatever is necessary to load the full boot process (SPL). The primary loader, for example, may be stored in ROM with memory limitations.