ethandmd / reedos

rust riscv minimal os
2 stars 6 forks source link

Wrote plic init stub #53

Closed Pooletergeist closed 1 year ago

Pooletergeist commented 1 year ago

hey folks!

Big Red Flag: this is barely tested.

Pushing it here because Ethan mentioned you were writing a Plic and I thought it might save you a minute or two fishing for constants. Maybe you can pull this into a quarantine branch and play with it.

As-is, it boots on my machine.

Unfortunately, uncommenting the call to plic::local_init() for hart1 throws an error that the global OnceCell, PLIC, is empty; so plic::local_init() cannot be called.

Although roughly seeming to be initialized, plic interrupts for hart0 are still untested.

TCCQ commented 1 year ago

I pulled this into 7-plic branch, and fixed it up, and got it playing nice with the other stuff that has happened since this fork. Thanks! It works!