More image file salvaging

Patch 3: Initialization/
pull/693/head
Michael D 5 years ago
parent a82aca5a4a
commit 99e156101a

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@ -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:

@ -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:

@ -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.

Loading…
Cancel
Save