Commit Graph

88 Commits

Author SHA1 Message Date
greg
17466c6547 Moving files to rust-xargo dir 2017-03-30 03:09:29 -07:00
greg
c55ff680d4 rust linker script 2017-03-30 02:44:32 -07:00
greg
ca34b61d95 Add raspi json target 2017-03-30 02:44:16 -07:00
greg
aa420a6c57 Raspi asm stub for loading kernel
Not quite working yet
2017-03-26 23:09:42 -07:00
greg
d56c93dc4f Add raspi boot files 2017-03-26 02:09:01 -07:00
greg
4485fbb579 Add raspi_os here
Eventually this is gonna be part of Ferrocyanide
2017-03-25 22:47:34 -07:00
greg
76bbf76bd7 Add delay of 1 to grub.cfg
Just show the grub menu long enough to prove it exists
2017-03-25 21:44:55 -07:00
greg
6b8db9e998 Give the OS a name
I'm gonna give my toy os the name "Ferrocyanide" (becuase I was watching
the Cody's Lab video where he drank cyanide earlier today). Also move
all relevant files to new directory
2017-03-25 21:42:03 -07:00
greg
5b76bb7444 Add back code that does something 2017-03-25 20:36:12 -07:00
greg
2b3657dddf Had to add this stub to make the linker happy 2017-03-24 04:03:14 -07:00
greg
f4a6924248 Cleaning up some compiler warnings
for a new version of rustc
2017-03-22 10:33:07 -07:00
greg
75c2c09f9c main loop should spin after clear()
blank canvas for testing more advanced vga stuff
2016-06-23 01:02:58 -07:00
greg
6037d917e5 Add spin_wait function
Simple pure rust spin wait
2016-06-23 00:46:23 -07:00
greg
ad61d53c8f Add printstr functionality 2015-11-27 16:35:05 -08:00
greg
02ffdd55bd Add multiboot2 rust lib
c.f. os.phil-opp.com/allocating-frames.html
2015-11-27 15:02:29 -08:00
greg
6c127273b3 Some more text drawing logic 2015-11-25 21:56:39 -08:00
greg
db8995b15f Utility function for low, high bits 2015-11-25 02:06:39 -08:00
greg
aa9e74299c Add cursor-moving functionality 2015-11-25 02:02:03 -08:00
greg
ed76893b65 Clean up lib.rs code
Moved functions around, etc.
2015-11-24 01:11:05 -08:00
greg
7cb8affb2d Move PIT config into rust 2015-11-23 23:20:27 -08:00
greg
cf9c7085c6 More moving things around and deleting obsolete code 2015-11-23 22:49:33 -08:00
greg
49c49cb349 Cleaning up code
Moving things around, deleting some callins to asm (namely get_rdtsc)
since I don't need them right yet
2015-11-23 22:37:20 -08:00
greg
fb6d6df087 Fixed PIC initialization in rust
I think I just had the inline assembly wrong, so outb wasn't working
properly
2015-11-23 22:10:45 -08:00
greg
362f616660 Add double-fault handler
and macro-ize some interrupt handler boilerplate
2015-11-23 04:12:13 -08:00
greg
b5e78209e6 Move PIC offsets
Can't make this work from within rust for some reason, use asm
2015-11-23 02:17:45 -08:00
greg
9f3c1f8f29 Modularize PIC-rust stuff 2015-11-18 22:06:01 -08:00
greg
eaefb7b799 Kill a spinloop in the 32-bit boot
Boot is taking too much time
2015-11-18 02:37:11 -08:00
greg
53357fb096 remove assembly setup PIC 2015-11-18 02:12:52 -08:00
greg
cb4d718af1 Macro-ify asm IDT entry loading 2015-11-18 02:11:09 -08:00
greg
8106038690 Move PIC logic to rust 2015-11-17 04:06:55 -08:00
greg
d133c198a4 Implement changing PIT frequency
ticks are now 1000.15 or so Hz
2015-11-17 03:30:43 -08:00
greg
a209559319 Flash things onto screen
also make the keyboard interrupt try to work?
2015-11-16 21:27:19 -08:00
greg
636e540355 Make timer interrupt display things on screen 2015-11-15 23:16:30 -08:00
greg
730c2c7d71 Timer interrupt seems to work
Default settings on PIT, but maybe will want to mess with them later
2015-11-15 14:41:49 -08:00
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