Skip to content
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

Add x86_64 32-bit address mode prefix to ix86_skip_instruction #144

Merged

Conversation

rakslice
Copy link
Contributor

@rakslice rakslice commented Dec 2, 2020

In the sigsegv instruction skipping for x86_64, skip the 0x67 32-bit address mode "legacy prefix" (see https://wiki.osdev.org/X86-64_Instruction_Encoding#Legacy_Prefixes)

Fixes #143

(cherry picked from commit 05b3236afd71886826d6e4784ca4e708f67aaa80)
(cherry picked from commit e00c6f20919e18b51b9bbbdad0a1eb0f131b0483)
(cherry picked from commit 72a1513a360118b03b7c29be519125f7d5f7cc8e)
(cherry picked from commit 497b5bc5a9ffbf1e8a74ad808423be0223099920)
… for anything

(cherry picked from commit 85f8971d8d4fe5c8b3c3cd78550ab69e95600323)
@SegHaxx
Copy link

SegHaxx commented Dec 2, 2020

Awesome, with this patch I can boot a Mac OS 8.6 CD to the desktop, with direct addressing mode and JIT disabled, and no having to disable security. JIT results in a PPC backtrace.

Merging this and #142 should give us a working default build on current Linux x86_64 systems with no fiddling.

@ianfixes
Copy link
Member

ianfixes commented Dec 2, 2020

Is there a way that we could write unit tests (for the process you described in #142) to verify these launches as part of CI?

@SegHaxx
Copy link

SegHaxx commented Dec 2, 2020

I was going to say, if people want to make CI really useful, implement an automated test that fires up a real Mac OS disk and confirm it boots. :)

@ianfixes
Copy link
Member

ianfixes commented Dec 2, 2020

Is that something that can be done in the shell or is that a UI-focused activity? (or something entirely new that needs to be coded up)?

@SegHaxx
Copy link

SegHaxx commented Dec 2, 2020

Getting off topic but you could, for example rig up a test harness that fires up an emulator, hashes the video memory every few seconds, and signals a pass when it matches a properly booted desktop. :)

If you want to be real fancy, have your reference MacOS disk image auto start a full hardware test suite and confirm it ran properly. like say https://macintoshgarden.org/apps/snooper-20

@rakslice
Copy link
Contributor Author

rakslice commented Dec 2, 2020

Merging this and #142 should give us a working default build on current Linux x86_64 systems with no fiddling.

Well, just the fiddling of having to turn JIT off so it doesn't crash.

@SegHaxx
Copy link

SegHaxx commented Dec 3, 2020

That's a fiddle that doesn't need sudo. :)

For whats its worth, don't know if it was broke before but I saw the fix for Basilisk II, JIT seems to work just fine on BII on x86_64 with this patch so no worries there. Speedometer 4 benchmarks it at around 100x faster than a Quadra 605.

@ianfixes
Copy link
Member

ianfixes commented Dec 3, 2020

you could, for example rig up a test harness

Let's open a separate issue for this exact thing. I think there are enough bells and whistles in GitHub Actions for me to pull this off, I just need guidance on how one would do that on a local machine.

In the meantime, am I hearing that this is tested & ready for merge?

@rakslice
Copy link
Contributor Author

rakslice commented Dec 3, 2020

Yeah, I meant: turn off the JIT in SheepShaver so it doesn't crash. The generated stuff I was referring to is from the dyngen, is only used for the JIT for PowerPC, and so doesn't apply to BII. Sorry for the ambiguity.

As far as the change in this pull request goes, the one we are talking in the comments of, yes it is tested and ready to merge.

@ianfixes
Copy link
Member

ianfixes commented Dec 3, 2020

Added #146 to track the emulator idea

@ianfixes ianfixes merged commit b0a8453 into emaculation:master Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SheepShaver x86_64 no jit: crash on boot
3 participants