Initial commit: Schunix as it stands before the SchOS rename
An x86-64 operating system built from xv6, now largely rewritten: SMP, a copy-on-write root filesystem (SchFS), PCI/USB/virtio drivers, a TTF rasteriser, and a Linux-numbered syscall ABI. No history before this point -- the tree was never under version control. This commit exists so the rename that follows has something to undo to.
This commit is contained in:
commit
d0f7acf9eb
275 changed files with 51417 additions and 0 deletions
27
tools/vectors.pl
Normal file
27
tools/vectors.pl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
# Generate vectors.S, the trap/interrupt entry points.
|
||||
# There has to be one entry point per interrupt number
|
||||
# since otherwise there's no way for trap() to discover
|
||||
# the interrupt number.
|
||||
|
||||
print "# generated by vectors.pl - do not edit\n";
|
||||
print "# handlers\n";
|
||||
print ".global alltraps\n";
|
||||
for(my $i = 0; $i < 256; $i++){
|
||||
# print ".global vector$i\n"; # might be useful for debugging
|
||||
print "vector$i:\n";
|
||||
if(!($i == 8 || ($i >= 10 && $i <= 14) || $i == 17)){
|
||||
print " push \$0\n";
|
||||
}
|
||||
print " push \$$i\n";
|
||||
print " jmp alltraps\n";
|
||||
}
|
||||
|
||||
print "\n# vector table\n";
|
||||
print ".data\n";
|
||||
print ".global vectors\n";
|
||||
print "vectors:\n";
|
||||
for(my $i = 0; $i < 256; $i++){
|
||||
print " .quad vector$i\n";
|
||||
}
|
||||
Loading…
Reference in a new issue