Subversion Repositories Kolibri OS

Rev

Rev 7136 | Rev 8052 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7136 Rev 7733
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2020. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 7136 $
8
$Revision: 7733 $
9
 
9
 
10
align 4
10
align 4
11
proc mem_test
11
proc mem_test
Line 427... Line 427...
427
acpi_rsdt_base    rd 1
427
acpi_rsdt_base    rd 1
428
acpi_fadt_base    rd 1
428
acpi_fadt_base    rd 1
429
acpi_dsdt_base    rd 1
429
acpi_dsdt_base    rd 1
430
acpi_dsdt_size    rd 1
430
acpi_dsdt_size    rd 1
431
acpi_madt_base    rd 1
431
acpi_madt_base    rd 1
432
acpi_ioapic_base  rd 1
432
acpi_ioapic_base  rd MAX_IOAPICS
433
acpi_hpet_base    rd 1
433
acpi_hpet_base    rd 1
434
hpet_base         rd 1
434
hpet_base         rd 1
435
hpet_period       rd 1
435
hpet_period       rd 1
436
hpet_timers       rd 1
436
hpet_timers       rd 1
437
hpet_tsc_start    rd 2
437
hpet_tsc_start    rd 2
Line 579... Line 579...
579
 
579
 
580
        mov     [edi], ebx           ; bootstrap always first
580
        mov     [edi], ebx           ; bootstrap always first
581
        inc     [cpu_count-OS_BASE]
581
        inc     [cpu_count-OS_BASE]
Line -... Line 582...
-
 
582
        add     edi, 4
582
        add     edi, 4
583
 
583
 
584
        mov     [ioapic_cnt-OS_BASE], 0
584
        lea     edx, [eax+44]
585
        lea     edx, [eax+44]
585
        mov     ecx, [eax+4]
586
        mov     ecx, [eax+4]
586
        add     ecx, eax
587
        add     ecx, eax
587
.check:
588
.check:
-
 
589
        mov     eax, [edx]
-
 
590
        cmp     al, 0
588
        mov     eax, [edx]
591
        je      .lapic
-
 
592
        cmp     al, 1
589
        cmp     al, 0
593
        je      .io_apic
590
        jne     .io_apic
594
        jmp     .next
591
 
595
.lapic:
592
        shr     eax, 24              ; get APIC ID
596
        shr     eax, 24              ; get APIC ID
Line 593... Line 597...
593
        cmp     eax, ebx             ; skip self
597
        cmp     eax, ebx             ; skip self
Line 609... Line 613...
609
        jb      .check
613
        jb      .check
610
.done:
614
.done:
611
        ret
615
        ret
Line 612... Line 616...
612
 
616
 
613
.io_apic:
617
.io_apic:
614
        cmp     al, 1
618
        mov     eax, [ioapic_cnt-OS_BASE]
615
        jne     .next
-
 
-
 
619
        push    dword[edx+4]
616
 
620
        pop     [acpi_ioapic_base-OS_BASE+eax*4]
617
        mov     eax, [edx+4]
621
        push    dword[edx+8]
-
 
622
        pop     [ioapic_gsi_base-OS_BASE+eax*4]
618
        mov     [acpi_ioapic_base-OS_BASE], eax
623
        inc     [ioapic_cnt-OS_BASE]
Line 619... Line 624...
619
        jmp     .next
624
        jmp     .next
620
 
625
 
621
HPET_PERIOD             = 0x0004
626
HPET_PERIOD             = 0x0004