Index: branches/Jief/i386/libsaio/ati.c =================================================================== --- branches/Jief/i386/libsaio/ati.c (revision 2270) +++ branches/Jief/i386/libsaio/ati.c (revision 2271) @@ -2175,6 +2175,8 @@ pci_dev->vendor_id, pci_dev->device_id, pci_dev->subsys_id.subsys.vendor_id, pci_dev->subsys_id.subsys.device_id); return false; } + verbose("Found ATI card! Device ID:[%04x:%04x] Subsystem ID:[%08x] - Radeon [%04x:%08x] %s\n", + pci_dev->vendor_id, pci_dev->device_id, pci_dev->subsys_id, card->info->device_id, card->info->subsys_id, card->info->model_name); card->fb = (uint8_t *)(pci_config_read32(pci_dev->dev.addr, PCI_BASE_ADDRESS_0) & ~0x0f); card->mmio = (uint8_t *)(pci_config_read32(pci_dev->dev.addr, PCI_BASE_ADDRESS_2) & ~0x0f); Index: branches/Jief/i386/libsaio/sys.c =================================================================== --- branches/Jief/i386/libsaio/sys.c (revision 2270) +++ branches/Jief/i386/libsaio/sys.c (revision 2271) @@ -888,6 +888,7 @@ #define LP '(' #define RP ')' int gBIOSDev; +int gBootPartition; /*! This is like boot2's gBootVolume except it is for the internal use of @@ -907,13 +908,29 @@ void setBootGlobals(BVRef chain) { + gBIOSBootVolume = NULL; + for ( BVRef bvr = chain; bvr; bvr = bvr->next ) + { + if (bvr->biosdev == gBIOSDev && bvr->part_no == gBootPartition) { + gBIOSBootVolume = bvr; + } + } + if ( gBIOSBootVolume == NULL ) { + printf("BUG!!! -> gBIOSBootVolume == NULL\n"); + getchar(); + } + else + { + //printf("gBIOSBootVolume %d %d %d\n", gBIOSBootVolume, gBIOSBootVolume->biosdev, gBIOSBootVolume->part_no); + } + // Record default boot device. - gBootVolume = selectBootVolume(chain); + //gBootVolume = selectBootVolume(chain); // turbo - Save the ORIGINAL boot volume too for loading our mkext - if (!gBIOSBootVolume) gBIOSBootVolume = gBootVolume; + //if (!gBIOSBootVolume) gBIOSBootVolume = gBootVolume; - setRootVolume(gBootVolume); + setRootVolume(gBIOSBootVolume); } /*! Index: branches/Jief/i386/libsaio/saio_internal.h =================================================================== --- branches/Jief/i386/libsaio/saio_internal.h (revision 2270) +++ branches/Jief/i386/libsaio/saio_internal.h (revision 2271) @@ -208,6 +208,7 @@ extern int getDeviceDescription(BVRef volume, char *str); extern int gBIOSDev; +extern int gBootPartition; extern int gBootFileType; extern BVRef gBootVolume; extern BVRef gBIOSBootVolume; Index: branches/Jief/i386/boot2/boot.c =================================================================== --- branches/Jief/i386/boot2/boot.c (revision 2270) +++ branches/Jief/i386/boot2/boot.c (revision 2271) @@ -241,6 +241,7 @@ if (cacheFile[0] != 0) { strlcpy(kernelCacheFile, cacheFile, sizeof(kernelCacheFile)); + verbose("Specified kernel cache file path=%s\n", cacheFile); } else { @@ -248,6 +249,7 @@ if ((checkOSVersion("10.7")) || (checkOSVersion("10.8")) || (checkOSVersion("10.9"))) { sprintf(kernelCacheFile, "%skernelcache", kDefaultCachePathSnow); + verbose("L & ML kernel cache file path=%s\n", kernelCacheFile); } // Snow Leopard prelink kernel cache file else if (checkOSVersion("10.6")) { @@ -269,6 +271,7 @@ prev_time = time; } } + verbose("SnowLeo kernel cache file path=%s\n", kernelCacheFile); } else { // Reset cache name. @@ -276,6 +279,7 @@ sprintf(gCacheNameAdler + 64, "%s,%s", gRootDevice, bootInfo->bootFile); adler32 = Adler32((unsigned char *)gCacheNameAdler, sizeof(gCacheNameAdler)); sprintf(kernelCacheFile, "%s.%08lX", kDefaultCachePathLeo, adler32); + verbose("Reseted kernel cache file path=%s\n", kernelCacheFile); } } @@ -363,7 +367,7 @@ // If biosdev is kBIOSDevNetwork, then this function will return if // booting was unsuccessful. This allows the PXE firmware to try the // next boot device on its list. -void common_boot(int biosdev) +void common_boot(int biosDevAndPart) { bool quiet; bool firstRun = true; @@ -378,7 +382,8 @@ gUnloadPXEOnExit = true; // Record the device that the booter was loaded from. - gBIOSDev = biosdev & kBIOSDevMask; + gBIOSDev = biosDevAndPart & kBIOSDevMask; + gBootPartition = ((biosDevAndPart & 0xFF00) >> 8); // Initialize boot info structure. initKernBootStruct(); @@ -388,13 +393,7 @@ // Setup VGA text mode. // Not sure if it is safe to call setVideoMode() before the // config table has been loaded. Call video_mode() instead. -#if DEBUG - printf("before video_mode\n"); -#endif video_mode( 2 ); // 80x25 mono text mode. -#if DEBUG - printf("after video_mode\n"); -#endif // Scan and record the system's hardware information. scan_platform(); @@ -458,12 +457,22 @@ init_module_system(); #if DEBUG - printf(" Default: %d, ->biosdev: %d, ->part_no: %d ->flags: %d\n", + printf("gBIOSDev=%d\n", gBIOSDev); + printf("gBootPartition=%d\n", gBootPartition); + + printf(" gBootVolume: %d, ->biosdev: %d, ->part_no: %d ->flags: %d\n", gBootVolume, gBootVolume->biosdev, gBootVolume->part_no, gBootVolume->flags); - printf(" bt(0,0): %d, ->biosdev: %d, ->part_no: %d ->flags: %d\n", + printf(" gBIOSBootVolume==bt(0,0): %d, ->biosdev: %d, ->part_no: %d ->flags: %d\n", gBIOSBootVolume, gBIOSBootVolume->biosdev, gBIOSBootVolume->part_no, gBIOSBootVolume->flags); + + for (BVRef bvr = bvChain; bvr; bvr = bvr->next) + { + printf(" chain: %d, dev: %d, part: %d, flags: %d, ver:%s vis: %d\n", bvr, bvr->biosdev, bvr->part_no, bvr->flags, bvr->OSVersion, bvr->visible); + } + getchar(); #endif + useGUI = true; // Override useGUI default Index: branches/Jief/i386/boot2/options.c =================================================================== --- branches/Jief/i386/boot2/options.c (revision 2270) +++ branches/Jief/i386/boot2/options.c (revision 2271) @@ -988,7 +988,7 @@ } gBootVolume = menuBVR; setRootVolume(menuBVR); - gBIOSDev = menuBVR->biosdev; +//???? gBIOSDev = menuBVR->biosdev; break; case KEY_ESC: