Bug #573
closedDragonFly on Intel Mac?
0%
Description
Hi.
Although it runs fine on Parallels Desktop(an emulator), it doesn't
with BootCamp. LiveCD stops twirling the baton prematurely.
There's been some good efforts in FreeBSD to install and boot on
MacBook Pro via BootCamp last year, and I confirmed that 6.2-RELEASE
installs and runs almost fine. I searched through their commit log, and
ported the relavant parts (patch attached). MacBook Pro is a legacy-free
hardware and has no keyboard controller, and the patch puts upper limit
on the amount of time to wait for the controller to be ready (or give up),
according to their commitlog.
With this patch, it does boot past the boot loader, but it ends up
in double fault after many lines of 'sched_ithd: stray interrupt 7'.
Also I need to disable acpi driver because it fills the screen with
garbage and I can't see anything in the boot log. I tested cdboot
and the kernel on other PCs and had no problem. So it's probably
safe to commit.
I'm currently playing with it installed in a spare partition of
FreeBSD 6.2-RELEASE installation. The hardest part is that even
on FreeBSD, the keyboard rarely work until the OS boots up (and I saw
this with SuSE too). In fact it's easier edit /boot.config and
/boot/loader.conf from FreeBSD installation than keep punching the
power button :) This may or may not be BootCamp's fault. I hope to post
a few more positive news/patch soon.
Cheers.
Files
Updated by dillon over 17 years ago
:Hi.
:Although it runs fine on Parallels Desktop(an emulator), it doesn't
:with BootCamp. LiveCD stops twirling the baton prematurely.
:There's been some good efforts in FreeBSD to install and boot on
:MacBook Pro via BootCamp last year, and I confirmed that 6.2-RELEASE
:installs and runs almost fine. I searched through their commit log, and
:ported the relavant parts (patch attached). MacBook Pro is a legacy-free
:hardware and has no keyboard controller, and the patch puts upper limit
:on the amount of time to wait for the controller to be ready (or give up),
:according to their commitlog.
:
: With this patch, it does boot past the boot loader, but it ends up
:in double fault after many lines of 'sched_ithd: stray interrupt 7'.
:Also I need to disable acpi driver because it fills the screen with
:garbage and I can't see anything in the boot log. I tested cdboot
:and the kernel on other PCs and had no problem. So it's probably
:safe to commit.
:
:I'm currently playing with it installed in a spare partition of
:FreeBSD 6.2-RELEASE installation. The hardest part is that even
:on FreeBSD, the keyboard rarely work until the OS boots up (and I saw
:this with SuSE too). In fact it's easier edit /boot.config and
:/boot/loader.conf from FreeBSD installation than keep punching the
:power button :) This may or may not be BootCamp's fault. I hope to post
:a few more positive news/patch soon.
:
:Cheers.
There's something going on with the stray irq printf() itself
possibly being the cause of the double fault. I think the printf()
in that situation (interrupting random kernel code without MP lock
controls) is not safe.
Except for the interrupt disablement and reenablement bits, I like
the patch. I don't think those bits are necessary.
It may also be a good idea to put a DELAY() in the C code loop instead
of relying on ISA bus timing (which won't actually be ISA bus timing
because the ISA bus is faked these days). I'm not sure what
the best solution would be for the assembly. It might not be a big
deal but it could save us headaches later on.
-Matt
Updated by justin over 17 years ago
On Tue, March 6, 2007 8:41 am, YONETANI Tomokazu wrote:
If you have a disk image to try out, I can give it a whirl on my MacBook Pro.
Updated by qhwt+dfly over 17 years ago
Ripped the interrupt disablement and reenablement bit and it works.
Also the previous patch missed changes to dev/misc/kbd .
The commit log for original patch doesn't seem to be very determined about
the amount of time to wait. Inserting DELAY can gurantee to wait
at least for one second before giving up.
You mean the hard disk image? Maybe you can install it to a BootCamp
partition(mine appears as /dev/disk0s3) using `dd' command from Mac OS X,
but I haven't tried it yet. On FreeBSD, the disk appears to be ad5s3, but
I could use boot0cfg, so I imagine just installing the slice image doesn't
make it bootable. I need to investigate on this later.
Cheers.
Updated by justin over 17 years ago
On Sun, March 11, 2007 1:51 am, YONETANI Tomokazu wrote:
I had meant an ISO, though I suppose if you commit this, I can just use a
1.9 build from chlamydia. I haven't really looked at the disk
partitioning process, but I think I can break out a third/fourth partition
and install swap/normal disk to that.
Updated by dillon over 17 years ago
:+ for (i = 0; i != 65535; i++) {
:+ if ((bus_space_read_1(tag, ioh1, 0) & 0x2) 0)
:+ break;
:+ }
:+ if (i 65535) {
:+ bus_release_resource(dev, SYS_RES_IOPORT, 0, port0);
:+ bus_release_resource(dev, SYS_RES_IOPORT, 1, port1);
:+ return ENXIO;
:+ }
Do this instead:
for (i = 65536; i != 0; --i) {
...
}
if (i == 0) {
...
}
Ok, its a nit, but you aren't duplicating the counter constant and
not depending on the compiler to optimize the constant. And the code
is a bit smaller.
-Matt
Updated by qhwt+dfly over 17 years ago
Thanks for the reminder, I'll take care of it this weekend.
Cheers.