Aktív témák
-
Pizzafutar
aktív tag
válasz Pizzafutar #2 üzenetére
Na, ha senki nem szolt hozza, akkor ide másolom a kérdéses részt.
arch/i386/boot/setup.S
# Well, now's the time to actually move into protected mode. To make
# things as simple as possible, we do no register set-up or anything,
# we let the gnu-compiled 32-bit programs do that. We just jump to
# absolute address 0x1000 (or the loader supplied one),
# in 32-bit protected mode.
#
# Note that the short jump isn't strictly needed, although there are
# reasons why it might be a good idea. It won't hurt in any case.
movw $1, %ax # protected mode (PE) bit
lmsw %ax # This is it!
jmp flush_instr
flush_instr:
xorw %bx, %bx # Flag to indicate a boot
xorl %esi, %esi # Pointer to real-mode code
movw %cs, %si
subw $DELTA_INITSEG, %si
shll $4, %esi # Convert to 32-bit pointer
# jump to startup_32 in arch/i386/boot/compressed/head.S
#
# NOTE: For high loaded big kernels we need a
# jmpi 0x100000,__BOOT_CS
#
# but we yet haven't reloaded the CS register, so the default size
# of the target offset still is 16 bit.
# However, using an operand prefix (0x66), the CPU will properly
# take our 48 bit far pointer. (INTeL 80386 Programmer's Reference
# Manual, Mixing 16-bit and 32-bit code, page 16-6)
.byte 0x66, 0xea # prefix + jmpi-opcode
code32: .long 0x1000 # will be set to 0x100000
# for big kernels -
Pizzafutar
aktív tag
Szerintem nem lehet használni az interruptokat.
Annak 3 feltétele lenne:
Létre kellene hozni az uj int. tablazatot, ez ebben a modban 8 byteos cimeket tartalmazna. A táblázat cimét be kell tolteni az IDT regiszterbe.
Létezni-e kellen az uj bios rutinoknak
Az int utasitas vedett modban kizarast eredményezhet.
Egyébként emlékeim szerint, protected modba kapcsolas utan az oprendszerek sem hasznaljak már a BIOS-t.
Az intel szintaktikához talan a fent emlitett
INTeL 80386 Programmer's Reference
# Manual, Mixing 16-bit and 32-bit code, page 16-6
Vagy google lmsw
[Szerkesztve]
Aktív témák
- Kávé kezdőknek - amatőr koffeinisták anonim klubja
- BMW topik
- Luck Dragon: Asszociációs játék. :)
- Sony MILC fényképezőgépcsalád
- Otthonfelújítási program (2024.)
- Anglia - élmények, tapasztalatok
- Debian GNU/Linux
- Kedvenc zene a mai napra
- Huawei Mate 10 Pro - mestersége az intelligencia
- World of Tanks - MMO
- További aktív témák...