ProjectOSX

Welcome Guest!

Returning User? Login here.

Want membership privileges? Register here.

 
Start a new topic Add Reply
> Osx On Joggler (7" Efi Firmare Mid) - Pmac Panic, Booting (or not!) XNU kernel on the 02 Joggler
humph
post Aug 29 2010, 10:33 PM
Post #1
Booting (or not!) XNU on the 02 Joggler

Thought I would try to get OSX running on a "Joggler", which is a variant of an OpenPeak product. Standard OS is Linux+Java UI layer.
Lots of people have Ubuntu running on the device, others are working on Android and MeGoo etc.
The interesting thing is that it has EFI firmware, American Megatrends EFI v2.0, I think; so you can get into reFit/Grub2 EFI etc and then onto an alternate OS.

After several weeks, finally managed to work out a patch to Grub2 v1.98.orig, to enable video to display during verbose boot, based on others' patches for Linux. (Not hard to see that I am I'm not a programmer, but I try my best smile.gif )
Recall that the device is using EFI, so this is GOP video mode, not VBE or VESA etc as on a BIOS PC, not that this should make any difference I think.
Anyway, so can now see where things are going wrong with the boot process!

Quick product specs:
- 7" touchscreen
- Intel Z520
- SCH US15W
- 512MB RAM (just about enough to run OSX, from tests with a netbook).
- 1GB Internal Flash...plus external USB port(s) for keypad, ext HD etc.
So, similar to SonyViaoP etc.

Process:
Booting off external USB HD drive that has had 10.6.0 installed via MBP. Added /E/E since expecting to be messing around a lot with kexts, if we get that far!
Once point to note is that I can't load a patched DSDT (so far) using Grub2's "acpi -e". Just get error, so plan to use kexts to workaround the issues.
Good part is that Grub2 is loading kernel and mkext/boot caches, and proceeds to boot OK.

Problem:
See image file attached. Panic from pmap_enter.
Attached File  P1010003.JPG ( 706.22K ) Number of downloads: 33

(Please ignore the framebuffer reference, is from the Grub console screen not being blanked correctly prior to boot...still got to fix that in Grub!!)
This is using one of the community kernels. Similar pmap panic using stock kernel, but seemed to not get "as far".
I speculated that it may be due to memory "running out", as the stock kernel is around 17MB vs 7MB for the other. But that may all be silly & wrong.

Anyway, so I've tracked down the relevant part of the kernel source (via http://fxr.watson.org/fxr/source/osfmk/i38...456.1.26#L2724)

CODE
File:   pmap.c
2724                       if (PV_HASHED_ENTRY_NULL == pvh_e) panic("pmap_enter: pv not in hash list");


I can see it's related somehow to memory, but, as not really a programmer, I don't really understand what's going wrong.

Can anyone shed light on this???!!!

I kind of hope it's something like Grub2 is not "setting up" memory allocation correctly, as then I feel I'll eventually be able to fix that.
However, knowing that will be a challenge for me, I'd like to know I'm heading in the right direction.

Thanks!

This post has been edited by humph: Aug 29 2010, 10:34 PM
Slice
post Aug 30 2010, 10:16 AM
Post #2
New kernel 10.4.0 doesn't contain such check and such panic.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
humph
post Aug 30 2010, 06:41 PM
Post #3
QUOTE (Slice @ Aug 30 2010, 11:16 AM) *
New kernel 10.4.0 doesn't contain such check and such panic.

Thanks Slice. I would never have thought to try a newer kernel (would figure things get tougher / more tests on newer ones!).

However, whilst it gets past that error, on 10.4.0 (qoopz/nawcom) kernel*, just get another similar panic:
Attached File  P1010004.JPG ( 750.63K ) Number of downloads: 11

*Upgraded the ext HD to 10.6.4; of course std 10.4.0 kernel won't boot due to CPU check.

CODE
        CHK_NPVHASH();
        pvhash_idx = pvhashidx(pmap, vaddr);
        LOCK_PV_HASH(pvhash_idx);
        pprevh = pvhash(pvhash_idx);
        if (PV_HASHED_ENTRY_NULL == *pprevh) {
            panic("pmap_pv_remove(%p,0x%llx,0x%x): empty hash", pmap, vaddr, ppn);
        }

So I figure this whole stuff about "pmap" is a problem, and is most likely related to EFI & Grub (and therefore, probably can be resolved) rather than the chipset etc since similar to successful installs. So, if can get past this stuff, I'm hopeful i'll be able to address any of the more common issues relatively easily.
And if not, well, at least I'll have learnt about Grub2, a bit about C coding etc.

Anyway, would be great then if you (or anyone!) could explain briefly what this function is all about? If I understand it a bit, it may well help me to figure out how to overcome.

(P.S. I can now compile kernels as well as Grub, so am not afraid to do some chopping/edits!).
pipposanta
post Sep 8 2010, 09:01 AM
Post #4
have you seen this? http://www.insanelymac.com/forum/index.php...;#;entry1165697
humph
post Sep 11 2010, 09:57 PM
Post #5
QUOTE (pipposanta @ Sep 8 2010, 10:01 AM) *

Yes sir, I had, but thank you for the response. It was nice confirmation that the CPU/chipset/GFX is not a roadblock before attempting this project.

In mean time, am still struggling to understand what is causing the issue, thining it's "clearly" something related to EFI on this device and Grub2 EFI (I say that since we know Grub2 EFI can boot OSX on Macs, also Grub2 PC on hacks), so am hopeful that changes to Grub (as opposed to XNU kernel, but that'd be OK) might get past this issue.
I've read the stuff in the pmap_internal.h, discussed with a friend who's a (paid) C programmer. But we conclude neither of us knows enough about what's going on with these pvs and hashed pvs at even a high level, to be able to understand the source code. It's humbling to be able to read it, understand all the words, but not understand what is being said sad.gif

So, pretty much resigned to shelving it, unless some kind soul can help point us in the right direction!

Add Reply Start a new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: