Cursor is better
This commit is contained in:
parent
b27b12e49c
commit
f7deeb1e37
|
@ -92,6 +92,13 @@ enum {
|
|||
FEAT_EDX_PBE = 1 << 31
|
||||
};
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
typedef struct {
|
||||
ushort length;
|
||||
void* base;
|
||||
} __attribute__((packed)) Idtr_t;
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
#endif
|
||||
|
||||
|
|
|
@ -22,17 +22,18 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
#include <kernel/base.h>
|
||||
#include <kernel/cpu.h>
|
||||
|
||||
extern void lidt(Idtr_t reg);
|
||||
|
||||
//
|
||||
// Registers the new idt in the idtr register.
|
||||
//
|
||||
static inline void lidt(void* idtAddr, ushort size)
|
||||
static inline void loadIdt(void* idtAddr, ushort size)
|
||||
{
|
||||
// The IDTR register structure that will be sent
|
||||
struct {
|
||||
ushort length;
|
||||
void* base;
|
||||
} __attribute__((packed)) IDTR = { size, idtAddr };
|
||||
Idtr_t IDTR = { size, idtAddr };
|
||||
|
||||
asm volatile( "lidt %0" : : "m"(IDTR) );
|
||||
lidt(IDTR);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
void IoEnableCursor(void)
|
||||
{
|
||||
IoWriteByteOnPort(0x3D4, 0xA);
|
||||
IoWriteByteOnPort(0x3D5, (IoReadByteFromPort(0x3D5) & 0xC0));
|
||||
IoWriteByteOnPort(0x3D5, (IoReadByteFromPort(0x3D5) & 0xC0) | 15);
|
||||
|
||||
IoWriteByteOnPort(0x3D4, 0xB);
|
||||
IoWriteByteOnPort(0x3D5, (IoReadByteFromPort(0x3D5) & 0xE0) | 15);
|
||||
|
|
Loading…
Reference in New Issue