Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx> wrote: > > The arrays are defined in headers/private/kernel/boot/kernel_args.h, > their > sizes in > headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h > (the > MAX_*_RANGE definitions). Currently they are set to 4. So, if the > boundaries of one of the first 2 arrays are overwritten (i.e. there > are > more ranges for any reason), the range count of the following array > will be > invalid and the sort_addr_range() for that array will happily explore > a > good deal of memory (earlier or later unmapped addresses too). Which > would > be an excellent reason for reboot. :-) Just so: It appears that my machine loads 6 ranges into the "physical_allocated_array". Since MAX_PHYSICAL_ALLOCATED_RANGE. is defined as 4 - the sort_addr_range() function was definatly corrupting memory. I cleaned up the sort_addr_range() function. Adding a parameter limit the maximum array size and that improvement you mentioned to the bubble sort. As a result I have successfully booted Haiku with the IntelQuad Core processor. However, this minor fix seems to me to be just a band-aid. Should not the size of the allocation arrays be increased? But then that leads to the next question - how much is enough? Also : I had the devil of a time with the dprintf() function. It really does not not treat all integers as equal. It seems that if a number was originally created as 'uint32' - then dprintf wont handle it correctly as an integer. Despite various casts and implicit type conversions. I found two ways of dealing with the problem. Print it in a 'long hexadecimal' format. Or declare an integer value and assign the uint32 value to it. Then print the integer. > > I wouldn't think this has anything to do with the size of supported > or > installed RAM. If the mainboard chipset (or whatever is responsible) > presents the installed memory as more than 4 disjoint physical > address > ranges, that would be an explanation, though. > I think I will keep investigating. Trying to determine how and why my machine comes up with 6 memory ranges. Perhaps trying to install additional RAM and seeing what effect it may have. NEXT: How do I enable 'multiple processors' in Haiku ? When I clicked on 'about haiku' - it reported only 1 processor running.