Skip to main content


Showing posts from July 28, 2019

Linux Kernel Porting to New Architecture. includes Processor Specific & Board Specific

1.Processor-specific or Architecture changes to the kernel code
1.  The number of TLB3 (translation look aside buffers) entries may be different for different implementations.
2. Add a config option (CONFIG_MYCPU) to include code that is specific to the processor. 
3.  Directories $(TOPDIR)/arch/MY_ARCH/kernel and $(TOPDIR)/arch/MY_ARCH/mm  contain the processor-specific code that require modifications if you are dealing with a new implementation.
4. Assembly file $(TOPDIR)/arch/MY_ARCH/kernel/head.S contains kernel_entry, the entry point for the kernel.  This file also contains the exception handling code. Listing 1 shows the implementation of the kernel_entry routine in pseudo code.
5. Kernel entry pseudo code:  Set desired endian modeClear the BEV bitSet the TLB bitGOTO cpu_probe and returnSet up stack for kernelClear bssGOTO prom_init and returnGOTO loadmmu and returnDisable coprocessorsGOTO start_kernel        la       t3, mips_cputype
       b       probe_done
       sw       t2, (t3)