1*43a90889SApple OSS Distributions /* 2*43a90889SApple OSS Distributions * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. 3*43a90889SApple OSS Distributions * 4*43a90889SApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5*43a90889SApple OSS Distributions * 6*43a90889SApple OSS Distributions * This file contains Original Code and/or Modifications of Original Code 7*43a90889SApple OSS Distributions * as defined in and that are subject to the Apple Public Source License 8*43a90889SApple OSS Distributions * Version 2.0 (the 'License'). You may not use this file except in 9*43a90889SApple OSS Distributions * compliance with the License. The rights granted to you under the License 10*43a90889SApple OSS Distributions * may not be used to create, or enable the creation or redistribution of, 11*43a90889SApple OSS Distributions * unlawful or unlicensed copies of an Apple operating system, or to 12*43a90889SApple OSS Distributions * circumvent, violate, or enable the circumvention or violation of, any 13*43a90889SApple OSS Distributions * terms of an Apple operating system software license agreement. 14*43a90889SApple OSS Distributions * 15*43a90889SApple OSS Distributions * Please obtain a copy of the License at 16*43a90889SApple OSS Distributions * http://www.opensource.apple.com/apsl/ and read it before using this file. 17*43a90889SApple OSS Distributions * 18*43a90889SApple OSS Distributions * The Original Code and all software distributed under the License are 19*43a90889SApple OSS Distributions * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20*43a90889SApple OSS Distributions * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21*43a90889SApple OSS Distributions * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22*43a90889SApple OSS Distributions * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23*43a90889SApple OSS Distributions * Please see the License for the specific language governing rights and 24*43a90889SApple OSS Distributions * limitations under the License. 25*43a90889SApple OSS Distributions * 26*43a90889SApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27*43a90889SApple OSS Distributions */ 28*43a90889SApple OSS Distributions /* 29*43a90889SApple OSS Distributions * @OSF_COPYRIGHT@ 30*43a90889SApple OSS Distributions */ 31*43a90889SApple OSS Distributions /* 32*43a90889SApple OSS Distributions * @APPLE_FREE_COPYRIGHT@ 33*43a90889SApple OSS Distributions */ 34*43a90889SApple OSS Distributions 35*43a90889SApple OSS Distributions #ifndef _VIDEO_CONSOLE_H_ 36*43a90889SApple OSS Distributions #define _VIDEO_CONSOLE_H_ 37*43a90889SApple OSS Distributions 38*43a90889SApple OSS Distributions #include <device/device_types.h> 39*43a90889SApple OSS Distributions 40*43a90889SApple OSS Distributions #ifdef __cplusplus 41*43a90889SApple OSS Distributions extern "C" { 42*43a90889SApple OSS Distributions #endif 43*43a90889SApple OSS Distributions 44*43a90889SApple OSS Distributions #define kVCSysctlProgressOptions "kern.progressoptions" 45*43a90889SApple OSS Distributions #define kVCSysctlConsoleOptions "kern.consoleoptions" 46*43a90889SApple OSS Distributions #define kVCSysctlProgressMeterEnable "kern.progressmeterenable" 47*43a90889SApple OSS Distributions #define kVCSysctlProgressMeter "kern.progressmeter" 48*43a90889SApple OSS Distributions 49*43a90889SApple OSS Distributions enum{ 50*43a90889SApple OSS Distributions kVCDarkReboot = 0x00000001, 51*43a90889SApple OSS Distributions kVCAcquireImmediate = 0x00000002, 52*43a90889SApple OSS Distributions kVCUsePosition = 0x00000004, 53*43a90889SApple OSS Distributions kVCDarkBackground = 0x00000008, 54*43a90889SApple OSS Distributions kVCLightBackground = 0x00000010, 55*43a90889SApple OSS Distributions }; 56*43a90889SApple OSS Distributions 57*43a90889SApple OSS Distributions enum { 58*43a90889SApple OSS Distributions kDataRotate0 = 0, 59*43a90889SApple OSS Distributions kDataRotate90 = 1, 60*43a90889SApple OSS Distributions kDataRotate180 = 2, 61*43a90889SApple OSS Distributions kDataRotate270 = 3 62*43a90889SApple OSS Distributions }; 63*43a90889SApple OSS Distributions 64*43a90889SApple OSS Distributions struct vc_progress_user_options { 65*43a90889SApple OSS Distributions uint32_t options; 66*43a90889SApple OSS Distributions // fractional position of middle of spinner 0 (0.0) - 0xFFFFFFFF (1.0) 67*43a90889SApple OSS Distributions uint32_t x_pos; 68*43a90889SApple OSS Distributions uint32_t y_pos; 69*43a90889SApple OSS Distributions uint32_t resv[8]; 70*43a90889SApple OSS Distributions }; 71*43a90889SApple OSS Distributions typedef struct vc_progress_user_options vc_progress_user_options; 72*43a90889SApple OSS Distributions 73*43a90889SApple OSS Distributions 74*43a90889SApple OSS Distributions #if XNU_KERNEL_PRIVATE 75*43a90889SApple OSS Distributions 76*43a90889SApple OSS Distributions void vcputc(char); 77*43a90889SApple OSS Distributions void vcputc_options(char, bool); 78*43a90889SApple OSS Distributions 79*43a90889SApple OSS Distributions void video_scroll_up( void *start, 80*43a90889SApple OSS Distributions void *end, 81*43a90889SApple OSS Distributions void *dest ); 82*43a90889SApple OSS Distributions 83*43a90889SApple OSS Distributions void video_scroll_down( void *start, /* HIGH addr */ 84*43a90889SApple OSS Distributions void *end, /* LOW addr */ 85*43a90889SApple OSS Distributions void *dest ); /* HIGH addr */ 86*43a90889SApple OSS Distributions 87*43a90889SApple OSS Distributions struct vc_info { 88*43a90889SApple OSS Distributions unsigned int v_height; /* pixels */ 89*43a90889SApple OSS Distributions unsigned int v_width; /* pixels */ 90*43a90889SApple OSS Distributions unsigned int v_depth; 91*43a90889SApple OSS Distributions unsigned int v_rowbytes; 92*43a90889SApple OSS Distributions unsigned long v_baseaddr; 93*43a90889SApple OSS Distributions unsigned int v_type; 94*43a90889SApple OSS Distributions char v_name[32]; 95*43a90889SApple OSS Distributions uint64_t v_physaddr; 96*43a90889SApple OSS Distributions unsigned int v_rows; /* characters */ 97*43a90889SApple OSS Distributions unsigned int v_columns; /* characters */ 98*43a90889SApple OSS Distributions unsigned int v_rowscanbytes; /* Actualy number of bytes used for display per row*/ 99*43a90889SApple OSS Distributions unsigned int v_scale; 100*43a90889SApple OSS Distributions unsigned int v_rotate; 101*43a90889SApple OSS Distributions unsigned int v_reserved[3]; 102*43a90889SApple OSS Distributions }; 103*43a90889SApple OSS Distributions 104*43a90889SApple OSS Distributions struct vc_progress_element { 105*43a90889SApple OSS Distributions unsigned int version; 106*43a90889SApple OSS Distributions unsigned int flags; 107*43a90889SApple OSS Distributions unsigned int time; 108*43a90889SApple OSS Distributions unsigned char count; 109*43a90889SApple OSS Distributions unsigned char res[3]; 110*43a90889SApple OSS Distributions int width; 111*43a90889SApple OSS Distributions int height; 112*43a90889SApple OSS Distributions int dx; 113*43a90889SApple OSS Distributions int dy; 114*43a90889SApple OSS Distributions int transparent; 115*43a90889SApple OSS Distributions unsigned int res2[3]; 116*43a90889SApple OSS Distributions }; 117*43a90889SApple OSS Distributions typedef struct vc_progress_element vc_progress_element; 118*43a90889SApple OSS Distributions 119*43a90889SApple OSS Distributions extern struct vc_progress_user_options vc_user_options; 120*43a90889SApple OSS Distributions 121*43a90889SApple OSS Distributions void vc_progress_initialize( vc_progress_element * desc, 122*43a90889SApple OSS Distributions const unsigned char * data1x, 123*43a90889SApple OSS Distributions const unsigned char * data2x, 124*43a90889SApple OSS Distributions const unsigned char * data3x, 125*43a90889SApple OSS Distributions const unsigned char * clut ); 126*43a90889SApple OSS Distributions 127*43a90889SApple OSS Distributions void vc_progress_set(boolean_t enable, uint32_t vc_delay); 128*43a90889SApple OSS Distributions 129*43a90889SApple OSS Distributions void vc_display_icon( vc_progress_element * desc, const unsigned char * data ); 130*43a90889SApple OSS Distributions 131*43a90889SApple OSS Distributions int vc_display_lzss_icon(uint32_t dst_x, uint32_t dst_y, 132*43a90889SApple OSS Distributions uint32_t image_width, uint32_t image_height, 133*43a90889SApple OSS Distributions const uint8_t *compressed_image, 134*43a90889SApple OSS Distributions uint32_t compressed_size, 135*43a90889SApple OSS Distributions const uint8_t *clut); 136*43a90889SApple OSS Distributions 137*43a90889SApple OSS Distributions #if defined(XNU_TARGET_OS_OSX) 138*43a90889SApple OSS Distributions 139*43a90889SApple OSS Distributions extern void vc_enable_progressmeter(int new_value); 140*43a90889SApple OSS Distributions extern void vc_set_progressmeter(int new_value); 141*43a90889SApple OSS Distributions extern int vc_progressmeter_enable; 142*43a90889SApple OSS Distributions extern int vc_progressmeter_value; 143*43a90889SApple OSS Distributions extern void vc_progress_setdiskspeed(uint32_t speed); 144*43a90889SApple OSS Distributions 145*43a90889SApple OSS Distributions #endif /* defined(XNU_TARGET_OS_OSX) */ 146*43a90889SApple OSS Distributions 147*43a90889SApple OSS Distributions #endif /* XNU_KERNEL_PRIVATE */ 148*43a90889SApple OSS Distributions 149*43a90889SApple OSS Distributions #ifdef __cplusplus 150*43a90889SApple OSS Distributions } 151*43a90889SApple OSS Distributions #endif 152*43a90889SApple OSS Distributions 153*43a90889SApple OSS Distributions #endif /* _VIDEO_CONSOLE_H_ */ 154