From 16d9a4a4bcf2e4d8df968c104d26b58ee480ba99 Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Wed, 29 Nov 2017 00:15:25 +0000 Subject: [PATCH] Remove VRR code, mostly commented out anyway. git-svn-id: svn://kolibrios.org@7121 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/boot/bootcode.inc | 30 ++---------------------------- kernel/trunk/boot/parsers.inc | 11 ----------- kernel/trunk/boot/preboot.inc | 1 - kernel/trunk/boot/shutdown.inc | 17 ++++++++++------- kernel/trunk/const.inc | 3 +-- kernel/trunk/data16.inc | 1 - kernel/trunk/data32.inc | 1 - kernel/trunk/docs/sysfuncr.txt | 4 +--- kernel/trunk/docs/sysfuncs.txt | 3 +-- kernel/trunk/kernel.asm | 2 +- kernel/trunk/memmap.inc | 2 +- kernel/trunk/readme-ext-loader.txt | 2 -- 12 files changed, 17 insertions(+), 60 deletions(-) diff --git a/kernel/trunk/boot/bootcode.inc b/kernel/trunk/boot/bootcode.inc index 1c84ab62d7..25bb583a11 100644 --- a/kernel/trunk/boot/bootcode.inc +++ b/kernel/trunk/boot/bootcode.inc @@ -496,8 +496,7 @@ cfgmanager: ; a) preboot_graph = graphical mode ; preboot_gprobe = probe this mode? ; b) preboot_biosdisk = use BIOS disks through V86 emulation? // (earlier was: preboot_dma = use DMA access?) -; c) preboot_debug = duplicates kernel debug output to the screen // (earlier was: preboot_vrrm = use VRR?) -; // VRR is an obsolete functionality, used only with CRT monitors: increase display frequency by reducing screen resolution +; c) preboot_debug = duplicates kernel debug output to the screen ; d) preboot_launcher = start the first app (right now it's LAUNCHER) after kernel is loaded? ; e) preboot_device = from where to boot? @@ -535,14 +534,6 @@ end if adc byte [di+preboot_dma-preboot_device], 0 cmp byte [di+preboot_launcher-preboot_device], 1 ; Start LAUNCHER by default adc byte [di+preboot_launcher-preboot_device], 0 -; cmp byte [di+preboot_biosdisk-preboot_device], 1 -; adc byte [di+preboot_biosdisk-preboot_device], 0 -;; default value for VRR is OFF -; cmp byte [di+preboot_vrrm-preboot_device], 0 -; jnz @f -; mov byte [di+preboot_vrrm-preboot_device], 2 -;@@: -; notify user _setcursor 5,2 mov si, linef @@ -569,9 +560,6 @@ end if mov si, usebd_msg cmp [preboot_biosdisk], 1 call .say_on_off -; mov si, vrrm_msg -; cmp [preboot_vrrm], 1 -; call .say_on_off mov si, debug_mode_msg cmp [preboot_debug], 1 call .say_on_off @@ -667,7 +655,7 @@ end if je .change_a cmp al, 'b' ; use BIOS disks? // (selecting YES will make BIOS disks visible as /bd) jz .change_b - cmp al, 'c' ; load kernel in debug mode? // (earlier was: use VRR?) + cmp al, 'c' ; load kernel in debug mode? jz .change_c cmp al, 'd' ; start launcher after kernel is loaded? jz .change_d @@ -789,15 +777,6 @@ end if _ask_question ask_bd,'12',preboot_biosdisk ; range accepted for answer: 1-2 _setcursor 11,0 jmp .d -;.change_c: ; // VRR is an obsolete functionality, used only with CRT monitors -; _setcursor 16,0 -; mov si, vrrmprint -; call print -; mov bx, '12' ; range accepted for answer: 1-2 -; call getkey -; mov [preboot_vrrm], al -; _setcursor 12,0 -; jmp .d .change_c: ; c) preboot_debug = duplicates kernel debug output to the screen _ask_question ask_debug,'12',preboot_debug ; range accepted for answer: 1-2 _setcursor 12,0 @@ -975,11 +954,6 @@ end if mov al, [preboot_dma] mov [es:BOOT_DMA], al -;; VRR_M USE -; -; mov al,[preboot_vrrm] -; mov [es:BOOT_VRR], al ;// 0x9030 - ; Set kernel DEBUG mode - if nonzero, duplicates debug output to the screen. mov al, [preboot_debug] mov [es:BOOT_DEBUG_PRINT], al ;// 0x901E diff --git a/kernel/trunk/boot/parsers.inc b/kernel/trunk/boot/parsers.inc index fec0e71ce0..7129f205f9 100644 --- a/kernel/trunk/boot/parsers.inc +++ b/kernel/trunk/boot/parsers.inc @@ -57,17 +57,6 @@ parse_vbemode: .nothing: ret -;parse_vrr: -;; vrr is a boolean setting -; call parse_bool -; jc .nothing -;; convert 0 to 2, 1 to 1 -; inc ax -; xor al, 3 -; mov [es:preboot_vrrm], al -;.nothing: -; ret - parse_biosdisks: ; using biosdisks is a boolean setting call parse_bool diff --git a/kernel/trunk/boot/preboot.inc b/kernel/trunk/boot/preboot.inc index 9838092039..69c75b645a 100644 --- a/kernel/trunk/boot/preboot.inc +++ b/kernel/trunk/boot/preboot.inc @@ -23,7 +23,6 @@ y_save dw 0 ; y number_vm dw 0 ; ;pixel_save dw 0 ; per to pixel preboot_gprobe db 0 ; probe vesa3 videomodes (1-no, 2-yes) -;preboot_vrrm db 0 ; use VRR_M (1-yes, 2- no) preboot_debug db 0 ; load kernel in debug mode? (1-yes, 2-no) preboot_launcher db 0 ; start launcher after kernel is loaded? (1-yes, 2-no) preboot_dma db 0 ; use DMA for access to HDD (1-always, 2-only for read, 3-never) diff --git a/kernel/trunk/boot/shutdown.inc b/kernel/trunk/boot/shutdown.inc index 4ff52919c9..6c1fe8bd4b 100644 --- a/kernel/trunk/boot/shutdown.inc +++ b/kernel/trunk/boot/shutdown.inc @@ -16,10 +16,13 @@ $Revision$ align 4 system_shutdown: ; shut down the system - cmp byte [BOOT_VARS+0x9030], 1 - jne @F - ret + cmp byte [BOOT_VARS+BOOT_SHUTDOWN_TYPE], SYSTEM_SHUTDOWN + jb @F + cmp byte [BOOT_VARS+BOOT_SHUTDOWN_TYPE], SYSTEM_RESTART + jbe .valid @@: + ret +.valid: call stop_all_services yes_shutdown_param: @@ -59,7 +62,7 @@ yes_shutdown_param: cli call IRQ_mask_all - mov eax, [OS_BASE + 0x9030] + mov eax, [OS_BASE + BOOT_SHUTDOWN_TYPE] cmp al, SYSTEM_RESTART jne @F @@ -88,7 +91,7 @@ org $-OS_BASE mov eax, cr3 mov cr3, eax - cmp byte [0x9030], SYSTEM_SHUTDOWN + cmp byte [BOOT_SHUTDOWN_TYPE], SYSTEM_SHUTDOWN jne no_acpi_power_off ; system_power_off @@ -176,7 +179,7 @@ align 4 restart_code_start: org 0x50000 - cmp byte [0x9030], SYSTEM_RESTART + cmp byte [BOOT_SHUTDOWN_TYPE], SYSTEM_RESTART jne @F mov esi, _CLEAN_ZONE-OS_BASE @@ -274,7 +277,7 @@ align 4 xor ax, ax mov ds, ax - mov al, [0x9030] + mov al, [BOOT_SHUTDOWN_TYPE] cmp al, SYSTEM_RESTART je .restart diff --git a/kernel/trunk/const.inc b/kernel/trunk/const.inc index 79d638e224..ca85a77097 100644 --- a/kernel/trunk/const.inc +++ b/kernel/trunk/const.inc @@ -319,7 +319,7 @@ BOOT_LAUNCHER_START equ 0x901D ;byte (0 or 1) start the first app (right now BOOT_DEBUG_PRINT equ 0x901E ;byte If nonzero, duplicates debug output to the screen. BOOT_DMA equ 0x901F ; BOOT_PCI_DATA equ 0x9020 ;8bytes pci data -BOOT_VRR equ 0x9030 ;byte VRR start enabled 1, 2-no +BOOT_SHUTDOWN_TYPE equ 0x9030 ;byte shutdown type (see sysfn 18.9) ;BOOT_IDE_BASE_ADDR equ 0x9031 ;word IDEContrRegsBaseAddr ; now free and is not used BOOT_MEM_AMOUNT equ 0x9034 ;dword memory amount @@ -685,7 +685,6 @@ struct BOOT_DATA direct_lfb dd ? pci_data dd ? dd ? - vrr dd ? ide_base dd ? mem_amount dd ? pages_count dd ? diff --git a/kernel/trunk/data16.inc b/kernel/trunk/data16.inc index e05294316e..479748e0d0 100644 --- a/kernel/trunk/data16.inc +++ b/kernel/trunk/data16.inc @@ -79,7 +79,6 @@ config_file_variables: config_variable 'timeout', parse_timeout config_variable 'resolution', parse_resolution config_variable 'vbemode', parse_vbemode -; config_variable 'vrr', parse_vrr config_variable 'biosdisks', parse_biosdisks config_variable 'imgfrom', parse_imgfrom dw 0 diff --git a/kernel/trunk/data32.inc b/kernel/trunk/data32.inc index eb02dc6071..5f2d2e21bb 100644 --- a/kernel/trunk/data32.inc +++ b/kernel/trunk/data32.inc @@ -169,7 +169,6 @@ mtrr_user_message db '"There is a problem with MTRR configuration.\nPerformance end if vmode db '/sys/drivers/VMODE.MDR',0 -;vrr_m db 'VRR_M',0 kernel_file_load: ; load kernel.mnt to _CLEAN_ZONE dd 0 ; subfunction diff --git a/kernel/trunk/docs/sysfuncr.txt b/kernel/trunk/docs/sysfuncr.txt index 867b8b6bf5..4206e79211 100644 --- a/kernel/trunk/docs/sysfuncr.txt +++ b/kernel/trunk/docs/sysfuncr.txt @@ -2757,9 +2757,7 @@ IPC применяется для посылок сообщений от одн Для интерпретации данных графического экрана требуется знание некоторых параметров, которые возвращаются этой функцией. Замечания: - * Параметры графики очень редко меняются при работе системы, - а именно, только в случаях, когда пользователь работает - с программой VRR. + * Параметры графики очень редко меняются при работе системы. * При изменении видеорежима система перерисовывает все окна (событие с кодом 1) и перерисовывает фон (событие 5). Эти же события происходят и в других случаях, diff --git a/kernel/trunk/docs/sysfuncs.txt b/kernel/trunk/docs/sysfuncs.txt index a95845a1fb..86dcab26e6 100644 --- a/kernel/trunk/docs/sysfuncs.txt +++ b/kernel/trunk/docs/sysfuncs.txt @@ -2727,8 +2727,7 @@ by work in VESA modes with LFB sets color of the left upper point To interpret the data of graphics screen program needs to know some parameters, returning by this function. Remarks: - * Graphics parameters changes very seldom at work, - namely, only in cases, when user works with the application VRR. + * Graphics parameters changes very seldom at work. * At videomode change the system redraws all windows (event with code 1) and redraws the background (event 5). Same events occur in other cases too, which meet much more often, diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 7a4b22a1da..034c9c72e2 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -2192,7 +2192,7 @@ sysfn_shutdown: ; 18.9 = system shutdown jl exit_for_anyone cmp ecx, 4 jg exit_for_anyone - mov [BOOT_VARS+0x9030], cl + mov [BOOT_VARS+BOOT_SHUTDOWN_TYPE], cl mov eax, [TASK_COUNT] mov [SYS_SHUTDOWN], al diff --git a/kernel/trunk/memmap.inc b/kernel/trunk/memmap.inc index 2f92a8ddc5..72a10365fa 100644 --- a/kernel/trunk/memmap.inc +++ b/kernel/trunk/memmap.inc @@ -22,7 +22,7 @@ ; 0:901E byte 0 or 1 : enable direct lfb write, paging disabled ; 0:901F byte DMA write : 1=yes, 2=no ; 0:9020 8bytes pci data -; 0:9030 byte VRR start enabled 1, 2-no +; 0:9030 byte shutdown type (see sysfn 18.9) ; 0:9031 word IDEContrRegsBaseAddr ; 0x9040 - dword - entry point of APM BIOS ; 0x9044 - word - version (BCD) diff --git a/kernel/trunk/readme-ext-loader.txt b/kernel/trunk/readme-ext-loader.txt index ccfe7fc629..e330ffb5b0 100644 --- a/kernel/trunk/readme-ext-loader.txt +++ b/kernel/trunk/readme-ext-loader.txt @@ -42,8 +42,6 @@ vbemode=<номер видеорежима VBE> задаёт желаемый г игнорируется. Параметр более приоритетен, чем resolution. Умолчального значения нет. -vrr=<включить VRR> - булевский параметр. Умолчальное значение 0. - biosdisks=<включить доступ к дискам через BIOS> - булевский параметр. Умолчальное значение 1.