-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix panic by disabling exceptions and more BIOS bug fixes #30
Commits on Jan 6, 2024
-
psx/sys: Make critical section unsafe
This could be made safe by checking cop0::Status before the syscall but that gets rid of the benefit that this function immediately disables exceptions before any loads from cop0.
Configuration menu - View commit details
-
Copy full SHA for ad35238 - Browse repository at this point
Copy the full SHA ad35238View commit details -
Revert "bios: Use syscalls for critical sections"
This reverts commit df12e35.
Configuration menu - View commit details
-
Copy full SHA for 141e766 - Browse repository at this point
Copy the full SHA 141e766View commit details -
psx: Make panic thread-safe and reentrant
The example BIOS previously had very random bugs because panic was not thread-safe. Essentially the loop {} was being ignored because if the exception handler changed threads. This commit fixes that by ensuring that panic happens in a critical section. A syscall is used to minimize the chance that an exception happens between panic's prologue and the critical section call but to really ensure this panic needs to be a naked function starting with the syscall. I'm not sure if this is worth it, but it may be a good idea to add a thread-aware panic handler in the example BIOS. The panic function was also not reentrant. Normally this should not occur because the panic function should be simple enough that it doesn't panic, but it was happening because of a typo in the framebuffer handling introduced when I added some video mode things. To make it reentrant I just use a static mut flag since it's already in a critical section and previous iterations won't hold onto mutable references.
Configuration menu - View commit details
-
Copy full SHA for 5f32dc5 - Browse repository at this point
Copy the full SHA 5f32dc5View commit details -
psx/gpu: Fix typo in VideoMode constants
This fixes a bug that was causing nested panics in a non-reentrant panic handler
Configuration menu - View commit details
-
Copy full SHA for a0b918f - Browse repository at this point
Copy the full SHA a0b918fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6455fdd - Browse repository at this point
Copy the full SHA 6455fddView commit details -
Configuration menu - View commit details
-
Copy full SHA for cd06122 - Browse repository at this point
Copy the full SHA cd06122View commit details
Commits on Jan 7, 2024
-
psx: Remove loop after nested panic warning and refactor panic.rs
In case of nested panics (e.g. cause by the CStr limit in println) this allows execution to continue until the second panic message.
Configuration menu - View commit details
-
Copy full SHA for 5655176 - Browse repository at this point
Copy the full SHA 5655176View commit details -
psx: Bump char limit on println!
There was a panic message in linked_list_allocator in the BIOS that needed a larger buffer.
Configuration menu - View commit details
-
Copy full SHA for 938f2f7 - Browse repository at this point
Copy the full SHA 938f2f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d746390 - Browse repository at this point
Copy the full SHA d746390View commit details -
Configuration menu - View commit details
-
Copy full SHA for 74d0534 - Browse repository at this point
Copy the full SHA 74d0534View commit details -
Configuration menu - View commit details
-
Copy full SHA for ddddd95 - Browse repository at this point
Copy the full SHA ddddd95View commit details