The document provides an overview of the initialization process in the Linux kernel from start_kernel to rest_init. It lists the functions called during this process organized by category including functions for initialization of multiprocessor support (SMP), memory management (MM), scheduling, timers, interrupts, and architecture specific setup. The setup_arch section focuses on x86 architecture specific initialization functions such as reserving memory regions, parsing boot parameters, initializing memory mapping and MTRRs.
Linux Kernel Booting Process (1) - For NLKBshimosawa
Describes the bootstrapping part in Linux and some related technologies.
This is the part one of the slides, and the succeeding slides will contain the errata for this slide.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Virtual File System in Linux Kernel
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Linux Kernel Booting Process (2) - For NLKBshimosawa
Describes the bootstrapping part in Linux, and related architectural mechanisms and technologies.
This is the part two of the slides, and the succeeding slides may contain the errata for this slide.
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedAdrian Huang
This slide deck describes the Linux booting flow for x86_64 processors.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Linux Kernel Booting Process (1) - For NLKBshimosawa
Describes the bootstrapping part in Linux and some related technologies.
This is the part one of the slides, and the succeeding slides will contain the errata for this slide.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Virtual File System in Linux Kernel
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Linux Kernel Booting Process (2) - For NLKBshimosawa
Describes the bootstrapping part in Linux, and related architectural mechanisms and technologies.
This is the part two of the slides, and the succeeding slides may contain the errata for this slide.
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedAdrian Huang
This slide deck describes the Linux booting flow for x86_64 processors.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...Adrian Huang
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Page cache mechanism in Linux kernel.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
The U-Boot is an "Universal Bootloader" ("Das U-Boot") is a monitor program that is under GPL. This production quality boot-loader is used as default boot loader by several board vendors. It is easily portable and easy to port and to debug by supporting PPC, ARM, MIPS, x86,m68k, NIOS, Microblaze architectures. Here is a presentation that introduces U-Boot.
Process Address Space: The way to create virtual address (page table) of user...Adrian Huang
Process Address Space: The way to create virtual address (page table) of userspace application.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Embitude's Linux SPI Drivers Training Slides. Contains the details of AM335X specific low level programming, SPI components such as SPI Master Driver, SPI Client Driver, Device Tree for SPI
Anatomy of the loadable kernel module (lkm)Adrian Huang
Talk about how Linux kernel invokes your module's init function.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Memory Mapping Implementation (mmap) in Linux KernelAdrian Huang
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
The Linux Block Layer - Built for Fast StorageKernel TLV
The arrival of flash storage introduced a radical change in performance profiles of direct attached devices. At the time, it was obvious that Linux I/O stack needed to be redesigned in order to support devices capable of millions of IOPs, and with extremely low latency.
In this talk we revisit the changes the Linux block layer in the
last decade or so, that made it what it is today - a performant, scalable, robust and NUMA-aware subsystem. In addition, we cover the new NVMe over Fabrics support in Linux.
Sagi Grimberg
Sagi is Principal Architect and co-founder at LightBits Labs.
Some basic knowledges required for beginners in writing linux kernel module - with a description of linux source tree, so that the idea of where and how develops. The working of insmod and rmmod commands are described also.
Have a quick overview of most of the embedded linux components and their details. How ti build Embedded Linux Hardware & Software, and developing Embedded Products
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Exploiting the Linux Kernel via Intel's SYSRET Implementationnkslides
Intel handles SYSRET instructions weirdly and might throw around exceptions while still being in ring0. When the kernel is not being extra careful when returning to userland after being signaled with a syscall bad things can happen. Like root shells.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...Adrian Huang
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Page cache mechanism in Linux kernel.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
The U-Boot is an "Universal Bootloader" ("Das U-Boot") is a monitor program that is under GPL. This production quality boot-loader is used as default boot loader by several board vendors. It is easily portable and easy to port and to debug by supporting PPC, ARM, MIPS, x86,m68k, NIOS, Microblaze architectures. Here is a presentation that introduces U-Boot.
Process Address Space: The way to create virtual address (page table) of user...Adrian Huang
Process Address Space: The way to create virtual address (page table) of userspace application.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Embitude's Linux SPI Drivers Training Slides. Contains the details of AM335X specific low level programming, SPI components such as SPI Master Driver, SPI Client Driver, Device Tree for SPI
Anatomy of the loadable kernel module (lkm)Adrian Huang
Talk about how Linux kernel invokes your module's init function.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Memory Mapping Implementation (mmap) in Linux KernelAdrian Huang
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
The Linux Block Layer - Built for Fast StorageKernel TLV
The arrival of flash storage introduced a radical change in performance profiles of direct attached devices. At the time, it was obvious that Linux I/O stack needed to be redesigned in order to support devices capable of millions of IOPs, and with extremely low latency.
In this talk we revisit the changes the Linux block layer in the
last decade or so, that made it what it is today - a performant, scalable, robust and NUMA-aware subsystem. In addition, we cover the new NVMe over Fabrics support in Linux.
Sagi Grimberg
Sagi is Principal Architect and co-founder at LightBits Labs.
Some basic knowledges required for beginners in writing linux kernel module - with a description of linux source tree, so that the idea of where and how develops. The working of insmod and rmmod commands are described also.
Have a quick overview of most of the embedded linux components and their details. How ti build Embedded Linux Hardware & Software, and developing Embedded Products
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Exploiting the Linux Kernel via Intel's SYSRET Implementationnkslides
Intel handles SYSRET instructions weirdly and might throw around exceptions while still being in ring0. When the kernel is not being extra careful when returning to userland after being signaled with a syscall bad things can happen. Like root shells.
The respective talk was held by Oleksandr Shevchenko (Senior Engineering Consultant, GlobalLogic) at GlobalLogic Lviv Embedded TechTalk #2 on May 23, 2018.
Oleksandr presentation is about features of software architecture, which provides parallel work of Linux and operating system real-time on different cores of a single processor. The talk is also about the Linux mechanism, which allows to connect the processor cores after the boot process has finished, the so-called "CPU Hotplug".
Decompressed vmlinux: linux kernel initialization from page table configurati...Adrian Huang
Talk about how Linux kernel initializes the page table.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
LCU14 302- How to port OP-TEE to another platformLinaro
LCU14 302- How to port OP-TEE to another platform
---------------------------------------------------
Speaker: Joakim Bech, Jens Wiklander and Pascal Brand
Date: September 17, 2014
---------------------------------------------------
★ Session Summary ★
OP-TEE (Open Portable Trusted Execution Environment) is the source code for the TEE in Linux using the ARM Trustzone technology. This component meets the Global Platform TEE System Architecture specification. Most of the code is generic. However, a number of platform specific characteristics are addressed, such as memory layout or board specific hardware IP. In this session, you can learn the steps to follow to port OP-TEE for your armv7 platform, as the ones that have been defined when porting OP-TEE to A80 (SWG-77). OP-TEE to the Allwinner A80 platform
---------------------------------------------------
★ Resources ★
Zerista: http://lcu14.zerista.com/event/member/137748
Google Event: https://plus.google.com/u/0/events/cnd044lmnid6jcoj1a9svlhmkj0
Video: https://www.youtube.com/watch?v=QgaGJow7hws&list=UUIVqQKxCyQLJS6xvSmfndLA
Etherpad: http://pad.linaro.org/p/lcu14-302
---------------------------------------------------
★ Event Details ★
Linaro Connect USA - #LCU14
September 15-19th, 2014
Hyatt Regency San Francisco Airport
---------------------------------------------------
http://www.linaro.org
http://connect.linaro.org
Kdump is a long existing method for acquiring dump of crashed kernel, however very few literatures are available to understand it's usage and internals. We receive a lot of queries on kexec mailing list about different issues related to the kexec/kdump environment.
In this presentation, we talk about basics of kdump usage and some internals about kdump/kexec kernel implementation. It includes end to end flow from kdump kernel configuration to crash analysis. We discuss some of the problem which is frequently faced by kdump users. It also includes related information about ELF structure, so that one can debug if vmcore itself gets corrupted because of any architecture related issue.
Kernel Recipes 2015 - Kernel dump analysisAnne Nicolas
Kernel dump analysis
Cloud this, cloud that…It’s making everything easier, especially for web hosted services. But what about the servers that are not supposed to crash ? For applications making the assumption the OS won’t do any fault or go down, what can you write in your post-mortem once the server froze and has been restarted ? How to track down the bug that lead to service unavailability ?
In this talk, we’ll see how to setup kdump and how to panic a server to generate a coredump. Once you have the vmcore file, how to track the issue with “crash” tool to find why your OS went down. Last but not least : with “crash” you can also modify your live kernel, the same way you would do with gdb.
Adrien Mahieux – System administrator obsessed with performance and uptime, tracking down microseconds from hardware to software since 2011. The application must be seen as a whole to provide efficiently the requested service. This includes searching for bottlenecks and tradeoffs, design issues or hardware optimization.
Why React Native as a Strategic Advantage for Startup Innovation.pdfayushiqss
Do you know that React Native is being increasingly adopted by startups as well as big companies in the mobile app development industry? Big names like Facebook, Instagram, and Pinterest have already integrated this robust open-source framework.
In fact, according to a report by Statista, the number of React Native developers has been steadily increasing over the years, reaching an estimated 1.9 million by the end of 2024. This means that the demand for this framework in the job market has been growing making it a valuable skill.
But what makes React Native so popular for mobile application development? It offers excellent cross-platform capabilities among other benefits. This way, with React Native, developers can write code once and run it on both iOS and Android devices thus saving time and resources leading to shorter development cycles hence faster time-to-market for your app.
Let’s take the example of a startup, which wanted to release their app on both iOS and Android at once. Through the use of React Native they managed to create an app and bring it into the market within a very short period. This helped them gain an advantage over their competitors because they had access to a large user base who were able to generate revenue quickly for them.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Strategies for Successful Data Migration Tools.pptxvarshanayak241
Data migration is a complex but essential task for organizations aiming to modernize their IT infrastructure and leverage new technologies. By understanding common challenges and implementing these strategies, businesses can achieve a successful migration with minimal disruption. Data Migration Tool like Ask On Data play a pivotal role in this journey, offering features that streamline the process, ensure data integrity, and maintain security. With the right approach and tools, organizations can turn the challenge of data migration into an opportunity for growth and innovation.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
Your Digital Assistant.
Making complex approach simple. Straightforward process saves time. No more waiting to connect with people that matter to you. Safety first is not a cliché - Securely protect information in cloud storage to prevent any third party from accessing data.
Would you rather make your visitors feel burdened by making them wait? Or choose VizMan for a stress-free experience? VizMan is an automated visitor management system that works for any industries not limited to factories, societies, government institutes, and warehouses. A new age contactless way of logging information of visitors, employees, packages, and vehicles. VizMan is a digital logbook so it deters unnecessary use of paper or space since there is no requirement of bundles of registers that is left to collect dust in a corner of a room. Visitor’s essential details, helps in scheduling meetings for visitors and employees, and assists in supervising the attendance of the employees. With VizMan, visitors don’t need to wait for hours in long queues. VizMan handles visitors with the value they deserve because we know time is important to you.
Feasible Features
One Subscription, Four Modules – Admin, Employee, Receptionist, and Gatekeeper ensures confidentiality and prevents data from being manipulated
User Friendly – can be easily used on Android, iOS, and Web Interface
Multiple Accessibility – Log in through any device from any place at any time
One app for all industries – a Visitor Management System that works for any organisation.
Stress-free Sign-up
Visitor is registered and checked-in by the Receptionist
Host gets a notification, where they opt to Approve the meeting
Host notifies the Receptionist of the end of the meeting
Visitor is checked-out by the Receptionist
Host enters notes and remarks of the meeting
Customizable Components
Scheduling Meetings – Host can invite visitors for meetings and also approve, reject and reschedule meetings
Single/Bulk invites – Invitations can be sent individually to a visitor or collectively to many visitors
VIP Visitors – Additional security of data for VIP visitors to avoid misuse of information
Courier Management – Keeps a check on deliveries like commodities being delivered in and out of establishments
Alerts & Notifications – Get notified on SMS, email, and application
Parking Management – Manage availability of parking space
Individual log-in – Every user has their own log-in id
Visitor/Meeting Analytics – Evaluate notes and remarks of the meeting stored in the system
Visitor Management System is a secure and user friendly database manager that records, filters, tracks the visitors to your organization.
"Secure Your Premises with VizMan (VMS) – Get It Now"
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
Worried about document security while sharing them in Salesforce? Fret no more! Here are the top-notch security standards XfilesPro upholds to ensure strong security for your Salesforce documents while sharing with internal or external people.
To learn more, read the blog: https://www.xfilespro.com/how-does-xfilespro-make-document-sharing-secure-and-seamless-in-salesforce/
2. Agenda
• Initialization function list
• The list of the functions called from the kernel startup
function (start_kernel)
• The list of the functions called from some function called
from the start_kernel function
• setup_arch
• rest_init, and the following functions
• Initialization topics
• Multiprocessor (SMP) Initialization
2
4. Initialization Overview
4
Booting Code
(Preparing CPU states, Gathering HW information, Decompressing vmlinux etc.)
arch/*/boot/
arch/*/kernel/head*.S, head*.c
Low-level Initialization
(Switching to virtual memory world, Getting prepared for C programs)
init/main.c (startup_kernel)
Initialization
(Initializing all the kernel features including architecture-dependent parts)
init/main.c (rest_init)
Creating the “init” process, and letting it the rest
initialization
(Setting up multiprocessing, scheduling)
kernel/sched/idle.c (cpu_idle_loop)
“Swapper” (PID=0) now sleeps
init/main.c (kernel_init)
Performing final initialization
and
“Exec”ing the “init” user
“init” (PID=1)
arch/*/kernel, arch/*/mm, …Call
vmlinux
5. start_kernel (1)
5
# Function Category Description
1 lockdep_init Debug Lock validator
2 smp_setup_processor_id* SMP Initialize processor ID (some architecture)
3 debug_objects_early_init Debug Lifetime debugging facility for objects
4 boot_init_stack_canary* Debug Decide the canary value for the stack
protector
5 cgroup_init_early cgroup Early init for some cgroup subsystems
6 boot_cpu_init SMP Set the boot cpu for various cpumasks
7 page_address_init MM Initialize hash for kmap (highmem)
8 setup_arch*
9 mm_init_owner MM Set init_mm’s owner to init_task
10 mm_init_cpumask MM Set the cpu mask pointer to the mm’s cpumask
(only if CPUMASK_OFFSTACK)
11 setup_command_line Init Copy the command line parameter to newly
allocated buffer (allocated by memblock)
12 setup_nr_cpu_ids SMP Set “nr_cpu_ids” according to the last bit in
Functions with * : mostly
architecture dependent codes
6. start_kernel (2)
6
# Function Category Description
13 setup_per_cpu_areas* SMP Allocate and initialize percpu areas
14 smp_prepare_boot_cpu* SMP Prepare for SMP boot
15 build_all_zonelists MM Initializes “zonelist”
16 page_alloc_init MM Add a handler for CPU hotplug (to drain pages)
17 parse_early_param Init Parse “early” options
18 parse_args Init Parse the rest of options
19 jump_label_init Option Jump label (self-modification)
20 setup_log_buf Debug Allocate and initialize printk log buffer
21 pidhash_init Sched Initialize PID hash
22 vfs_caches_init FS Initialize various caches (kmem_cache) in VFS
(dcache, inode, mnt, files, …)
23 sort_main_extable MM Sort the exception table (used in page faults)
24 trap_init* CPU Initialize trap handlers
7. start_kernel (3)
7
# Function Category Description
25 mm_init MM Initialize MM
25A page_cgroup_init_flatmme MM Allocate pages for page_cgroup
25B mem_init* MM Free pages for buddy allocator
25C kmem_cache_init MM Initialize cache
25D percpu_init_late MM Replaces per-cpu chunks with those
allocated by slab
25E pgtable_init* MM Create cache for ptlock and pgtable (SH etc.)
25F vmalloc_init MM Initialize vmalloc
26 sched_init Sched Initialize scheduler
27 idr_cache_init Util Initialize IDR (ID to pointer translation)
28 rcu_init SMP Initialize RCU
29 tick_nohz_init Sched Initialize NOHZ (enable context tracking)
30 radix_tree_init Util Initialize radix tree (create cache, etc.)
31 early_irq_init* CPU Initialize irq_desc.
8. start_kernel (4)
8
# Function Category Description
32 init_IRQ * CPU Initialize various IRQs (in x86, set gates for
APIC interrupts, etc.)
33 tick_init Timer Tick broadcast (to emulate local timer)
34 init_timers Timer Timer stats, notifier, and timer softirq
35 hrtimers_init Timer hrtimer notifier, and hrtimer softirq
36 softirq_init Sched Tasklet lists, and tasklet softirqs
37 timekeeping_init Timer Clocksource
38 time_init * Timer (Platform-dependent) timer initialization
39 sched_clock_postinit Sched Start the hrtimer
40 perf_event_init Debug Perf events
41 profile_init Debug (Simple) profiler
42 call_function_init SMP Initialize csd (call single data) queue
local_irq_enable CPU At this point, interrupts are enabled
9. start_kernel (5)
9
# Function Categor
y
Description
43 kmem_cache_init_late MM Post-initialization of cache (slab)
44 console_init Console Call console initcalls
45 lockdep_info Debug Print lockdep information
46 locking_selftest Debug Test spinlocks, rwlocks, mutexes, and
rwsemaphores
47 page_cgroup_init cgroup Page cgroup
48 debug_objects_mem_init Debug Enable dynamic allocation for debugobjects
(#3), and replace static ones with newly
allocated one
49 kmemleak_init Debug kmemleak (Memory leak check facility)
50 setup_per_cpu_pageset MM Per-cpu pageset
51 numa_policy_init MM NUMA (VMA) policy
52 late_time_init* Timer Late initialization
(In x86, HPET and TSC are initialized)
10. start_kernel (6)
10
# Function Category Description
53 sched_clock_init Sched Set the time info for scheduler
54 calibrate_delay Timer Calibrate for the “delay” functions
55 pidmap_init Process Init PID map for initial PID namespace
56 anon_vma_init MM Create cache for “anon_vma”
57 acpi_early_init ACPI ACPI Subsystems, load DSDT
58 thread_info_cache_init Process Allocate cache for thread_info if its size is
less than PAGE_SIZE
59 cred_init Security Task credential
60 fork_init Process Allocate a cache for task_struct
61 proc_caches_init MM Allocate caches for mm_struct, etc.
62 buffer_init FS Allocate a cache for buffer_head
63 key_init Security Allocate a cache for key_jar
64 security_init Security Call security_initcall’s
65 dbg_late_init Debug Late init for kgdb
11. start_kernel (7)
11
# Function Category Description
66 vfs_caches_init FS Allocate SLAB caches and hashtables for
various VFS caches (dcache, inode_cache, …)
67 signals_init Sched Allocate a cache for sigqueue
68 page_writeback_init MM Initialize the ratio for the dirty pages
69 proc_root_init Procfs Create the root for procfs and some
directories
70 cgroup_init Cgroup Initialize the rest of cgroups
71 cpuset_init Sched The top-level cpuset
72 taskstats_init_early Sched Task statistics exposed to the user level
73 delayacct_init Sched Task delay accounting
74 check_bugs* CPU Fix up for some architecture-dependent bugs
(in x86_64, alternatives are initialized, and
divide the first 2MB page into 4K pages)
75 sfi_init_late SFI Map again the area by using ioremap
13. setup_arch (x86) (1)
13
# Function Category Description
1 memblock_reserve MM Reserve the text area
2 early_reserve_initrd MM Reserve the initrd area
3 clone_pgd_area, load_cr3 MM Switch to swapper_pg_dir (i386 only)
4 olpc_ofw_detect Platform OLPC OFW Stuff
5 early_trap_init CPU Init debug and int3 gate
6 early_cpu_init CPU Detect CPU’s vendor (registered in
cpu_dev_register: Intel, AMD, Cyrix…) and
calls early_init and bsp_init
7 early_ioremap_init MM Init early ioremap
8 setup_olpc_ofw_pgd Platform OLPC OFW Stuff
9 (Parsing boot parameters) Setup --
10 x86_init.oem.arch_setup Platform OEM-dependent setup (Intel MID etc.)
11 setup_memory_map MM Copy and print e820 information
12 parse_setup_data Setup Parse setup_data in boot_params
14. setup_arch (x86) (2)
14
# Function Category Description
13 copy_edd Setup Copy BIOS EDD information
14 (prepare init_mm) MM Set start_code, end_code, etc. for init_mm
15 (command line stuffs) Setup
16 x86_configure_nx MM Set ptemask according to whether NX is
supported by CPU
17 parse_early_param Setup (=#17 in start_kernel)
18 x86_report_nx MM Print NX information
19 memblock_x86_reserve_r
ange_setup_data
MM Reserve the setup_data area
20 acpi_mps_check SMP Check if ACPI is disabled and MPS code is not
built-in
21 early_pci_dump_devices Device Dump PCI info before PCI is initialized
22 e820_reserve_setup_data MM Reserve the setup_data area in e820
23 finish_e820_parsing Setup Sanitize e820 info and print e820 info.
15. setup_arch (x86) (3)
15
# Function Category Description
13 copy_edd Setup Copy BIOS EDD information
14 (prepare init_mm) MM Set start_code, end_code, etc. for init_mm
15 (command line stuffs) Setup
16 x86_configure_nx MM Set ptemask according to whether NX is
supported by CPU
17 parse_early_param Setup (=#17 in start_kernel)
18 x86_report_nx MM Print NX information
19 memblock_x86_reserve_r
ange_setup_data
MM Reserve the setup_data area
20 acpi_mps_check SMP Check if ACPI is disabled and MPS code is not
built-in
21 early_pci_dump_devices Device Dump PCI info before PCI is initialized
22 e820_reserve_setup_data MM Reserve the setup_data area in e820
23 finish_e820_parsing Setup Sanitize e820 info and print e820 info.
16. setup_arch (x86) (4)
16
# Function Cat. Description
24 dmi_scan_machine DMI Check if DMI (Desktop Management Interface)
is present or not
25 dmi_memdev_walk DMI Walk through the DMI table
26 dmi_set_dump_stack_arch_de
sc
DMI Set architecture description* for dump_stack
27 init_hypervisor_platform VM Get the hypervisor information and init
(e.g. Get Hz using special I/O port when
running on VMWare)
28 probe_roms MM Request resources for Video ROM, Extension
ROMs, etc.
29 insert_resource MM Insert resources for kernel’s code, data, BSS
30 e820_add_kernel_range MM Add kernel code, data areas to e820 if is not
marked as E820_RAM
31 trim_bios_range MM Reserve BIOS areas in e820
(*) Kernel panic - not syncing: Watchdog detected hard LOCKUP on cpu 3
CPU: 3 PID: 2763 Comm: irqbalance Tainted: G W 3.14.13 #1
Hardware name: Supermicro X9SRH-7F/7TF/X9SRH-7F77TF, BIOS 3.00 07/05/2013
17. setup_arch (x86) (5)
17
# Function Category Description
32 early_gart_iommu_check Device Check GART (Graphics Address Remapping
Table)
33 (Substitute to max_pfn) MM Set max_pfn as the last page in e820
34 mtrr_bp_init CPU MTRRs (Memory Type Range Registers)
35 check_x2apic CPU Enable X2APIC if available
36 find_smp_config SMP Find the SMP config for Intel MP Spec.
37 reserve_ibft_region Device Reserve iSCSI Boot Format Table
38 early_alloc_pgt_buf MM Allocate page table buffer (to be used in the
early stage)
39 reserve_brk MM Reserve brk area
40 cleanup_highmap MM Unmap out-of-range areas in the kernel map
41 memblock_set_current_li
mit
MM Set the memblock’s allocation limit to
ISA_END_ADDRESS
42 memblock_x86_fill MM Fill the memblock info according to e820
18. setup_arch (x86) (6)
18
# Function Category Description
43 early_reserve_e820_mpc_
new
SMP Allocate for mptable
44 setup_bios_corruption_ch
eck
Setup Fill 64KB of low memory by some pattern to
detect if BIOS corrupts the area
45 reserve_real_mode CPU/SMP Reserve some low memory for trampoline
46 trim_platform_memory_r
anges
Setup Special tricks (reserve) for some platform
(Some Sandy Bridge)
47 trim_low_memory_range MM Reserve the first 4KB page in memblock
48 init_mem_mapping MM Reconstruct memory mapping
49 early_trap_pf_init CPU Set page fault handler
50 setup_real_mode CPU/SMP Setup the trampoline code
51 memblock_set_current_li
mit
MM Change the limit to the last page mapped
52 dma_contiguous_reserve MM Allocate contiguous area for DMA
19. setup_arch (x86) (7)
19
# Function Cat. Description
53 setup_log_buf Debug Setup printk log buffer
54 reserve_initrd MM Reserve the initrd
55 acpi_initrd_override ACPI Find the ACPI override info in initrd
56 vsmp_init Setup vSMP (ScaleMP Inc.)
57 io_delay_init Setup Check DMI override for I/O delay strategy
58 acpi_boot_table_init ACPI ACPI BOOT table parsing
59 early_acpi_boot_init ACPI Parse MADT in ACPI
60 initmem_init MM Setup node information based on ACPI (if
NUMA)
61 reserve_crashkernel Debug Reserve memory for crashkernel
62 memblock_find_dma_reserve MM Count the reserved pages in DMA zone
63 pagetable_init MM Initialize sparse mem, and zone sizes
64 tboot_init CPU Intel TXT (Trusted eXecution Technology)
support
20. setup_arch (x86) (8)
20
# Function Cat. Description
65 map_vsyscall CPU Map vsyscall
66 generic_apic_probe CPU Probe APIC driver
67 early_quirks PCI Apply some quirks for certain devices
68 acpi_boot_init ACPI Parse (again) BOOT, FADT, MADT, HPET etc.
69 sfi_init SFI SFI (Simple Firmware Interface)
70 x86_dtb_init Setup Device tree
71 get_smp_config SMP (If ACPI is not found) construct the table
72 prefill_possible_map SMP Set the possible CPU map
73 init_cpu_to_node NUMA Set up the cpu to node map
74 init_apic_mappings CPU Set the local APIC address
75 x86_io_apic_ops.init CPU I/O APIC
76 kvm_guest_init Virt. KVM Guest (paravirt ops, etc.)
77 e820_reserve_resources MM Reserve resources for e820 entries
21. setup_arch (x86) (9)
21
# Function Cat. Description
78 e820_mark_nosave_regions PM Add non-RAM area in e820 to nosave regions
79 x86_init.resources.reserve_re
sources
I/O Reserve standard I/O resources (Timer, KB,…)
80 e820_setup_gap MM Find the largest gap in e820, and pass PCI to
use the gap to allocate new MMIO areas
81 x86_init.oem.banner Debug “Booting paravirtualized kernel on %s”
82 x86_init.timers.wallclock_init Timer (NOP; defined in MID only)
83 mcheck_init CPU Machine check (temperature)
84 arch_init_ideal_nops CPU Set the NOP instructions ideal to the current
platform
85 register_refined_jiffies Timer Register “refined_jiffies” clocksource
22. setup_arch (ARM) (1)
22
# Function Category Description
1 setup_processor CPU Processor initialization
2 setup_machine_fdt Setup Parse the device tree
3 setup_machine_tags Setup If 2 is failed, parse the ATAGs
4 (prepare init_mm) MM Set start_code, end_code, etc. for init_mm
5 (command line stuffs) Setup (=#15 in x86)
6 parse_early_param Setup (=#17 in x86)
7 (sort meminfo) MM Sort the memory information
8 early_paging_init MM Recreate the page table prepared during boot
9 setup_dma_zone MM Setup the dma zone information
10 sanity_check_meminfo MM Sanitize the meminfo
11 arm_memblock_init MM Add free memory from meminfo, and reserve
various reserved areas.
12 paging_init MM Permanent kmap area
23. setup_arch (ARM) (2)
23
# Function Category Description
13 request_standard_resourc
es
MM Reserve resources for system memory, video
ram
14 unflatten_device_tree Setup Create a tree from FDT
15 arm_dt_init_cpu_maps CPU Create CPU logical map based on the device
tree
16 psci_init CPU Read the method to be used for CPU on, off,
etc.
17 smp_init_cpus SMP Initialize the CPU cores available
18 smp_build_mpidr_hash SMP Precompute shifts required to get index from
MPIDR (Mulitprocessor ID register) value
19 hyp_mode_check Virt. Check if the CPU is running in HYP mode
20 reserve_crashkernel Debug Reserve memory for crashkernel
21 mdesc->init_early (Platform-specific initialization)
24. The rest of initialization
• rest_init (init/main.c)
• Create two kernel threads
• “init” (PID = 1, gradually it becomes the init user process)
• “kthreadd” (PID = 2, to allow init to create another kernel threads)
24
static noinline void __init_refok rest_init(void)
{
rcu_scheduler_starting();
...
kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);
numa_default_policy();
pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
rcu_read_lock();
kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns);
rcu_read_unlock();
complete(&kthreadd_done);
...
init_idle_bootup_task(current);
schedule_preempt_disabled();
...
cpu_startup_entry(CPUHP_ONLINE);
}
26. kernel_init
• Call the remaining init functions (kernel_init_freeable)
• Synchronize all the asynchronous operations
• Free the initmem (free_initmem)
• Mark RO Data to RO (and NX) (mark_rodata_ro)
• Set the system state to SYSTEM_RUNNING
• Set the current NUMA policy to default
(numa_default_policy)
• Try to execve(2) “init” process
• If rdinit parameter is set, exec the path
• If init parameter is set, exec the path
• Try to run “/sbin/init,” “/etc/init,” “/bin/init,” “/bin/sh”
• If nothing worked, panic with a familiar message:
26
"No working init found. Try passing init= option to kernel. See Linux
Documentation/init.txt for guidance."
27. kernel_init_freeable
• First, wait for the completion of kthreadd’s setup
• Set init’s allowed cpus/mems to all CPUs and nodes
• Set cad_pid to init’s
• Prepare to boot other CPUs (smp_prepare_cpus)
• Call early initcalls (do_pre_smp_initcalls)
• Initialize lockup_detector (lockup_detector_init)
• Initialize multiprocessor (smp_init)
• Boots up other cores/sockets
• Initialize the scheduler (sched_init_smp)
• Call the do_basic_setup function (-> Next slide)
• Open “/dev/console” and dup twice (fd : 0 to 2)
• Check if the ramdisk is available
• If not, try to mount root (prepare_namespace)
• Load the I/O scheduler (elevator) module
27
28. do_basic_setup
• Re-initialize cpuset to the active CPUs
(cpuset_init_smp)
• Initialize user-mode helper (khelper)
• Initialize tmpfs (shmem_init)
• Initialize drivers (driver_init)
• Create proc directories and files for IRQs (init_irq_proc)
• Call constructors (do_ctors) (CONFIG_CONSTRUCORS)
• Enable the user-mode helper workqueue
• Call all the initcalls (do_initcalls)
• Initialize random values (random_int_secret_init)
28
29. initcalls
• Facility to call initialization functions during the
initialization (in the kernel_init_freeable function)
• Example
29
static int cpu_pm_init(void)
{
register_syscore_ops(&cpu_pm_syscore_ops);
return 0;
}
core_initcall(cpu_pm_init);
(kernel/cpu_pm.c)
30. Level of initcalls
• Several levels (the order to call) are defined
30
Macro Lv. # Description
early_initcall early called before smp
pure_initcall 0 no dependency, variable initizalization
core_initcall{,_sync} 1, 1s
postcore_initcall{,_sync} 2, 2s
arch_initcall{,_sync} 3, 3s
subsys_initcall{,_sync} 4, 4s
fs_initcall{,_sync} 5, 5s
rootfs_initcall rootfs
device_initcall{,_sync} 6, 6s
late_initcall{,_sync} 7, 7s
31. Initcall definition
• Collect all the pointers for initcall functions at
certain sections
• Section name : “.initcall lv .init”
• E.g. for “core_initcall”, the section will be “.initcall1.init”
31
#define __define_initcall(fn, id)
static initcall_t __initcall_##fn##id __used
__attribute__((__section__(".initcall" #id ".init"))) = fn;
LTO_REFERENCE_INITCALL(__initcall_##fn##id)
(include/linux/init.h)
33. Special initcalls
• console_initcall
• Called from console_init (in kernel_start)
• security_initcall
• Called from security_init (in kernel_start)
• When used in loadable modules (not
recommended), it’s replaced by module_init
33
#else /* MODULE */
/* Don't use these in loadable modules, but some people do... */
#define early_initcall(fn) module_init(fn)
#define core_initcall(fn) module_init(fn)
...
(include/linux/init.h)
34. Initcall debug
• Kernel command-line option: “initcall_debug”
• Shows the debug message
• When it calls and is returned from each initcall function, it
prints a message with elapsed time
34
static int __init_or_module do_one_initcall_debug(initcall_t fn)
{
...
pr_debug("calling %pF @ %in", fn, task_pid_nr(current));
calltime = ktime_get();
ret = fn();
rettime = ktime_get();
...
pr_debug("initcall %pF returned %d after %lld usecsn",
fn, ret, duration);
...
}
(init/main.c)
36. How the multiple cores are started?
• Two types
36
HW Power On
Start Linux kernel
Initialize SMP
Core 0 Core 1 Core 2 …
Wake up
Wake up
Core 0 Core 1 Core 2
Wake up
Wake up
Stop &
Wait Stop &
Wait
37. How the multiple cores are started?
• The first type
• x86, ARM, etc.
• (x86) The first processor (core) is determined by HW,
and called “the bootstrap processor” (BSP). The
remaining processor(s) (cores) are called “application
processor(s)” (APs).
• The second type
• PowerPC (some models), etc.
37
38. MP Detection
• How to detect the number of cores available in the
hardware?
• Firmware Information
• ACPI MADT (Multiple APIC Description Table) (x86)
• SFI (Simple Firmware Interface) (Xeon Phi)
• MP Configuration Table (Very old x86)
• DeviceTree (ARM)
• Or hardcoded (ARM…)
• Kernel boot parameters
• nosmp
• maxcpus=<n>
• Kernel configuration
• CONFIG_NR_CPUS
38
39. MP Booting
• x86
• INIT IPI
• The sequence of INIT, INIT, STARTUP IPI.
• NMI (For CPU0)
• “This works to wake up soft offline CPU0 only”
• ARM
• “enable-method” node in the device tree
• Depends on the board (march)
• ARM64
• “enable-method” node in the device tree
• “spin-table”
• Cores spin at some memory area (outside the kernel). When a
value is written to the area, the core jumps to the written address.
• “psci” (Power State Coordination Interface)
39
40. AP Initialization
• After woken up, where will AP execute?
• X86
• First, “trampoline code”
• Switches from real-mode to the 32-bit or 64-bit mode
• Located in the very low memory since the new core start in the
real-mode
• Then, jump to the secondary entrypoint
• 32-bit : startup_32_smp (arch/x86/kernel/head_32.S)
• 64-bit : secondary_startup_64 (arch/x86/kernel/head_64.S)
• ARM64
• First, “secondary_holding_pen” (arch/arm64/kernel/head.S)
• After woken up, all the cores are held at this function
• Then, secondary_startup
40
41. AP Initialization (2)
• Initializes the CPU state for the new core in the
assembler level
• Paging on
• Some special registers…
• Then, goes to the C code
• start_secondary (in x86, arch/x86/kernel/smpboot.c)
• secondary_start_kernel (in ARM/ARM64,
arch/arm{,64}/kernel/smp.c)
• Finally, it goes to the idle loop as the boot task
• cpu_startup_entry
41
42. start_secondary (x86)
42
# Function Category Description
1 cpu_init CPU Various CPU states
2 x86_cpuinit.early_percpu_
clock_init
3 smp_callin SMP Notify the BSP of the AP’s boot-up
4 check_tsc_sync_target
5 set_cpu_online SMP Set the cpu_online_mask
6 x86_platform.nmi_init CPU
7 boot_init_stack_canary Debug
8 x86_cpuinit.setup_percpu
_clockev
9 cpu_startup_entry
43. secondary_start_kernel (ARM64)
43
# Function Category Description
1 (Set the current mm to
init_mm)
MM
2 set_my_cpu_offset SMP Set per-cpu offset
3 cpu_set_reserved_ttbr0 CPU Set TTBR0 to the zero page
4 cpu_ops[cpu]-
>cpu_postboot
CPU
5 notify_cpu_starting
6 smp_store_cpu_info
7 set_cpu_online
8 complete Notify the boot CPU of the core’s boot
9 cpu_startup_entry Go to the idle loop