Index: branches/ErmaC/Enoch/i386/libsaio/hfs.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/hfs.c (revision 2744) +++ branches/ErmaC/Enoch/i386/libsaio/hfs.c (revision 2745) @@ -161,7 +161,7 @@ #ifdef __i386__ CacheInit(ih, gCacheBlockSize); #endif - return 0; + return 0L; } #ifdef __i386__ @@ -255,7 +255,8 @@ { verbose("HFS signature was not present.\n"); gCurrentIH = 0; - return -1; + + return -1L; } gIsHFSPlus = 1; @@ -284,7 +285,7 @@ CacheInit(ih, gCacheBlockSize); } - return 0; + return 0L; } //============================================================================== @@ -323,7 +324,7 @@ if (dirID == 0) { - return -1; + return -1L; } filePath++; @@ -336,7 +337,7 @@ if ((result == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) { - return -1; + return -1L; } #if UNUSED @@ -344,14 +345,14 @@ // Check file owner and permissions. if (flags & (kOwnerNotRoot | kPermGroupWrite | kPermOtherWrite)) { - return -1; + return -1L; } #endif result = ReadFile(entry, &length, base, offset); if (result == -1) { - return -1; + return -1L; } getDeviceDescription(ih, devStr); @@ -479,7 +480,7 @@ if (HFSInitPartition(ih) == -1) { - return -1; + return -1L; } dirID = kHFSRootFolderID; @@ -511,7 +512,7 @@ if ((result == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) { printf("HFS: Resolve path '%s' failed\n", filePath); - return -1; + return -1L; } if (gIsHFSPlus) @@ -529,7 +530,7 @@ printf("Allocation offset 0x%x\n", (unsigned long)gAllocationOffset); #endif *firstBlock = ((u_int64_t) GetExtentStart(extents, 0) * (u_int64_t) gBlockSize + gAllocationOffset) / 512ULL; - return 0; + return 0L; } @@ -578,7 +579,7 @@ { printf("ReadFile(HFS%s): Offset is too large.\n", gIsHFSPlus ? "+" : ""); - return -1; + return -1L; } if ((*length == 0) || ((offset + *length) > fileLength)) @@ -596,15 +597,15 @@ *length = ReadExtent((char *)extents, fileLength, fileID, offset, *length, (char *)base, 0); - return 0; + return 0L; } //============================================================================== static long GetCatalogEntryInfo(void * entry, long * flags, u_int32_t * time, FinderInfo * finderInfo, long * infoValid) { - u_int32_t tmpTime = 0; - long valid = 0; + u_int32_t tmpTime = 0L; + long valid = 0L; // Get information about the file. @@ -671,7 +672,7 @@ *infoValid = valid; } - return 0; + return 0L; } //============================================================================== @@ -1225,7 +1226,7 @@ static u_int32_t GetExtentSize(void * extents, u_int32_t index) { - u_int32_t size = 0; + u_int32_t size = 0L; HFSExtentDescriptor *hfsExtents = extents; HFSPlusExtentDescriptor *hfsPlusExtents = extents; Index: branches/ErmaC/Enoch/i386/boot2/graphics.c =================================================================== --- branches/ErmaC/Enoch/i386/boot2/graphics.c (revision 2744) +++ branches/ErmaC/Enoch/i386/boot2/graphics.c (revision 2745) @@ -271,8 +271,7 @@ // Loop through the mode list, and find the matching mode. - for ( modePtr = VBEDecodeFP( unsigned short *, vbeInfo.VideoModePtr ); - *modePtr != modeEndOfList; modePtr++ ) + for ( modePtr = VBEDecodeFP( unsigned short *, vbeInfo.VideoModePtr ); *modePtr != modeEndOfList; modePtr++ ) { // Get mode information. @@ -286,15 +285,14 @@ #if DEBUG printf("Mode %x: %dx%dx%d mm:%d attr:%x\n", - *modePtr, modeInfo.XResolution, modeInfo.YResolution, - modeInfo.BitsPerPixel, modeInfo.MemoryModel, - modeInfo.ModeAttributes); + *modePtr, modeInfo.XResolution, modeInfo.YResolution, + modeInfo.BitsPerPixel, modeInfo.MemoryModel, + modeInfo.ModeAttributes); #endif // Filter out unwanted modes based on mode attributes. - if ( ( ( modeInfo.ModeAttributes & attributesSet ) != attributesSet ) - || ( ( modeInfo.ModeAttributes & attributesClear ) != 0 ) ) + if (((modeInfo.ModeAttributes & attributesSet) != attributesSet) || ((modeInfo.ModeAttributes & attributesClear) != 0)) { continue; } @@ -303,73 +301,62 @@ modeBitsPerPixel = modeInfo.BitsPerPixel; - if ( ( modeBitsPerPixel == 4 ) && ( modeInfo.MemoryModel == 0 ) ) + if ((modeBitsPerPixel == 4) && (modeInfo.MemoryModel == 0)) { // Text mode, 16 colors. } - else if ( ( modeBitsPerPixel == 8 ) && ( modeInfo.MemoryModel == 4 ) ) + else if ((modeBitsPerPixel == 8) && (modeInfo.MemoryModel == 4)) { // Packed pixel, 256 colors. } - else if ( ( ( modeBitsPerPixel == 16 ) || ( modeBitsPerPixel == 15 ) ) - && ( modeInfo.MemoryModel == 6 ) - && ( modeInfo.RedMaskSize == 5 ) - && ( modeInfo.GreenMaskSize == 5 ) - && ( modeInfo.BlueMaskSize == 5 ) ) + else if (((modeBitsPerPixel == 16) || (modeBitsPerPixel == 15)) && (modeInfo.MemoryModel == 6) && (modeInfo.RedMaskSize == 5) && + (modeInfo.GreenMaskSize == 5) && (modeInfo.BlueMaskSize == 5)) { // Direct color, 16 bpp (1:5:5:5). modeInfo.BitsPerPixel = modeBitsPerPixel = 16; } - else if ( ( modeBitsPerPixel == 32 ) - && ( modeInfo.MemoryModel == 6 ) - && ( modeInfo.RedMaskSize == 8 ) - && ( modeInfo.GreenMaskSize == 8 ) - && ( modeInfo.BlueMaskSize == 8 ) ) + else if ((modeBitsPerPixel == 32) && (modeInfo.MemoryModel == 6) && (modeInfo.RedMaskSize == 8) && + (modeInfo.GreenMaskSize == 8) && (modeInfo.BlueMaskSize == 8)) { // Direct color, 32 bpp (8:8:8:8). } else { - continue; // Not a supported mode. + continue; // Not a supported mode. } // Modes larger than the specified dimensions are skipped. - if ( ( modeInfo.XResolution > width ) || - ( modeInfo.YResolution > height ) ) + if ((modeInfo.XResolution > width) || (modeInfo.YResolution > height)) { continue; } // Perfect match, we're done looking. - if ( ( modeInfo.XResolution == width ) && - ( modeInfo.YResolution == height ) && - ( modeBitsPerPixel == bitsPerPixel ) ) + if (modeInfo.XResolution == width && modeInfo.YResolution == height && modeBitsPerPixel == bitsPerPixel) { matchedMode = *modePtr; - bcopy( &modeInfo, outModeInfo, sizeof(modeInfo) ); + bcopy(&modeInfo, outModeInfo, sizeof(modeInfo)); break; } // Save the next "best" mode in case a perfect match is not found. - if ( modeInfo.XResolution == outModeInfo->XResolution && - modeInfo.YResolution == outModeInfo->YResolution && - modeBitsPerPixel <= outModeInfo->BitsPerPixel ) + if (modeInfo.XResolution == outModeInfo->XResolution && modeInfo.YResolution == outModeInfo->YResolution && + modeBitsPerPixel <= outModeInfo->BitsPerPixel) { - continue; // Saved mode has more depth. + continue; // Saved mode has more depth. } - if ( modeInfo.XResolution < outModeInfo->XResolution || - modeInfo.YResolution < outModeInfo->YResolution || - modeBitsPerPixel < outModeInfo->BitsPerPixel ) + if (modeInfo.XResolution < outModeInfo->XResolution || modeInfo.YResolution < outModeInfo->YResolution || + modeBitsPerPixel < outModeInfo->BitsPerPixel) { - continue; // Saved mode has more resolution. + continue; // Saved mode has more resolution. } matchedMode = *modePtr; - bcopy( &modeInfo, outModeInfo, sizeof(modeInfo) ); + bcopy(&modeInfo, outModeInfo, sizeof(modeInfo)); } return matchedMode; @@ -377,7 +364,7 @@ //========================================================================== // setupPalette - +/* static void setupPalette( VBEPalette *p, const unsigned char *g ) { int i; @@ -391,7 +378,7 @@ (*p)[i] |= ((unsigned long)((*source++) >> 2)); // Blue } } - +*/ //========================================================================== // Simple decompressor for boot images encoded in RLE format. @@ -420,66 +407,22 @@ //========================================================================== // setVESAGraphicsMode -static int setVESAGraphicsMode( unsigned short width, - unsigned short height, - unsigned char bitsPerPixel, - unsigned short refreshRate ) +static int setVESAGraphicsMode( unsigned short width, unsigned short height, unsigned char bitsPerPixel, unsigned short refreshRate ) { VBEModeInfoBlock minfo; - unsigned short mode; + unsigned short mode = 280; // Default to 1024 * 768 * 32 (1920 * 1200 * 32 would be 330) unsigned short vesaVersion; int err = errFuncNotSupported; do { mode = getVESAModeWithProperties( width, height, bitsPerPixel, - maColorModeBit | - maModeIsSupportedBit | - maGraphicsModeBit | - maLinearFrameBufferAvailBit, - 0, - &minfo, &vesaVersion ); + maColorModeBit | maModeIsSupportedBit | maGraphicsModeBit | maLinearFrameBufferAvailBit, + 0, &minfo, &vesaVersion ); if ( mode == modeEndOfList ) { break; } -// -// FIXME : generateCRTCTiming() causes crash. -// - -// if ( (vesaVersion >> 8) >= 3 && refreshRate >= 60 && -// (gBootMode & kBootModeSafe) == 0 ) -// { -// VBECRTCInfoBlock timing; -// -// // Generate CRTC timing for given refresh rate. -// -// generateCRTCTiming( minfo.XResolution, minfo.YResolution, -// refreshRate, kCRTCParamRefreshRate, -// &timing ); -// -// // Find the actual pixel clock supported by the hardware. -// -// getVBEPixelClock( mode, &timing.PixelClock ); -// -// // Re-compute CRTC timing based on actual pixel clock. -// -// generateCRTCTiming( minfo.XResolution, minfo.YResolution, -// timing.PixelClock, kCRTCParamPixelClock, -// &timing ); -// -// // Set the video mode and use specified CRTC timing. -// -// err = setVBEMode( mode | kLinearFrameBufferBit | -// kCustomRefreshRateBit, &timing ); -// } -// else -// { -// // Set the mode with default refresh rate. -// -// err = setVBEMode( mode | kLinearFrameBufferBit, NULL ); -// } - // Set the mode with default refresh rate. err = setVBEMode(mode | kLinearFrameBufferBit, NULL); @@ -489,36 +432,21 @@ break; } - // Set 8-bit color palette. + // Is this required for buggy Video BIOS implementations? If so for which adapter? - if ( minfo.BitsPerPixel == 8 ) + if (minfo.BytesPerScanline == 0) { - VBEPalette palette; - setupPalette( &palette, AppleLogoClut ); - if ((err = setVBEPalette(palette)) != errSuccess) - { - break; - } + minfo.BytesPerScanline = (minfo.XResolution * minfo.BitsPerPixel) >> 3; // ((1920 * 32 = 61440) >> 3) = 7680 } - // Is this required for buggy Video BIOS implementations? - // On which adapter? + // Update bootArgs with the data provided by the selected VESA mode. + bootArgs->Video.v_display = GRAPHICS_MODE; + bootArgs->Video.v_width = minfo.XResolution; /* 1920 or 1600 */ + bootArgs->Video.v_height = minfo.YResolution; /* 1200 or 900 */ + bootArgs->Video.v_depth = minfo.BitsPerPixel; /* 32 */ + bootArgs->Video.v_rowBytes = minfo.BytesPerScanline; /* 7680 or 6400 */ + bootArgs->Video.v_baseAddr = VBEMakeUInt32(minfo.PhysBasePtr); - if ( minfo.BytesPerScanline == 0 ) - { - minfo.BytesPerScanline = ( minfo.XResolution * minfo.BitsPerPixel ) >> 3; - } - - // Update KernBootStruct using info provided by the selected - // VESA mode. - - bootArgs->Video.v_display = GRAPHICS_MODE; - bootArgs->Video.v_width = minfo.XResolution; - bootArgs->Video.v_height = minfo.YResolution; - bootArgs->Video.v_depth = minfo.BitsPerPixel; - bootArgs->Video.v_rowBytes = minfo.BytesPerScanline; - bootArgs->Video.v_baseAddr = VBEMakeUInt32(minfo.PhysBasePtr); - } while ( 0 ); return err; @@ -528,35 +456,34 @@ int convertImage( unsigned short width, unsigned short height, const unsigned char *imageData, unsigned char **newImageData ) { - int cnt; + int index = 0; + int size = (width * height); // 16384 + int depth = VIDEO(depth); + unsigned char *img = 0; - unsigned short *img16; unsigned long *img32; - switch ( VIDEO(depth) ) + switch (depth) { - case 16 : - img16 = malloc(width * height * 2); - if ( !img16 ) break; - for (cnt = 0; cnt < (width * height); cnt++) - img16[cnt] = lookUpCLUTIndex(imageData[cnt], 16); - img = (unsigned char *)img16; - break; + case 32: + img32 = malloc(size * 4); - case 32 : - img32 = malloc(width * height * 4); - if ( !img32 ) break; - for (cnt = 0; cnt < (width * height); cnt++) - img32[cnt] = lookUpCLUTIndex(imageData[cnt], 32); - img = (unsigned char *)img32; - break; + if (!img32) + { + break; + } - default : - img = malloc(width * height); - bcopy(imageData, img, width * height); - break; + for (; index < size; index++) + { + img32[index] = lookUpCLUTIndex(imageData[index]); + } + + img = (unsigned char *)img32; + break; } + *newImageData = img; + return 0; } @@ -758,7 +685,7 @@ } //============================================================================== - +// ProgressBar void drawCheckerBoard() { uint32_t *vram = (uint32_t *) VIDEO(baseAddr); @@ -776,10 +703,8 @@ //========================================================================== // LookUpCLUTIndex -unsigned long lookUpCLUTIndex( unsigned char index, unsigned char depth ) +unsigned long lookUpCLUTIndex( unsigned char index ) { - long result; - long colorIndex = (index * 3); long red; long green; @@ -789,30 +714,10 @@ green = AppleLogoClut[ colorIndex++ ]; blue = AppleLogoClut[ colorIndex++ ]; - switch (depth) - { - case 16 : - result = ((red & 0xF8) << 7) | - ((green & 0xF8) << 2) | - ((blue & 0xF8) >> 3); - result |= (result << 16); - break; - - case 32 : - result = (red << 16) | (green << 8) | blue; - break; - - default : - result = index | (index << 8); - result |= (result << 16); - break; - } - - return result; + return (red << 16) | (green << 8) | blue; } //========================================================================== -// drawColorRectangle void *stosl(void *dst, long val, long len) { @@ -826,7 +731,7 @@ //============================================================================== -void drawColorRectangle( uint32_t color ) +void setBackgroundColor( uint32_t color ) { long pixelBytes = VIDEO(depth) / 8; char *vram = (char *) VIDEO(baseAddr) + VIDEO(rowBytes) + pixelBytes; @@ -849,11 +754,7 @@ //========================================================================== // drawDataRectangle -void drawDataRectangle( unsigned short x, - unsigned short y, - unsigned short width, - unsigned short height, - unsigned char *data ) +void drawDataRectangle( unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char *data ) { unsigned short drawWidth; @@ -957,7 +858,7 @@ rowBytes = VIDEO (rowBytes); // Set the screen to 75% grey. - drawColorRectangle(0xffbfbfbf); + setBackgroundColor(0xffbfbfbf); } pixelShift = VIDEO (depth) >> 4; @@ -1191,42 +1092,28 @@ // // Set the video mode to VGA_TEXT_MODE or GRAPHICS_MODE. -void setVideoMode( int mode, int drawgraphics) +void setVideoMode( int mode ) { unsigned long params[4]; - int count; int err = errSuccess; if ( mode == GRAPHICS_MODE ) { if ( (err = initGraphicsMode()) == errSuccess ) { - if (gVerboseMode) - { - // Tell the kernel to use text mode on a linear frame buffer display - bootArgs->Video.v_display = FB_TEXT_MODE; - } - else - { - bootArgs->Video.v_display = GRAPHICS_MODE; - } + // Tell the kernel to use text mode on a linear frame buffer display + bootArgs->Video.v_display = (gVerboseMode) ? /* 2 */ FB_TEXT_MODE : /* 1 */ GRAPHICS_MODE; } } if ( (mode == VGA_TEXT_MODE) || (err != errSuccess) ) { - count = getNumberArrayFromProperty(kTextModeKey, params, 2); - if ( count < 2 ) - { - params[0] = 80; // Default text mode is 80x25. - params[1] = 25; - } + params[0] = 80; // Default text mode is 80x25. + params[1] = 25; setVESATextMode(params[0], params[1], 4); bootArgs->Video.v_display = VGA_TEXT_MODE; } - - currentIndicator = 0; } //============================================================================== Index: branches/ErmaC/Enoch/i386/boot2/graphics.h =================================================================== --- branches/ErmaC/Enoch/i386/boot2/graphics.h (revision 2744) +++ branches/ErmaC/Enoch/i386/boot2/graphics.h (revision 2745) @@ -20,9 +20,9 @@ int loadPngImage(const char *filename, uint16_t *width, uint16_t *height, uint8_t **imageData); -unsigned long lookUpCLUTIndex( unsigned char index, unsigned char depth ); +unsigned long lookUpCLUTIndex( unsigned char index ); -void drawColorRectangle( uint32_t color ); +void setBackgroundColor( uint32_t color ); void drawDataRectangle( unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char * data ); int convertImage( unsigned short width, unsigned short height, const unsigned char *imageData, unsigned char **newImageData ); Index: branches/ErmaC/Enoch/i386/boot2/boot.c =================================================================== --- branches/ErmaC/Enoch/i386/boot2/boot.c (revision 2744) +++ branches/ErmaC/Enoch/i386/boot2/boot.c (revision 2745) @@ -218,7 +218,7 @@ // verbose mode. if (gVerboseMode) { - setVideoMode(GRAPHICS_MODE, 0); + setVideoMode( GRAPHICS_MODE ); } else { @@ -854,7 +854,7 @@ // if we are already in graphics-mode, if (getVideoMode() == GRAPHICS_MODE) { - setVideoMode(VGA_TEXT_MODE, 0); // switch back to text mode. + setVideoMode( VGA_TEXT_MODE ); // switch back to text mode. } } Index: branches/ErmaC/Enoch/i386/boot2/boot.h =================================================================== --- branches/ErmaC/Enoch/i386/boot2/boot.h (revision 2744) +++ branches/ErmaC/Enoch/i386/boot2/boot.h (revision 2745) @@ -266,11 +266,11 @@ * graphics.c */ extern void printVBEModeInfo(); -extern void setVideoMode(int mode, int drawgraphics); +extern void setVideoMode(int mode); extern int getVideoMode(); extern void spinActivityIndicator(); extern void clearActivityIndicator(); -extern void drawColorRectangle( uint32_t color ); +extern void setBackgroundColor( uint32_t color ); extern void drawDataRectangle( unsigned short x, unsigned short y, Index: branches/ErmaC/Enoch/i386/boot2/gui.c =================================================================== --- branches/ErmaC/Enoch/i386/boot2/gui.c (revision 2744) +++ branches/ErmaC/Enoch/i386/boot2/gui.c (revision 2745) @@ -54,6 +54,7 @@ iDeviceGeneric_o, iDeviceHFS, iDeviceHFS_o, + iDeviceHFS_cap, iDeviceHFS_cap_o, iDeviceHFS_yos, @@ -159,6 +160,7 @@ {.name = "device_generic_o", .image = NULL}, {.name = "device_hfsplus", .image = NULL}, {.name = "device_hfsplus_o", .image = NULL}, + {.name = "device_hfsplus_cap", .image = NULL}, {.name = "device_hfsplus_cap_o", .image = NULL}, {.name = "device_hfsplus_yos", .image = NULL}, @@ -416,6 +418,7 @@ LOADPNG(device_generic_o, iDeviceGeneric); LOADPNG(device_hfsplus, iDeviceGeneric); LOADPNG(device_hfsplus_o, iDeviceHFS); + LOADPNG(device_hfsplus_cap, iDeviceHFS); LOADPNG(device_hfsplus_cap_o, iDeviceHFS_cap); LOADPNG(device_hfsplus_yos, iDeviceHFS); @@ -1034,7 +1037,7 @@ // lets copy the screen into the back buffer memcpy( gui.backbuffer->pixels, gui.screen.pixmap->pixels, gui.backbuffer->width * gui.backbuffer->height * 4 ); - setVideoMode( GRAPHICS_MODE, 0 ); + setVideoMode( GRAPHICS_MODE ); gui.initialised = true; return 0; @@ -2409,7 +2412,7 @@ // Set graphics mode if the booter was in text mode or the screen resolution has changed. if (bootArgs->Video.v_display == VGA_TEXT_MODE || (screen_params[0] != oldScreenWidth && screen_params[1] != oldScreenHeight) ) { - setVideoMode(GRAPHICS_MODE, 0); + setVideoMode(GRAPHICS_MODE ); } if (getValueForKey("-checkers", &dummyVal, &length, &bootInfo->chameleonConfig)) @@ -2419,7 +2422,7 @@ else { // Fill the background to 75% grey (same as BootX). - drawColorRectangle(0xffbfbfbf); + setBackgroundColor(0xffbfbfbf); } if ((bootImageData) && (usePngImage)) Index: branches/ErmaC/Enoch/i386/boot2/IOHibernatePrivate.h =================================================================== --- branches/ErmaC/Enoch/i386/boot2/IOHibernatePrivate.h (revision 2744) +++ branches/ErmaC/Enoch/i386/boot2/IOHibernatePrivate.h (revision 2745) @@ -26,12 +26,15 @@ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ +#include + #ifdef __cplusplus extern "C" { #endif #ifdef KERNEL -#include +#include +#include #endif #ifndef __IOKIT_IOHIBERNATEPRIVATE_H @@ -356,6 +359,7 @@ void IOHibernateSystemInit(IOPMrootDomain * rootDomain); IOReturn IOHibernateSystemSleep(void); +IOReturn IOHibernateOpenForDebugData(void); IOReturn IOHibernateIOKitSleep(void); IOReturn IOHibernateSystemHasSlept(void); IOReturn IOHibernateSystemWake(void); @@ -371,7 +375,7 @@ typedef void (*kern_get_file_extents_callback_t)(void * ref, uint64_t start, uint64_t size); struct kern_direct_file_io_ref_t * -kern_open_file_for_direct_io(const char * name, +kern_open_file_for_direct_io(const char * name, boolean_t create_file, kern_get_file_extents_callback_t callback, void * callback_ref, @@ -386,12 +390,14 @@ uint64_t * partitionbase_result, uint64_t * maxiocount_result, uint32_t * oflags); -void -kern_close_file_for_direct_io(struct kern_direct_file_io_ref_t * ref, +int kern_write_file(struct kern_direct_file_io_ref_t * ref, off_t offset, caddr_t addr, vm_size_t len, int ioflag); +void kern_close_file_for_direct_io(struct kern_direct_file_io_ref_t * ref, off_t write_offset, caddr_t addr, vm_size_t write_length, off_t discard_offset, off_t discard_end); #endif /* _SYS_CONF_H_ */ +void vm_compressor_do_warmup(void); + hibernate_page_list_t * hibernate_page_list_allocate(boolean_t log); @@ -503,8 +509,6 @@ extern uint8_t gIOHibernateRestoreStack[]; extern uint8_t gIOHibernateRestoreStackEnd[]; extern IOHibernateImageHeader * gIOHibernateCurrentHeader; -extern hibernate_graphics_t * gIOHibernateGraphicsInfo; -extern hibernate_cryptwakevars_t * gIOHibernateCryptWakeVars; #define HIBLOG(fmt, args...) \ { kprintf(fmt, ## args); printf(fmt, ## args); } @@ -540,7 +544,9 @@ enum { kIOHibernateHeaderSignature = 0x73696d65, - kIOHibernateHeaderInvalidSignature = 0x7a7a7a7a + kIOHibernateHeaderInvalidSignature = 0x7a7a7a7a, + kIOHibernateHeaderOpenSignature = 0xf1e0be9d, + kIOHibernateHeaderDebugDataSignature = 0xfcddfcdd }; // kind for hibernate_set_page_state() @@ -573,7 +579,8 @@ #define kIOHibernateOptionsKey "IOHibernateOptions" #define kIOHibernateGfxStatusKey "IOHibernateGfxStatus" -enum { +enum +{ kIOHibernateGfxStatusUnknown = ((int32_t) 0xFFFFFFFF) }; @@ -594,13 +601,15 @@ #define kIOHibernateUseKernelInterpreter 0x80000000 -enum { +enum +{ kIOPreviewImageIndexDesktop = 0, kIOPreviewImageIndexLockScreen = 1, kIOPreviewImageCount = 2 }; -enum { +enum +{ kIOScreenLockNoLock = 1, kIOScreenLockUnlocked = 2, kIOScreenLockLocked = 3, Index: branches/ErmaC/Enoch/i386/boot2/options.c =================================================================== --- branches/ErmaC/Enoch/i386/boot2/options.c (revision 2744) +++ branches/ErmaC/Enoch/i386/boot2/options.c (revision 2745) @@ -809,7 +809,7 @@ // ensure we're in graphics mode if gui is setup if (firstRun && gui.initialised && bootArgs->Video.v_display == VGA_TEXT_MODE) { - setVideoMode(GRAPHICS_MODE, 0); + setVideoMode( GRAPHICS_MODE ); } // Clear command line boot arguments @@ -1127,7 +1127,7 @@ { if (bootArgs->Video.v_display != VGA_TEXT_MODE) { - setVideoMode(VGA_TEXT_MODE, 0); + setVideoMode( VGA_TEXT_MODE ); setCursorPosition(0, 0, 0); clearScreenRows(0, kScreenLastRow); @@ -1156,7 +1156,7 @@ else { gui.redraw = true; - setVideoMode(GRAPHICS_MODE, 0); + setVideoMode( GRAPHICS_MODE ); updateVRAM(); updateGraphicBootPrompt(); } Index: branches/ErmaC/Enoch/CHANGES =================================================================== --- branches/ErmaC/Enoch/CHANGES (revision 2744) +++ branches/ErmaC/Enoch/CHANGES (revision 2745) @@ -1,3 +1,4 @@ +- Pike R. Alpha : Add support for (LZVN) grey logo. - Slice : Added NvidiaSingle - cparm : Rock - Paper - Scissors algo - Bronya : Improve support for AMD CPU.