Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Some test suite tweaks #24

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

Merged
GabrielMajeri merged 5 commits into rust-osdev:master from HadrienG2:test-cleanup
Sep 22, 2018
Merged

Some test suite tweaks #24

GabrielMajeri merged 5 commits into rust-osdev:master from HadrienG2:test-cleanup
Sep 22, 2018

Conversation

Copy link
Contributor

@HadrienG2 HadrienG2 commented Sep 21, 2018

So, while I was around the test suite trying to fix the issue discussed in #1, I thought I could as well do some extra cleanup.


assert_eq!(phys_start, 0, "Memory does not start at address 0");
assert!(page_count != 0, "Memory map entry has zero size");
Copy link
Contributor Author

@HadrienG2 HadrienG2 Sep 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just another sanity check. The UEFI spec mandates this, and it can be used to check that we did not get a memory block full of zeroes...

GabrielMajeri reacted with thumbs up emoji
@@ -48,29 +48,39 @@ fn fill_color(gop: &mut GraphicsOutput) {
fn draw_fb(gop: &mut GraphicsOutput) {
let mi = gop.current_mode_info();
let stride = mi.stride();
// BUG: we should check we have enough space to draw.
// let (width, height) = mi.resolution();
Copy link
Contributor Author

@HadrienG2 HadrienG2 Sep 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

GabrielMajeri reacted with thumbs up emoji
let index = (row * stride) + column;

// BUG: we assume the pixel format is 32-bit BGR, as it often is on x86.
// For RGB the red / blue channels will be inverted.
Copy link
Contributor Author

@HadrienG2 HadrienG2 Sep 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Simplified the functionality of set_pixel along the way to reduce code duplication between RGB and BGR.

stdout.enable_cursor(false).unwrap_or_else(|s| match s {
Status::Unsupported => info!("Cursor visibility control unavailable"),
_ => panic!("Failed to hide cursor")
});
Copy link
Contributor Author

@HadrienG2 HadrienG2 Sep 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to fixing the bug in #1, this also ensures that the new debug messages pointing out that showing and hiding the cursor is not supported will not corrupt the display.

GabrielMajeri reacted with thumbs up emoji
@GabrielMajeri GabrielMajeri merged commit 188da95 into rust-osdev:master Sep 22, 2018
@HadrienG2 HadrienG2 deleted the test-cleanup branch September 22, 2018 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /