diff --git a/Initialization/images/CONFIG_NR_CPUS.png b/Initialization/images/CONFIG_NR_CPUS.png new file mode 100644 index 0000000..996f029 Binary files /dev/null and b/Initialization/images/CONFIG_NR_CPUS.png differ diff --git a/Initialization/images/NX.png b/Initialization/images/NX.png new file mode 100644 index 0000000..059e26d Binary files /dev/null and b/Initialization/images/NX.png differ diff --git a/Initialization/images/brk_area.png b/Initialization/images/brk_area.png new file mode 100644 index 0000000..e79b7d1 Binary files /dev/null and b/Initialization/images/brk_area.png differ diff --git a/Initialization/images/kernel_command_line.png b/Initialization/images/kernel_command_line.png new file mode 100644 index 0000000..e65f9b2 Binary files /dev/null and b/Initialization/images/kernel_command_line.png differ diff --git a/Initialization/linux-initialization-6.md b/Initialization/linux-initialization-6.md index fd945c9..89b12d4 100644 --- a/Initialization/linux-initialization-6.md +++ b/Initialization/linux-initialization-6.md @@ -89,7 +89,7 @@ noexec [X86] We can see it in the booting time: -![NX](http://oi62.tinypic.com/swwxhy.jpg) +![NX](images/NX.png) After this we can see call of the: @@ -465,7 +465,7 @@ First of all it get the size of the page table buffer, it will be `INIT_PGT_BUF_ Or we can find it with `readelf` util: -![brk area](http://oi61.tinypic.com/71lkeu.jpg) +![brk area](images/brk_area.png) After that we got physical address of the new `brk` with the `__pa` macro, we calculate the base address and the end of the page table buffer. In the next step as we got page table buffer, we reserve memory block for the brk area with the `reserve_brk` function: diff --git a/Initialization/linux-initialization-7.md b/Initialization/linux-initialization-7.md index 9c21956..64e72e3 100644 --- a/Initialization/linux-initialization-7.md +++ b/Initialization/linux-initialization-7.md @@ -390,7 +390,7 @@ void __init setup_nr_cpu_ids(void) Here `nr_cpu_ids` represents number of CPUs, `NR_CPUS` represents the maximum number of CPUs which we can set in configuration time: -![CONFIG_NR_CPUS](http://oi59.tinypic.com/28mh45h.jpg) +![CONFIG_NR_CPUS](images/CONFIG_NR_CPUS.png) Actually we need to call this function, because `NR_CPUS` can be greater than actual amount of the CPUs in the your computer. Here we can see that we call `find_last_bit` function and pass two parameters to it: diff --git a/Initialization/linux-initialization-8.md b/Initialization/linux-initialization-8.md index b92a9b9..057491b 100644 --- a/Initialization/linux-initialization-8.md +++ b/Initialization/linux-initialization-8.md @@ -203,7 +203,7 @@ It setups setup the `startup` and `teardown` callbacks (second and third paramet After this function we can see the kernel command line in the initialization output: -![kernel command line](http://oi58.tinypic.com/2m7vz10.jpg) +![kernel command line](images/kernel_command_line.png) And a couple of functions such as `parse_early_param` and `parse_args` which handles linux kernel command line. You may remember that we already saw the call of the `parse_early_param` function in the sixth [part](https://0xax.gitbooks.io/linux-insides/content/Initialization/linux-initialization-6.html) of the kernel initialization chapter, so why we call it again? Answer is simple: we call this function in the architecture-specific code (`x86_64` in our case), but not all architecture calls this function. And we need to call the second function `parse_args` to parse and handle non-early command line arguments.