Git allows you to keep track of the changes you make to the code. For example, if you are finished with one of the exercises, and want to checkpoint your progress, you can commit your changes by running:.
You can keep track of your changes by using the git diff command. We have set up the appropriate compilers and simulators for you on Athena. To use them, run add -f 6. If you get obscure errors while compiling or running qemu , double check that you added the course locker. If you are working on a non-Athena machine, you'll need to install qemu and possibly gcc following the directions on the tools page.
We've made several useful debugging changes to qemu and some of the later labs depend on these patches, so you must build your own. Otherwise, follow the directions on the tools page. We use different Git repositories for you to hand in your lab.
The hand-in repositories reside behind an SSH server. You will get your own hand-in repository, which is inaccessible by any other students.
To authenticate yourself with the SSH server, you should have an RSA key pair, and let the server know your public key. The lab code comes with a script that helps you to set up access to your hand-in repository. Before running the script, you must have an account at our submission web interface. On the login page, type in your Athena user name and click on "Mail me my password".
You will receive your 6. Note that every time you click the button, the system will assign you a new random password. Now that you have your 6. When you are ready to hand in your lab, first commit your changes with git commit , and then type make handin in the lab directory. The latter will run git push handin HEAD , which pushes the current branch to the same name on the remote handin repository.
If you have made changes to your hand-in repository, an email receipt will be sent to you to confirm the submission. You can run make handin or git push handin as many times as you want. The late hours of your submission for a specific lab is based on the latest hand-in push time of the corresponding branch. For Lab 1, you do not need to turn in answers to any of the questions below. Do answer them for yourself though! They will help with the rest of the lab. We will be grading your solutions with a grading program.
You can run make grade to test your solutions with the grading program. If you are not already familiar with x86 assembly language, you will quickly become familiar with it during this course! Hopefully, the book contains mixture of new and old material for you. While semantically equivalent, an assembly file will differ quite a lot, at least superficially, depending on which syntax is used. Luckily the conversion between the two is pretty simple, and is covered in Brennan's Guide to Inline Assembly.
Exercise 1. Familiarize yourself with the assembly language materials available on the 6. You don't have to read them now, but you'll almost certainly want to refer to some of this material when reading and writing x86 assembly.
Certainly the definitive reference for x86 assembly language programming is Intel's instruction set architecture reference, which you can find on the 6. An equivalent and often friendlier set of manuals is available from AMD. Instead of developing the operating system on a real, physical personal computer PC , we use a program that faithfully emulates a complete PC: the code you write for the emulator will boot on a real PC too.
Using an emulator simplifies debugging; you can, for example, set break points inside of the emulated x86, which is difficult to do with the silicon version of an x To get started, extract the Lab 1 files into your own directory on Athena as described above in "Software Setup", then type make or gmake on BSD systems in the lab directory to build the minimal 6. It's a little generous to call the code we're running here a "kernel," but we'll flesh it out throughout the semester.
If you're running Debian or Ubuntu, try installing the gcc-multilib package. This executes QEMU with the options required to set the hard disk and direct serial port output to the terminal. Some text should appear in the QEMU window:. Everything after ' Booting from Hard Disk These lines printed by the kernel will also appear in the regular shell window from which you ran QEMU. Alternatively, you can use the serial console without the virtual VGA by running make qemu-nox. This may be convenient if you are SSH'd into an Athena dialup.
There are only two commands you can give to the kernel monitor, help and kerninfo. The help command is obvious, and we will shortly discuss the meaning of what the kerninfo command prints.
Although simple, it's important to note that this kernel monitor is running "directly" on the "raw virtual hardware" of the simulated PC. We don't recommend you do this on a real machine with useful information on its hard disk, though, because copying kernel.
We will now dive into a bit more detail about how a PC starts up. A PC's physical address space is hard-wired to have the following general layout:. The first PCs, which were based on the bit Intel processor, were only capable of addressing 1MB of physical memory. The KB area from 0xA through 0xFFFFF was reserved by the hardware for special uses such as video display buffers and firmware held in non-volatile memory.
The BIOS is responsible for performing basic system initialization such as activating the video card and checking the amount of memory installed. After performing this initialization, the BIOS loads the operating system from some appropriate location such as floppy disk, hard disk, CD-ROM, or the network, and passes control of the machine to the operating system. When Intel finally "broke the one megabyte barrier" with the and processors, which supported 16MB and 4GB physical address spaces respectively, the PC architects nevertheless preserved the original layout for the low 1MB of physical address space in order to ensure backward compatibility with existing software.
Modern PCs therefore have a "hole" in physical memory from 0xA to 0x, dividing RAM into "low" or "conventional memory" the first KB and "extended memory" everything else.
This game has a free trial. Embark on an epic adventure with the fantastic digging machine. Travel the world in search of ancient artifacts, lost civilizations, and unimaginable treasure.
Prove your strategic thinking, exploration, and puzzle solving skills. Manage fuel, drill temperature, hull damage, cargo space, oxygen, etc while searching for underground diggins. Sell your rare collection of artifacts to earn cash.
Use cash to upgrade your digging machine, make repairs, or purchase additional supplies. Stay informed about special deals, the latest products, events, and more from Microsoft Store. Available to United States residents. Animal Shelter. Release Date February 3, Features 9 different balls that you can unlock Entertaining and addictive gameplay Colorful 2D graphics Intuitive controls Lots of levels to complete Controls You can use your mouse to play this game.
Ball Puzzle Skill. The Smurfs. Super Friday Night Funkin. Hungry Shark Arena. Lego Worlds 2. Sniper Clash 3D. Minecraft Home Quest.
Lego Worlds 1. Minecraft Zoobert's Zoo 1. Superhero IO. We've made several useful debugging changes to qemu and some of the later labs depend on these patches, so you must build your own. Otherwise, follow the directions on the tools page. We use different Git repositories for you to hand in your lab. The hand-in repositories reside behind an SSH server. You will get your own hand-in repository, which is inaccessible by any other students. To authenticate yourself with the SSH server, you should have an RSA key pair, and let the server know your public key.
The lab code comes with a script that helps you to set up access to your hand-in repository. Before running the script, you must have an account at our submission web interface. On the login page, type in your Athena user name and click on "Mail me my password". You will receive your 6. Note that every time you click the button, the system will assign you a new random password. Now that you have your 6. When you are ready to hand in your lab, first commit your changes with git commit, and then type make handin in the lab directory.
The latter will run git push handin HEAD, which pushes the current branch to the same name on the remote handin repository. If you have made changes to your hand-in repository, an email receipt will be sent to you to confirm the submission. You can run make handin or git push handin as many times as you want. The late hours of your submission for a specific lab is based on the latest hand-in push time of the corresponding branch. In the case that make handin does not work properly, try fixing the problem with Git commands.
Or you can run make tarball. This will make a tar file for you, which you can then upload via our web interface. For Lab 1, you do not need to turn in answers to any of the questions below. Do answer them for yourself though!
They will help with the rest of the lab. We will be grading your solutions with a grading program. You can run make grade to test your solutions with the grading program. You will not have to write any code for this part of the lab, but you should go through it anyway for your own understanding and be prepared to answer the questions posed below. If you are not already familiar with x86 assembly language, you will quickly become familiar with it during this course!
Hopefully, the book contains mixture of new and old material for you. While semantically equivalent, an assembly file will differ quite a lot, at least superficially, depending on which syntax is used. Luckily the conversion between the two is pretty simple, and is covered in Brennan's Guide to Inline Assembly.
Familiarize yourself with the assembly language materials available on the 6. You don't have to read them now, but you'll almost certainly want to refer to some of this material when reading and writing x86 assembly. Certainly the definitive reference for x86 assembly language programming is Intel's instruction set architecture reference, which you can find on the 6.
An equivalent and often friendlier set of manuals is available from AMD. Instead of developing the operating system on a real, physical personal computer PC , we use a program that faithfully emulates a complete PC: the code you write for the emulator will boot on a real PC too. Using an emulator simplifies debugging; you can, for example, set break points inside of the emulated x86, which is difficult to do with the silicon version of an x To get started, extract the Lab 1 files into your own directory on Athena as described above in "Software Setup", then type make or gmake on BSD systems in the lab directory to build the minimal 6.
It's a little generous to call the code we're running here a "kernel," but we'll flesh it out throughout the semester. If you're running Debian or Ubuntu, try installing the gcc-multilib package. This executes QEMU with the options required to set the hard disk and direct serial port output to the terminal. Some text should appear in the QEMU window:. Everything after ' Booting from Hard Disk These lines printed by the kernel will also appear in the regular shell window from which you ran QEMU.
Alternatively, you can use the serial console without the virtual VGA by running make qemu-nox. This may be convenient if you are SSH'd into an Athena dialup. There are only two commands you can give to the kernel monitor, help and kerninfo. The help command is obvious, and we will shortly discuss the meaning of what the kerninfo command prints.
Although simple, it's important to note that this kernel monitor is running "directly" on the "raw virtual hardware" of the simulated PC. We don't recommend you do this on a real machine with useful information on its hard disk, though, because copying kernel. We will now dive into a bit more detail about how a PC starts up.
A PC's physical address space is hard-wired to have the following general layout:. The first PCs, which were based on the bit Intel processor, were only capable of addressing 1MB of physical memory.
The KB area from 0xA through 0xFFFFF was reserved by the hardware for special uses such as video display buffers and firmware held in non-volatile memory. The BIOS is responsible for performing basic system initialization such as activating the video card and checking the amount of memory installed.
After performing this initialization, the BIOS loads the operating system from some appropriate location such as floppy disk, hard disk, CD-ROM, or the network, and passes control of the machine to the operating system. When Intel finally "broke the one megabyte barrier" with the and processors, which supported 16MB and 4GB physical address spaces respectively, the PC architects nevertheless preserved the original layout for the low 1MB of physical address space in order to ensure backward compatibility with existing software.
Modern PCs therefore have a "hole" in physical memory from 0xA to 0x , dividing RAM into "low" or "conventional memory" the first KB and "extended memory" everything else.
In this case the BIOS must arrange to leave a second hole in the system's RAM at the top of the bit addressable region, to leave room for these bit devices to be mapped. Because of design limitations JOS will use only the first MB of a PC's physical memory anyway, so for now we will pretend that all PCs have "only" a bit physical address space.
But dealing with complicated physical address spaces and other aspects of hardware organization that evolved over many years is one of the important practical challenges of OS development. In this portion of the lab, you'll use QEMU's debugging facilities to investigate how an IA compatible computer boots. Open two terminal windows. In one, enter make qemu-gdb or make qemu-nox-gdb. In the second terminal, from the same directory you ran make , run make gdb. You should see something like this,. The make gdb target runs a script called.
From this output you can conclude a few things:. Why does QEMU start like this? Because the BIOS in a PC is "hard-wired" to the physical address range 0xfxfffff , this design ensures that the BIOS always gets control of the machine first after power-up or any system restart - which is crucial because on power-up there is no other software anywhere in the machine's RAM that the processor could execute. On processor reset, the simulated processor enters real mode and sets CS to 0xf and the IP to 0xfff0 , so that execution begins at that CS:IP segment address.
0コメント