Commit Graph

54 Commits

Author SHA1 Message Date
greg
b5022ff286 Specifcally handle keyboard in separate function 2015-11-15 13:52:23 -08:00
greg
3f1f180f97 Keyboard handler works
You do have you make sure to read from 0x60 to make further interrupts
happen. Also I'm told this might be unreliable because you actually have
to make sure you're draining all the bytes, and this assumes only one
byte
2015-11-15 13:37:41 -08:00
greg
5c82d2835d Responds to keyboard
but I'm doing something wrong with responding to the interrupt it only
works once
2015-11-15 03:38:37 -08:00
greg
91632e8e99 Jump from interrupt into rust code 2015-11-15 02:50:38 -08:00
greg
2beb647839 Fix typo 2015-11-14 23:29:33 -08:00
greg
fcfefa9a5e Fixed interrupts
Lol u need iretq in 64-bit mode. Works now!
2015-11-14 23:13:14 -08:00
greg
1551bdc7b2 Interrupt handler works, sort of??
Something seems to be wrong with the iret out of it
2015-11-14 22:30:27 -08:00
greg
7aa3e0c290 Initialize IDT
With nothing in it, but calling lidt works ok it seems
2015-11-12 20:52:26 -08:00
greg
a39759ce4c Call interrupt from rust
Raise an interrupt from rust code - expect this to fail for now
2015-11-12 20:43:51 -08:00
greg
5eda610d24 Some more mucking with printing numbers 2015-11-10 23:28:36 -08:00
greg
cdbfca6003 Tests + util
Adds a utility function to make printing out u32's easier. Also mkaes it
possible to use the rust test harness while still compiling correct
low-level code, using #[cfg...] directives.
2015-11-10 22:17:54 -08:00
greg
6fdb396c73 Use rdtsc as makeshift timer
This is janky, but it is an example of some bit of state changing with
time, where I get the time from rdtsc.
2015-11-10 20:01:15 -08:00
greg
8ea1038d6b Use rdtsc
Get the rdtsc value (well the lower 32 bits) and print it to screen
2015-11-10 03:06:14 -08:00
greg
63775eaa7c print_int function
Just to print integer outputs of things on the screen
2015-11-10 03:02:30 -08:00
greg
8dcbdc997c Return from assembly
Show calling an assembly fn and returning a value
2015-11-10 02:46:54 -08:00
greg
532d84682c Call assembly from rust
All this does is print a V to the screen, but it means caling asm from
rust works. Remember that if this were in boot.asm, it'd be now-invalid
32 bit code and calling it would cause a page fault.
2015-11-10 02:23:56 -08:00
greg
5b84cc1457 Add debug qemu to makefile 2015-11-10 02:23:32 -08:00
greg
4254a05d83 Print all characters
Mostly I just wanted to see what 128+ character codes printed
2015-11-10 01:25:46 -08:00
greg
67dc4a5d42 Added checkerboard 2015-11-10 00:52:26 -08:00
greg
638056117f Fix clear() function 2015-11-10 00:46:08 -08:00
greg
0008341fcd Write to vga buffer from rust 2015-11-08 03:05:27 -08:00
greg
87e423f2e8 Gamarjoba, munde in rust 2015-11-08 01:17:08 -08:00
greg
a9635ab95b Necessary SSE stuff to make rust fully work 2015-11-08 01:09:07 -08:00
greg
d1eea2bb15 Test commit 2015-11-07 23:11:07 -08:00
greg
5566c1797b Jump to rust successfully
Yay! :D
2015-11-07 22:53:31 -08:00
greg
670e6828a5 Move to 64-bit mode works 2015-11-07 21:52:39 -08:00
greg
05a6ef1853 Add test for long mode 2015-11-07 17:06:30 -08:00
greg
60b10c3708 Add cpuinfo and stack-defining stuff 2015-11-07 17:02:41 -08:00
greg
f3605f554e Add dependencies to makefile correctly 2015-11-07 16:43:43 -08:00
greg
79052d289d Remove multiboot header from root 2015-11-07 15:56:33 -08:00
greg
8699d4aefb Add -f flag to makefile clean 2015-11-07 15:50:50 -08:00
greg
c9aea2176b Working hello world build env 2015-11-07 15:40:29 -08:00
greg
9137238f1f trying rust stuff again
Had no luck last time, starting from scratch
2015-10-28 23:15:19 -07:00
greg
90655746ca Rust kernel
Following  this post:
http://blog.phil-opp.com/rust-os/multiboot-kernel.html#fn2
2015-10-26 03:04:21 -07:00
greg
c5fcd73499 write_to_coord() in rust now has sensible coordinates 2015-10-22 23:40:18 -07:00
greg
3e6c6d17d7 Write to raw vram from rust
yay this works!
2015-10-22 23:13:12 -07:00
greg
59d73e940e add lightshow to makefile clean 2015-10-22 22:30:24 -07:00
greg
1955b5dd77 Lightshow works now
Followed a tip from
http://forum.osdev.org/viewtopic.php?f=1&t=20150

about moving the location of labels around, that made the linker error
go away and it looks like that fixed the restarting problem.

This commit also adds debugging flags to the build, and adds a debug
make target with the right commands to run gdb under qemu, which I'll
probably want to do in the future.
2015-10-22 22:24:51 -07:00
greg
66c8833908 Add lightshow
Doesn't work right now, not sure why
2015-09-23 23:22:15 -07:00
greg
fb62be4420 Add curses option to makefile 2015-09-21 11:48:30 -07:00
greg
c67997b54f Add keyboard scan 2015-09-21 02:22:44 -07:00
greg
05dd3ff9e8 Compile rust
Write a simple rust function, call it from C
2015-09-20 23:59:06 -07:00
greg
82b80dc56c Write print_int function in C 2015-09-18 03:43:14 -07:00
greg
b6851ab0b5 Support stuff for keyboard 2015-09-18 02:56:07 -07:00
greg
f4de677406 new file - keyboard.asm 2015-09-18 02:28:57 -07:00
greg
c4268d818a Move vram functions into separate file 2015-09-18 02:22:39 -07:00
greg
6c934dc845 Make the c variables be sane
Cleaned up calling convention of write_to_cell to be clean in the C,
cleared away some cruft
2015-09-17 22:29:08 -07:00
greg
a56cf9f455 And call into c from assembly 2015-09-17 21:57:10 -07:00
greg
2bf23664bf call c function from assembly 2015-09-17 21:48:47 -07:00
greg
7b0a70ab17 Coordinate print character function works 2015-09-17 03:05:38 -07:00