Rev 5031 | Rev 5033 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5031 | Rev 5032 | ||
---|---|---|---|
Line 69... | Line 69... | ||
69 | format binary as "mnt" |
69 | format binary as "mnt" |
Line 70... | Line 70... | ||
70 | 70 | ||
71 | include 'macros.inc' |
71 | include 'macros.inc' |
Line 72... | Line 72... | ||
72 | include 'struct.inc' |
72 | include 'struct.inc' |
Line 73... | Line 73... | ||
73 | 73 | ||
74 | $Revision: 5031 $ |
74 | $Revision: 5032 $ |
Line 5450... | Line 5450... | ||
5450 | ; cld |
5450 | ; cld |
5451 | ; rep movsd |
5451 | ; rep movsd |
Line 5452... | Line 5452... | ||
5452 | 5452 | ||
Line 5453... | Line -... | ||
5453 | call IRQ_mask_all |
- | |
5454 | - | ||
5455 | if 0 |
- | |
5456 | mov word [OS_BASE+0x467+0], pr_mode_exit |
- | |
5457 | mov word [OS_BASE+0x467+2], 0x1000 |
- | |
5458 | - | ||
5459 | mov al, 0x0F |
- | |
5460 | out 0x70, al |
- | |
5461 | mov al, 0x05 |
- | |
5462 | out 0x71, al |
- | |
5463 | - | ||
5464 | mov al, 0xFE |
- | |
5465 | out 0x64, al |
- | |
5466 | - | ||
5467 | hlt |
- | |
5468 | jmp $-1 |
- | |
5469 | 5453 | call IRQ_mask_all |
|
5470 | else |
5454 | |
Line 5471... | Line 5455... | ||
5471 | cmp byte [OS_BASE + 0x9030], 2 |
5455 | cmp byte [OS_BASE + 0x9030], 2 |
5472 | jnz no_acpi_power_off |
5456 | jnz no_acpi_power_off |
Line 5611... | Line 5595... | ||
5611 | out dx, ax |
5595 | out dx, ax |
5612 | @@: |
5596 | @@: |
5613 | jmp $ |
5597 | jmp $ |
Line 5614... | Line -... | ||
5614 | - | ||
5615 | - | ||
5616 | no_acpi_power_off: |
- | |
5617 | mov word [OS_BASE+0x467+0], pr_mode_exit |
- | |
5618 | mov word [OS_BASE+0x467+2], 0x1000 |
- | |
5619 | - | ||
5620 | mov al, 0x0F |
- | |
5621 | out 0x70, al |
- | |
5622 | mov al, 0x05 |
- | |
5623 | out 0x71, al |
- | |
5624 | - | ||
5625 | mov al, 0xFE |
- | |
5626 | out 0x64, al |
- | |
5627 | - | ||
5628 | hlt |
- | |
5629 | jmp $-1 |
5598 | |
5630 | 5599 | ||
5631 | scan_rsdp: |
5600 | scan_rsdp: |
5632 | add eax, OS_BASE |
5601 | add eax, OS_BASE |
5633 | .s: |
5602 | .s: |
Line 5648... | Line 5617... | ||
5648 | add eax, 10h |
5617 | add eax, 10h |
5649 | loop .s |
5618 | loop .s |
5650 | stc |
5619 | stc |
5651 | .ok: |
5620 | .ok: |
5652 | ret |
5621 | ret |
- | 5622 | ||
- | 5623 | no_acpi_power_off: |
|
- | 5624 | call create_trampoline_pgmap |
|
- | 5625 | mov cr3, eax |
|
- | 5626 | jmp become_real+0x10000 |
|
- | 5627 | iglobal |
|
- | 5628 | align 4 |
|
- | 5629 | realmode_gdt: |
|
- | 5630 | ; selector 0 - not used |
|
- | 5631 | dw 23 |
|
- | 5632 | dd realmode_gdt-OS_BASE |
|
- | 5633 | dw 0 |
|
- | 5634 | ; selector 8 - code from 1000:0000 to 1000:FFFF |
|
- | 5635 | dw 0FFFFh |
|
- | 5636 | dw 0 |
|
- | 5637 | db 1 |
|
- | 5638 | db 10011011b |
|
- | 5639 | db 00000000b |
|
- | 5640 | db 0 |
|
- | 5641 | ; selector 10h - data from 1000:0000 to 1000:FFFF |
|
- | 5642 | dw 0FFFFh |
|
- | 5643 | dw 0 |
|
- | 5644 | db 1 |
|
- | 5645 | db 10010011b |
|
- | 5646 | db 00000000b |
|
- | 5647 | db 0 |
|
5653 | end if |
5648 | endg |
Line 5654... | Line 5649... | ||
5654 | 5649 | ||
5655 | if ~ lang eq sp |
5650 | if ~ lang eq sp |
5656 | diff16 "end of .text segment",0,$ |
5651 | diff16 "end of .text segment",0,$ |