52 lines
1.4 KiB
C
52 lines
1.4 KiB
C
/* asm_x86.h - This file is a part of NutsOS
|
|
*
|
|
* NutsOS
|
|
* Copyright (C) 2013 Free Software Foundation, Inc.
|
|
*
|
|
* NutsOS is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* NutsOS is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with NutsOS; If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
* Valentin Verdier <valentin.verdier03@gmail.com>
|
|
*/
|
|
|
|
#pragma once
|
|
#ifndef ASM_X86_H
|
|
#define ASM_X86_H
|
|
|
|
#include "types.h"
|
|
#include "memory.h"
|
|
#include "interrupt.h"
|
|
|
|
void _loadGdtR(T_gdt*);
|
|
void _loadTaskRegister();
|
|
void _loadIdtR(T_idt*);
|
|
void _clearInterrupt();
|
|
void _startInterrupt();
|
|
void _out(T_word, T_byte);
|
|
T_byte _in(T_word);
|
|
void _outw(T_word, T_word);
|
|
T_word _inw(T_word);
|
|
void _outdw(T_word, T_dword);
|
|
T_dword _indw(T_word);
|
|
void _enablePaging();
|
|
void _emptyTLB();
|
|
void _loadCr3(T_dword);
|
|
T_dword _readCr3();
|
|
T_dword _readCr2();
|
|
T_dword _saveEflags();
|
|
T_dword _restoreEflags(T_dword);
|
|
T_dword _atomicTestAndSet(unsigned int*);
|
|
T_dword _getStackFrameAddr(unsigned int);
|
|
|
|
#endif
|