forked from KolibriOS/kolibrios
kernel: reduce DRIVE_DATA array. Now kernel can handle only 64 /hd and /cd partitions
git-svn-id: svn://kolibrios.org@3627 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
61f55267ef
commit
f272bbb588
@ -179,6 +179,9 @@ struct TSS
|
|||||||
_io_map_1 rb 4096
|
_io_map_1 rb 4096
|
||||||
ends
|
ends
|
||||||
|
|
||||||
|
PARTITION_COUNT equ 64
|
||||||
|
DRIVE_DATA_SIZE equ (16+PARTITION_COUNT*100)
|
||||||
|
|
||||||
OS_BASE equ 0x80000000
|
OS_BASE equ 0x80000000
|
||||||
|
|
||||||
window_data equ (OS_BASE+0x0001000)
|
window_data equ (OS_BASE+0x0001000)
|
||||||
@ -189,25 +192,13 @@ TASK_BASE equ (OS_BASE+0x0003010)
|
|||||||
TASK_DATA equ (OS_BASE+0x0003020)
|
TASK_DATA equ (OS_BASE+0x0003020)
|
||||||
TASK_EVENT equ (OS_BASE+0x0003020)
|
TASK_EVENT equ (OS_BASE+0x0003020)
|
||||||
|
|
||||||
mouseunder equ (OS_BASE+0x0006900)
|
|
||||||
CDDataBuf equ (OS_BASE+0x0007000)
|
CDDataBuf equ (OS_BASE+0x0007000)
|
||||||
FLOPPY_BUFF equ (OS_BASE+0x0008000)
|
FLOPPY_BUFF equ (OS_BASE+0x0008000)
|
||||||
ACTIVE_PROC_STACK equ (OS_BASE+0x000A400) ;unused
|
|
||||||
idts equ (OS_BASE+0x000B100)
|
idts equ (OS_BASE+0x000B100)
|
||||||
WIN_STACK equ (OS_BASE+0x000C000)
|
WIN_STACK equ (OS_BASE+0x000C000)
|
||||||
WIN_POS equ (OS_BASE+0x000C400)
|
WIN_POS equ (OS_BASE+0x000C400)
|
||||||
FDD_BUFF equ (OS_BASE+0x000D000)
|
FDD_BUFF equ (OS_BASE+0x000D000)
|
||||||
|
|
||||||
PUTPIXEL equ (OS_BASE+0x000E020)
|
|
||||||
GETPIXEL equ (OS_BASE+0x000E024)
|
|
||||||
|
|
||||||
;unused ? only one reference
|
|
||||||
BANK_SWITCH equ (OS_BASE+0x000E030)
|
|
||||||
|
|
||||||
;unused ? store mousepointer
|
|
||||||
MOUSE_PICTURE equ (OS_BASE+0x000F200)
|
|
||||||
|
|
||||||
;MOUSE_VISIBLE equ (OS_BASE+0x000F204)
|
|
||||||
WIN_TEMP_XY equ (OS_BASE+0x000F300)
|
WIN_TEMP_XY equ (OS_BASE+0x000F300)
|
||||||
KEY_COUNT equ (OS_BASE+0x000F400)
|
KEY_COUNT equ (OS_BASE+0x000F400)
|
||||||
KEY_BUFF equ (OS_BASE+0x000F401)
|
KEY_BUFF equ (OS_BASE+0x000F401)
|
||||||
@ -216,43 +207,19 @@ BTN_COUNT equ (OS_BASE+0x000F500)
|
|||||||
BTN_BUFF equ (OS_BASE+0x000F501)
|
BTN_BUFF equ (OS_BASE+0x000F501)
|
||||||
|
|
||||||
|
|
||||||
MOUSE_SCROLL_H equ (OS_BASE+0x000FB08)
|
|
||||||
MOUSE_X equ (OS_BASE+0x000FB0A)
|
|
||||||
MOUSE_Y equ (OS_BASE+0x000FB0C)
|
|
||||||
MOUSE_SCROLL_V equ (OS_BASE+0x000FB0E)
|
|
||||||
|
|
||||||
MOUSE_COLOR_MEM equ (OS_BASE+0x000FB10)
|
|
||||||
COLOR_TEMP equ (OS_BASE+0x000FB30)
|
|
||||||
BTN_DOWN equ (OS_BASE+0x000FB40)
|
|
||||||
X_UNDER equ (OS_BASE+0x000FB4A)
|
|
||||||
Y_UNDER equ (OS_BASE+0x000FB4C)
|
|
||||||
|
|
||||||
;unused ? only one reference
|
|
||||||
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF)
|
|
||||||
|
|
||||||
|
|
||||||
LFBAddress equ (OS_BASE+0x000FE80)
|
|
||||||
BTN_ADDR equ (OS_BASE+0x000FE88)
|
BTN_ADDR equ (OS_BASE+0x000FE88)
|
||||||
MEM_AMOUNT equ (OS_BASE+0x000FE8C)
|
MEM_AMOUNT equ (OS_BASE+0x000FE8C)
|
||||||
|
|
||||||
SYS_SHUTDOWN equ (OS_BASE+0x000FF00)
|
SYS_SHUTDOWN equ (OS_BASE+0x000FF00)
|
||||||
TASK_ACTIVATE equ (OS_BASE+0x000FF01)
|
TASK_ACTIVATE equ (OS_BASE+0x000FF01)
|
||||||
|
|
||||||
REDRAW_BACKGROUND equ (OS_BASE+0x000FFF0)
|
|
||||||
|
|
||||||
BANK_RW equ (OS_BASE+0x000FFF2)
|
|
||||||
|
|
||||||
TMP_STACK_TOP equ 0x006CC00
|
TMP_STACK_TOP equ 0x006CC00
|
||||||
|
|
||||||
sys_pgdir equ (OS_BASE+0x006F000)
|
sys_pgdir equ (OS_BASE+0x006F000)
|
||||||
|
|
||||||
DRIVE_DATA equ (OS_BASE+0x0070000)
|
|
||||||
|
|
||||||
SLOT_BASE equ (OS_BASE+0x0080000)
|
SLOT_BASE equ (OS_BASE+0x0080000)
|
||||||
|
|
||||||
;unused
|
|
||||||
TMP_BUFF equ (OS_BASE+0x0090000)
|
|
||||||
|
|
||||||
VGABasePtr equ (OS_BASE+0x00A0000)
|
VGABasePtr equ (OS_BASE+0x00A0000)
|
||||||
|
|
||||||
RAMDISK equ (OS_BASE+0x0100000)
|
RAMDISK equ (OS_BASE+0x0100000)
|
||||||
|
@ -323,6 +323,8 @@ tls_data_l:
|
|||||||
endofcode:
|
endofcode:
|
||||||
gdte:
|
gdte:
|
||||||
|
|
||||||
|
diff16 "end of .data segment",0,$
|
||||||
|
|
||||||
align 16
|
align 16
|
||||||
cur_saved_data:
|
cur_saved_data:
|
||||||
rb 4096
|
rb 4096
|
||||||
@ -364,11 +366,38 @@ _display display_t
|
|||||||
_WinMapAddress rd 1
|
_WinMapAddress rd 1
|
||||||
_WinMapSize rd 1
|
_WinMapSize rd 1
|
||||||
|
|
||||||
|
LFBAddress rd 1
|
||||||
Screen_Max_X rd 1
|
Screen_Max_X rd 1
|
||||||
Screen_Max_Y rd 1
|
Screen_Max_Y rd 1
|
||||||
|
|
||||||
SCR_MODE rw 2
|
SCR_MODE rw 2
|
||||||
|
|
||||||
|
PUTPIXEL rd 1
|
||||||
|
GETPIXEL rd 1
|
||||||
|
|
||||||
|
if VESA_1_2_VIDEO
|
||||||
|
BANK_SWITCH rd 1 reserved for vesa 1.2
|
||||||
|
BANK_RW rd 1
|
||||||
|
end if
|
||||||
|
|
||||||
|
REDRAW_BACKGROUND rb 4
|
||||||
|
|
||||||
|
mouseunder rd 16*24
|
||||||
|
|
||||||
|
MOUSE_PICTURE rd 1
|
||||||
|
|
||||||
|
MOUSE_SCROLL_H rw 1
|
||||||
|
MOUSE_X: rw 1
|
||||||
|
MOUSE_Y: rw 1
|
||||||
|
MOUSE_SCROLL_V rw 1
|
||||||
|
|
||||||
|
X_UNDER rw 1
|
||||||
|
Y_UNDER rw 1
|
||||||
|
COLOR_TEMP rd 1
|
||||||
|
MOUSE_COLOR_MEM rd 1
|
||||||
|
|
||||||
|
BTN_DOWN: rb 4
|
||||||
|
|
||||||
def_cursor rd 1
|
def_cursor rd 1
|
||||||
def_cursor_clock rd 1
|
def_cursor_clock rd 1
|
||||||
current_cursor rd 1
|
current_cursor rd 1
|
||||||
@ -513,5 +542,7 @@ NumBiosDisks rd 1
|
|||||||
BiosDisksData rb 200h
|
BiosDisksData rb 200h
|
||||||
BiosDiskCaches rb 80h*(cache_ide1-cache_ide0)
|
BiosDiskCaches rb 80h*(cache_ide1-cache_ide0)
|
||||||
BiosDiskPartitions rd 80h
|
BiosDiskPartitions rd 80h
|
||||||
|
align 16
|
||||||
|
DRIVE_DATA: rb DRIVE_DATA_SIZE
|
||||||
|
|
||||||
IncludeUGlobals
|
IncludeUGlobals
|
||||||
|
@ -15,7 +15,7 @@ $Revision$
|
|||||||
;***************************************************
|
;***************************************************
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov edi, DRIVE_DATA
|
mov edi, DRIVE_DATA
|
||||||
mov ecx, 16384
|
mov ecx, DRIVE_DATA_SIZE/4
|
||||||
cld
|
cld
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
|
@ -683,61 +683,43 @@ fs_NumCdServices = ($ - fs_CdServices)/4
|
|||||||
fs_HasRamdisk:
|
fs_HasRamdisk:
|
||||||
mov al, 1 ; we always have ramdisk
|
mov al, 1 ; we always have ramdisk
|
||||||
ret
|
ret
|
||||||
|
|
||||||
fs_HasFloppy:
|
fs_HasFloppy:
|
||||||
cmp byte [DRIVE_DATA], 0
|
cmp byte [DRIVE_DATA], 0
|
||||||
setnz al
|
setnz al
|
||||||
ret
|
ret
|
||||||
|
|
||||||
fs_HasHd0:
|
fs_HasHd0:
|
||||||
mov al, [DRIVE_DATA+1]
|
test byte [DRIVE_DATA+1], 01000000b
|
||||||
and al, 11000000b
|
setnz al
|
||||||
cmp al, 01000000b
|
|
||||||
setz al
|
|
||||||
ret
|
ret
|
||||||
fs_HasHd1:
|
fs_HasHd1:
|
||||||
mov al, [DRIVE_DATA+1]
|
test byte [DRIVE_DATA+1], 00010000b
|
||||||
and al, 00110000b
|
setnz al
|
||||||
cmp al, 00010000b
|
|
||||||
setz al
|
|
||||||
ret
|
ret
|
||||||
fs_HasHd2:
|
fs_HasHd2:
|
||||||
mov al, [DRIVE_DATA+1]
|
test byte [DRIVE_DATA+1], 00000100b
|
||||||
and al, 00001100b
|
setnz al
|
||||||
cmp al, 00000100b
|
|
||||||
setz al
|
|
||||||
ret
|
ret
|
||||||
fs_HasHd3:
|
fs_HasHd3:
|
||||||
mov al, [DRIVE_DATA+1]
|
test byte [DRIVE_DATA+1], 00000001b
|
||||||
and al, 00000011b
|
setnz al
|
||||||
cmp al, 00000001b
|
|
||||||
setz al
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
fs_HasCd0:
|
fs_HasCd0:
|
||||||
mov al, [DRIVE_DATA+1]
|
test byte [DRIVE_DATA+1], 10000000b
|
||||||
and al, 11000000b
|
setnz al
|
||||||
cmp al, 10000000b
|
|
||||||
setz al
|
|
||||||
ret
|
ret
|
||||||
fs_HasCd1:
|
fs_HasCd1:
|
||||||
mov al, [DRIVE_DATA+1]
|
test byte [DRIVE_DATA+1], 00100000b
|
||||||
and al, 00110000b
|
setnz al
|
||||||
cmp al, 00100000b
|
|
||||||
setz al
|
|
||||||
ret
|
ret
|
||||||
fs_HasCd2:
|
fs_HasCd2:
|
||||||
mov al, [DRIVE_DATA+1]
|
test byte [DRIVE_DATA+1], 00001000b
|
||||||
and al, 00001100b
|
setnz al
|
||||||
cmp al, 00001000b
|
|
||||||
setz al
|
|
||||||
ret
|
ret
|
||||||
fs_HasCd3:
|
fs_HasCd3:
|
||||||
mov al, [DRIVE_DATA+1]
|
test byte [DRIVE_DATA+1], 00000010b
|
||||||
and al, 00000011b
|
setnz al
|
||||||
cmp al, 00000010b
|
|
||||||
setz al
|
|
||||||
ret
|
ret
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@ $Revision$
|
|||||||
|
|
||||||
|
|
||||||
USE_COM_IRQ equ 1 ; make irq 3 and irq 4 available for PCI devices
|
USE_COM_IRQ equ 1 ; make irq 3 and irq 4 available for PCI devices
|
||||||
|
VESA_1_2_VIDEO equ 0 ; enable vesa 1.2 bank switch functions
|
||||||
|
|
||||||
; Enabling the next line will enable serial output console
|
; Enabling the next line will enable serial output console
|
||||||
;debug_com_base equ 0x3f8 ; 0x3f8 is com1, 0x2f8 is com2, 0x3e8 is com3, 0x2e8 is com4, no irq's are used
|
;debug_com_base equ 0x3f8 ; 0x3f8 is com1, 0x2f8 is com2, 0x3e8 is com3, 0x2e8 is com4, no irq's are used
|
||||||
@ -230,6 +231,10 @@ tmp_gdt:
|
|||||||
|
|
||||||
include "data16.inc"
|
include "data16.inc"
|
||||||
|
|
||||||
|
if ~ lang eq sp
|
||||||
|
diff16 "end of bootcode",0,$+0x10000
|
||||||
|
end if
|
||||||
|
|
||||||
use32
|
use32
|
||||||
org $+0x10000
|
org $+0x10000
|
||||||
|
|
||||||
@ -1241,13 +1246,10 @@ set_variables:
|
|||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [BTN_ADDR], dword BUTTON_INFO ; address of button list
|
mov [BTN_ADDR], dword BUTTON_INFO ; address of button list
|
||||||
|
|
||||||
mov byte [MOUSE_BUFF_COUNT], al ; mouse buffer
|
|
||||||
mov byte [KEY_COUNT], al ; keyboard buffer
|
mov byte [KEY_COUNT], al ; keyboard buffer
|
||||||
mov byte [BTN_COUNT], al ; button buffer
|
mov byte [BTN_COUNT], al ; button buffer
|
||||||
; mov [MOUSE_X],dword 100*65536+100 ; mouse x/y
|
; mov [MOUSE_X],dword 100*65536+100 ; mouse x/y
|
||||||
|
|
||||||
;!! IP 04.02.2005:
|
|
||||||
; mov byte [DONT_SWITCH], al; change task if possible
|
|
||||||
pop eax
|
pop eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2324,7 +2326,7 @@ sysfn_getdiskinfo: ; 18.11 = get disk info table
|
|||||||
dec ecx
|
dec ecx
|
||||||
jnz exit_for_anyone
|
jnz exit_for_anyone
|
||||||
call for_all_tables
|
call for_all_tables
|
||||||
mov ecx, 16384
|
mov ecx, DRIVE_DATA_SIZE/4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
ret
|
ret
|
||||||
@ -5806,6 +5808,10 @@ scan_rsdp:
|
|||||||
ret
|
ret
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
if ~ lang eq sp
|
||||||
|
diff16 "end of .text segment",0,$
|
||||||
|
end if
|
||||||
|
|
||||||
include "data32.inc"
|
include "data32.inc"
|
||||||
|
|
||||||
__REV__ = __REV
|
__REV__ = __REV
|
||||||
|
Loading…
Reference in New Issue
Block a user