Author Topic: memory map correction  (Read 2937 times)

0 Members and 1 Guest are viewing this topic.

olegischinski

  • Entrant
  • Posts: 2
memory map correction
« on: March 04, 2010, 12:16:11 AM »
Perhaps it's possible, Chameleon corrects the memory map reporting by BIOS like Linux in early boot process.

People with the Gigabyte GA-E7AUM-DS2H have a problem with overlapping memory in OSX, which causes kernel panics. One guy in the forum found a solution patching Chameleon with a hardcoded memory map, which is not the best way, I think.

If interested have a look here http://www.insanelymac.com/forum/index.php?showtopic=161348&pid=1319853&mode=threaded&start=200#entry1319853

I could imagine it's not the only mainboard with a bad BIOS in this regard.

toitione

  • Guest
Re: memory map correction
« Reply #1 on: September 05, 2010, 08:19:00 PM »
Hello,

I've noticed the same message in Linux. I've saw in the kernel code that they lookup the BIOS manufacturer and then mark the first 64Ko memory as reserved if it match AMIBIOS and an other one i don't remember.

I've got a random problem at boot, some time the BIOS (AMI) asks me to restore the default settings, so I was wondering if it could be linked with this.

Kabyl

  • VoodooLabs
  • Posts: 158
Re: memory map correction
« Reply #2 on: September 05, 2010, 08:50:32 PM »
Perhaps it's possible, Chameleon corrects the memory map reporting by BIOS like Linux in early boot process.

People with the Gigabyte GA-E7AUM-DS2H have a problem with overlapping memory in OSX, which causes kernel panics. One guy in the forum found a solution patching Chameleon with a hardcoded memory map, which is not the best way, I think.

If interested have a look here http://www.insanelymac.com/forum/index.php?showtopic=161348&pid=1319853&mode=threaded&start=200#entry1319853

I could imagine it's not the only mainboard with a bad BIOS in this regard.

Interesting, I was thinking about doing this for a long time, but it's the first time I see a reason to do it, so this is now in my todo list.

I'm going to see how linux does it, and try to apply it in the booter.

Thank you, and thanks to toitione for bumping this topic.

EDIT:
After checking the sources, I found a function "rerangeMemoryMap()" that's supposed to do what we want:
http://forge.voodooprojects.org/p/chameleon/source/tree/HEAD/trunk/i386/libsaio/biosfn.c#L103

I'm not sure who's the person behind it, and I don't know why it's disabled, maybe you can try it and see what happens?
« Last Edit: September 06, 2010, 11:12:36 AM by Kabyl »

toitione

  • Guest
Re: memory map correction
« Reply #3 on: September 07, 2010, 08:25:32 PM »
Indeed, I've already look up the code in biosfn.c and I didn't find any thing related to this. The function rerangeMemoryMap() is only a sort algorithm.

For the linux reference, you can look here : http://kerneltrap.org/mailarchive/linux-kernel/2008/11/12/4121014

Kabyl

  • VoodooLabs
  • Posts: 158
Re: memory map correction
« Reply #4 on: September 07, 2010, 11:25:22 PM »
Indeed, I've already look up the code in biosfn.c and I didn't find any thing related to this. The function rerangeMemoryMap() is only a sort algorithm.

For the linux reference, you can look here : http://kerneltrap.org/mailarchive/linux-kernel/2008/11/12/4121014

What olegischinski needs is sorting and clearing overlaps, and that's what this function does, at least that's what he did in his linked post.

So it seems we need to handle this first 64Ko memory issue too, in your case.

olegischinski

  • Entrant
  • Posts: 2
Re: memory map correction
« Reply #5 on: November 08, 2010, 12:40:36 PM »
hi kabyl,

wasn't here for a long time - sorry.

As I noticed meanwhile there is some code in the last trunk of chameleon (in the part you have referenced). I enabled it, compiled and it clears the overlap of memory. Many thanks to the one who wrote this!
I can't decide, if it should enabled generally, but hope it will stay in for future releases.