Create and improve headers for various modules

This commit is contained in:
Ali Mashtizadeh 2014-07-06 14:30:09 -07:00
parent 1acd37a644
commit 8cf8d7f4f5
8 changed files with 38 additions and 0 deletions

13
sys/amd64/ioapic.h Normal file
View File

@ -0,0 +1,13 @@
/*
* IOAPIC Header
*/
#ifndef __IOAPIC_H__
#define __IOAPIC_H__
void IOAPIC_Init();
void IOAPIC_Enable(int irq);
void IOAPIC_Disable(int irq);
#endif /* __IOAPIC_H__ */

14
sys/amd64/lapic.h Normal file
View File

@ -0,0 +1,14 @@
/*
* LAPIC Header
*/
#ifndef __LAPIC_H__
#define __LAPIC_H__
void LAPIC_Init();
uint32_t LAPIC_CPU();
void LAPIC_SendEOI();
void LAPIC_Periodic(uint64_t rate);
#endif /* __LAPIC_H__ */

View File

@ -3,8 +3,11 @@
#include <kconfig.h>
#include <kassert.h>
#include <kmem.h>
#include "amd64.h"
#include "ioapic.h"
#include "lapic.h"
extern void Trap_Init();

View File

@ -4,10 +4,12 @@
#include <kconfig.h>
#include <kassert.h>
#include <kmem.h>
#include "amd64.h"
#include "amd64op.h"
#include "mp.h"
#include "pmap.h"
typedef struct AS
{

View File

@ -5,6 +5,7 @@
#include <kassert.h>
#include "amd64.h"
#include "lapic.h"
#include "trap.h"
extern uint64_t trap_table[T_MAX];

View File

@ -2,6 +2,8 @@
#ifndef __KMEM_H__
#define __KMEM_H__
void PAlloc_Init();
void PAlloc_AddRegion(uintptr_t start, uintptr_t len);
void *PAlloc_AllocPage();
void PAlloc_FreePage(void *pg);

View File

@ -17,6 +17,8 @@
#include <stdbool.h>
#include <stdint.h>
#include <kassert.h>
void
Debug_PrintHex(const char *data, size_t length, off_t off, size_t limit)
{

View File

@ -8,6 +8,7 @@
#include <cdefs.h>
#include <kassert.h>
#include <kmem.h>
#include <queue.h>
#include "../amd64/amd64.h"