In: Computer Science
Which programs (C and assembly, etc.) of xv6 has the codes for the boot procedure?
Can we use printf() to print a message during the boot process and why?
The first part of the boot process concerns itself with setting up the kernel code in memory,setting up the kernel code in memory ,setting up sutiable page tables to translate the kernels memory address, and initializing devices.After the kernel starts running, it starts up user processor, starting with the first init processin the userinit fuction.to create the first process the allocproc function is used to allocate a new proc structure..the init process sets up the first three file descriptors and all point to th console.The shell program gets the users input,parses it into a command and runs it .
In the normal U-boot boot process ,a limited amout of information is printed to the console. U-boot use printf and puts to print the information on the consoles .The built -in xv6 prinf() implemtation, whose source code is in printf.c is implemented by calling write(), but if often calls write more than one time per call to printf().