xv6 reading homework

Throughout this semester, we expect that you will read the entire implementation of the xv6 kernel, accompanied by the xv6 book, which explains the rationale and design underlying the kernel's implementation.

For this lecture, read the following files in the xv6 kernel implementation:

Look for the line

  WriteReg(IER, IER_TX_ENABLE | IER_RX_ENABLE);
in uartinit() in kernel/uart.c. Try to guess what would happen if you deleted that line and then booted xv6. When would things start to go wrong? Would the xv6 shell be able to print a prompt? Would you be able to type commands to the shell?


Now delete the line, run xv6, and see if your guess was right. What are the reasons your guess is right / wrong?

You may find the 16550 UART manual and Chapter 6 of the book useful in understanding the UART, interrupts, and device drivers.

Submit your answer in an ASCII text file named homework.txt to the corresponding "Lecture N" assignment on Gradescope.


Questions or comments regarding 6.1810? Send e-mail to the course staff at 61810-staff@lists.csail.mit.edu.

Creative Commons License