Compare commits
2 Commits
main
...
rewrite_id
Author | SHA1 | Date | |
---|---|---|---|
fdac11e922 | |||
1aa272b2e9 |
@ -12,13 +12,6 @@
|
|||||||
; Source code author - Kulakov Vladimir Gennadievich.
|
; Source code author - Kulakov Vladimir Gennadievich.
|
||||||
; Adaptation and improvement - Mario79.
|
; Adaptation and improvement - Mario79.
|
||||||
|
|
||||||
give_back_application_data_1:
|
|
||||||
mov esi, FDD_BUFF;FDD_DataBuffer ;0x40000
|
|
||||||
mov ecx, 128
|
|
||||||
cld
|
|
||||||
rep movsd
|
|
||||||
ret
|
|
||||||
|
|
||||||
take_data_from_application_1:
|
take_data_from_application_1:
|
||||||
mov edi, FDD_BUFF;FDD_DataBuffer ;0x40000
|
mov edi, FDD_BUFF;FDD_DataBuffer ;0x40000
|
||||||
mov ecx, 128
|
mov ecx, 128
|
||||||
@ -717,18 +710,38 @@ endg
|
|||||||
; This function is called in boot process.
|
; This function is called in boot process.
|
||||||
; It creates filesystems /fd and/or /fd2, if the system has one/two floppy drives.
|
; It creates filesystems /fd and/or /fd2, if the system has one/two floppy drives.
|
||||||
proc floppy_init
|
proc floppy_init
|
||||||
|
; search for FDDs and add them to the list of disks
|
||||||
|
; author - Mario79
|
||||||
|
mov al, 0x10
|
||||||
|
out 0x70, al
|
||||||
|
mov cx, 0xff
|
||||||
|
.wait_cmos:
|
||||||
|
dec cx
|
||||||
|
test cx, cx
|
||||||
|
jnz .wait_cmos
|
||||||
|
in al, 0x71
|
||||||
|
test al, al
|
||||||
|
jz .no_fdd
|
||||||
|
|
||||||
|
push eax ; b[esp]=al [esp+1..3]- ??
|
||||||
|
|
||||||
|
stdcall attach_int_handler, 6, FDCInterrupt, 0
|
||||||
|
DEBUGF 1, "K : Set Floppy IRQ6 return code %x\n", eax
|
||||||
|
|
||||||
mov ecx, floppy_mutex
|
mov ecx, floppy_mutex
|
||||||
call mutex_init
|
call mutex_init
|
||||||
; First floppy is present if [DRIVE_DATA] and 0xF0 is nonzero.
|
; First floppy is present if [esp] and 0xF0 is nonzero.
|
||||||
test byte [DRIVE_DATA], 0xF0
|
test byte [esp], 0xF0
|
||||||
jz .no1
|
jz .no1
|
||||||
stdcall disk_add, floppy_functions, floppy1_name, 1, DISK_NO_INSERT_NOTIFICATION
|
stdcall disk_add, floppy_functions, floppy1_name, 1, DISK_NO_INSERT_NOTIFICATION
|
||||||
.no1:
|
.no1:
|
||||||
; Second floppy is present if [DRIVE_DATA] and 0x0F is nonzero.
|
; Second floppy is present if [esp] and 0x0F is nonzero.
|
||||||
test byte [DRIVE_DATA], 0x0F
|
test byte [esp], 0x0F
|
||||||
jz .no2
|
jz .no2
|
||||||
stdcall disk_add, floppy_functions, floppy2_name, 2, DISK_NO_INSERT_NOTIFICATION
|
stdcall disk_add, floppy_functions, floppy2_name, 2, DISK_NO_INSERT_NOTIFICATION
|
||||||
.no2:
|
.no2:
|
||||||
|
add esp, 4
|
||||||
|
.no_fdd:
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ goto :eof
|
|||||||
|
|
||||||
:Target_kernel
|
:Target_kernel
|
||||||
rem valid languages: en ru ge et sp
|
rem valid languages: en ru ge et sp
|
||||||
set lang=en
|
set lang=en_US
|
||||||
|
|
||||||
echo *** building kernel with language '%lang%' ...
|
echo *** building kernel with language '%lang%' ...
|
||||||
|
|
||||||
|
@ -851,37 +851,6 @@ struct PCIDEV
|
|||||||
owner dd ? ; pointer to SRV or 0
|
owner dd ? ; pointer to SRV or 0
|
||||||
ends
|
ends
|
||||||
|
|
||||||
struct IDE_DATA
|
|
||||||
ProgrammingInterface dd ?
|
|
||||||
Interrupt dw ?
|
|
||||||
RegsBaseAddres dw ?
|
|
||||||
BAR0_val dw ?
|
|
||||||
BAR1_val dw ?
|
|
||||||
BAR2_val dw ?
|
|
||||||
BAR3_val dw ?
|
|
||||||
dma_hdd_channel_1 db ?
|
|
||||||
dma_hdd_channel_2 db ?
|
|
||||||
pcidev dd ? ; pointer to corresponding PCIDEV structure
|
|
||||||
ends
|
|
||||||
|
|
||||||
struct IDE_CACHE
|
|
||||||
pointer dd ?
|
|
||||||
size dd ? ; not use
|
|
||||||
data_pointer dd ?
|
|
||||||
system_data_size dd ? ; not use
|
|
||||||
appl_data_size dd ? ; not use
|
|
||||||
system_data dd ?
|
|
||||||
appl_data dd ?
|
|
||||||
system_sad_size dd ?
|
|
||||||
appl_sad_size dd ?
|
|
||||||
search_start dd ?
|
|
||||||
appl_search_start dd ?
|
|
||||||
ends
|
|
||||||
|
|
||||||
struct IDE_DEVICE
|
|
||||||
UDMA_possible_modes db ?
|
|
||||||
UDMA_set_mode db ?
|
|
||||||
ends
|
|
||||||
|
|
||||||
; The following macro assume that we are on uniprocessor machine.
|
; The following macro assume that we are on uniprocessor machine.
|
||||||
; Serious work is needed for multiprocessor machines.
|
; Serious work is needed for multiprocessor machines.
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
;; ;;
|
|
||||||
;; Copyright (C) KolibriOS team 2004-2024. All rights reserved. ;;
|
|
||||||
;; Distributed under terms of the GNU General Public License ;;
|
|
||||||
;; ;;
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
|
|
||||||
;***************************************************
|
|
||||||
; clear the DRIVE_DATA table,
|
|
||||||
; search for FDDs and add them into the table
|
|
||||||
; author - Mario79
|
|
||||||
;***************************************************
|
|
||||||
xor eax, eax
|
|
||||||
mov edi, DRIVE_DATA
|
|
||||||
mov ecx, DRIVE_DATA_SIZE/4
|
|
||||||
cld
|
|
||||||
rep stosd
|
|
||||||
|
|
||||||
mov al, 0x10
|
|
||||||
out 0x70, al
|
|
||||||
mov cx, 0xff
|
|
||||||
wait_cmos:
|
|
||||||
dec cx
|
|
||||||
test cx, cx
|
|
||||||
jnz wait_cmos
|
|
||||||
in al, 0x71
|
|
||||||
mov [DRIVE_DATA], al
|
|
||||||
test al, al
|
|
||||||
jz @f
|
|
||||||
|
|
||||||
stdcall attach_int_handler, 6, FDCInterrupt, 0
|
|
||||||
DEBUGF 1, "K : Set IDE IRQ6 return code %x\n", eax
|
|
||||||
call floppy_init
|
|
||||||
@@:
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
;; ;;
|
|
||||||
;; Copyright (C) KolibriOS team 2004-2024. All rights reserved. ;;
|
|
||||||
;; Distributed under terms of the GNU General Public License ;;
|
|
||||||
;; ;;
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
|
|
||||||
include 'dev_fd.inc'
|
|
||||||
include 'dev_hdcd.inc'
|
|
||||||
include 'getcache.inc'
|
|
||||||
include 'sear_par.inc'
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -729,7 +729,7 @@ end if
|
|||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
mov esi, boot_detectfloppy
|
mov esi, boot_detectfloppy
|
||||||
call boot_log
|
call boot_log
|
||||||
include 'detect/dev_fd.inc'
|
call floppy_init
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
; create pci-devices list
|
; create pci-devices list
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user