cfenollosa_os-tutorial/10-32bit-enter
Hennik Hunsaker 7d932d43b3 Add Pandoc Support
- Add a Pandoc defaults file
- Add a Pandoc template based on the default one
- Add chapter headers to each section

### Usage

To use, install Pandoc and ConTeXt, then simply run
`pandoc -d ./pandoc.yaml` from the repo root.

### Maintenance

When new chapters get added, the `pandoc.yaml` will need to be updated
to include each new chapter's markdown file(s).

### Miscellaneous Notes

- The PDF generated complies with PDF/A 1b:2005 by default.
- The PDF also contains the source markdown files as attachments
- All links are fully functional!
- Includes a table of contents! With links to each section!

### Conclusion

Enjoy!
2023-09-05 01:46:32 -06:00
..
32bit-main.asm lessons 8, 9, 10, entering 32-bit mode 2014-10-09 11:38:11 +02:00
32bit-switch.asm lessons 8, 9, 10, entering 32-bit mode 2014-10-09 11:38:11 +02:00
README.md Add Pandoc Support 2023-09-05 01:46:32 -06:00

32-bit: Enter

Concepts you may want to Google beforehand: interrupts, pipelining

Goal: Enter 32-bit protected mode and test our code from previous lessons

To jump into 32-bit mode:

  1. Disable interrupts
  2. Load our GDT
  3. Set a bit on the CPU control register cr0
  4. Flush the CPU pipeline by issuing a carefully crafted far jump
  5. Update all the segment registers
  6. Update the stack
  7. Call to a well-known label which contains the first useful code in 32 bits

We will encapsulate this process on the file 32bit-switch.asm. Open it and take a look at the code.

After entering 32-bit mode, we will call BEGIN_PM which is the entry point for our actual useful code (e.g. kernel code, etc). You can read the code at 32bit-main.asm. Compile and run this last file and you will see the two messages on the screen.

Congratulations! Our next step will be to write a simple kernel