fixed line endings on text files
git-svn-id: svn://anubis/hos/trunk@93 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
1 parent
ca82cc32ac
commit
24485b8143
19 files changed
+1444
-1444
No files matched your search
@@ -1,49 +1,49 @@
|
||||
|
||||
#ifndef HOS_DEFINES_H
|
||||
#define HOS_DEFINES_H
|
||||
|
||||
#include "hos_types.h"
|
||||
|
||||
#define KERNEL_OFFSET 0x00000000
|
||||
|
||||
#define PAGE_LOG_SIZE 12
|
||||
#define PAGE_SIZE (1 << PAGE_LOG_SIZE)
|
||||
#define PAGE_HIGH_MASK (0xFFFFFFFFu << PAGE_LOG_SIZE)
|
||||
#define PAGE_LOW_MASK (0xFFFFFFFFu >> (32 - PAGE_LOG_SIZE))
|
||||
|
||||
#define CONSOLE_MEMORY 0xB8000
|
||||
|
||||
#define KERNEL_CODE (&_code)
|
||||
#define KERNEL_DATA (&_data)
|
||||
#define KERNEL_BSS (&_bss)
|
||||
#define KERNEL_END (&_end)
|
||||
|
||||
#define KERNEL_PHYSICAL_ADDRESS ((u32_t)(KERNEL_CODE - KERNEL_OFFSET))
|
||||
#define KERNEL_VIRTUAL_ADDRESS ((u32_t)KERNEL_CODE)
|
||||
#define KERNEL_SIZE ((u32_t)(KERNEL_END - KERNEL_CODE))
|
||||
|
||||
#define KERNEL_STACK_TOP 0x20000000
|
||||
|
||||
#define KERNEL_TIMER_FREQ 1000
|
||||
|
||||
#define BUILD_BUG_ON(condition) \
|
||||
do { \
|
||||
typedef struct { int negative_width_test : ((condition)?-1:1); } \
|
||||
BUILD_BUG_ON_DUMMY_STRUCT; \
|
||||
} \
|
||||
while(0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern u8_t _code;
|
||||
extern u8_t _data;
|
||||
extern u8_t _bss;
|
||||
extern u8_t _end;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HOS_DEFINES_H
|
||||
#define HOS_DEFINES_H
|
||||
|
||||
#include "hos_types.h"
|
||||
|
||||
#define KERNEL_OFFSET 0x00000000
|
||||
|
||||
#define PAGE_LOG_SIZE 12
|
||||
#define PAGE_SIZE (1 << PAGE_LOG_SIZE)
|
||||
#define PAGE_HIGH_MASK (0xFFFFFFFFu << PAGE_LOG_SIZE)
|
||||
#define PAGE_LOW_MASK (0xFFFFFFFFu >> (32 - PAGE_LOG_SIZE))
|
||||
|
||||
#define CONSOLE_MEMORY 0xB8000
|
||||
|
||||
#define KERNEL_CODE (&_code)
|
||||
#define KERNEL_DATA (&_data)
|
||||
#define KERNEL_BSS (&_bss)
|
||||
#define KERNEL_END (&_end)
|
||||
|
||||
#define KERNEL_PHYSICAL_ADDRESS ((u32_t)(KERNEL_CODE - KERNEL_OFFSET))
|
||||
#define KERNEL_VIRTUAL_ADDRESS ((u32_t)KERNEL_CODE)
|
||||
#define KERNEL_SIZE ((u32_t)(KERNEL_END - KERNEL_CODE))
|
||||
|
||||
#define KERNEL_STACK_TOP 0x20000000
|
||||
|
||||
#define KERNEL_TIMER_FREQ 1000
|
||||
|
||||
#define BUILD_BUG_ON(condition) \
|
||||
do { \
|
||||
typedef struct { int negative_width_test : ((condition)?-1:1); } \
|
||||
BUILD_BUG_ON_DUMMY_STRUCT; \
|
||||
} \
|
||||
while(0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern u8_t _code;
|
||||
extern u8_t _data;
|
||||
extern u8_t _bss;
|
||||
extern u8_t _end;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+55
-55
@@ -1,55 +1,55 @@
|
||||
|
||||
#ifndef HOS_TYPES_H
|
||||
#define HOS_TYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef unsigned char u8_t;
|
||||
typedef signed char s8_t;
|
||||
typedef unsigned short u16_t;
|
||||
typedef signed short s16_t;
|
||||
typedef unsigned int u32_t;
|
||||
typedef signed int s32_t;
|
||||
typedef unsigned long long u64_t;
|
||||
typedef signed long long s64_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u32_t gs;
|
||||
u32_t fs;
|
||||
u32_t es;
|
||||
u32_t ds;
|
||||
|
||||
u32_t edi;
|
||||
u32_t esi;
|
||||
u32_t ebp;
|
||||
u32_t esp_junk; /* the esp value saved by 'pusha' */
|
||||
u32_t ebx;
|
||||
u32_t edx;
|
||||
u32_t ecx;
|
||||
u32_t eax;
|
||||
|
||||
u32_t error; /* valid on exceptions 8, 10-14 */
|
||||
|
||||
u32_t eip;
|
||||
u32_t cs;
|
||||
u32_t eflags;
|
||||
u32_t esp; /* present if privilege transition */
|
||||
u32_t ss;
|
||||
} int_stack_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u16_t limit;
|
||||
u32_t base;
|
||||
} __attribute__ ((packed)) gdtr_t;
|
||||
|
||||
typedef gdtr_t idtr_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HOS_TYPES_H
|
||||
#define HOS_TYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef unsigned char u8_t;
|
||||
typedef signed char s8_t;
|
||||
typedef unsigned short u16_t;
|
||||
typedef signed short s16_t;
|
||||
typedef unsigned int u32_t;
|
||||
typedef signed int s32_t;
|
||||
typedef unsigned long long u64_t;
|
||||
typedef signed long long s64_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u32_t gs;
|
||||
u32_t fs;
|
||||
u32_t es;
|
||||
u32_t ds;
|
||||
|
||||
u32_t edi;
|
||||
u32_t esi;
|
||||
u32_t ebp;
|
||||
u32_t esp_junk; /* the esp value saved by 'pusha' */
|
||||
u32_t ebx;
|
||||
u32_t edx;
|
||||
u32_t ecx;
|
||||
u32_t eax;
|
||||
|
||||
u32_t error; /* valid on exceptions 8, 10-14 */
|
||||
|
||||
u32_t eip;
|
||||
u32_t cs;
|
||||
u32_t eflags;
|
||||
u32_t esp; /* present if privilege transition */
|
||||
u32_t ss;
|
||||
} int_stack_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u16_t limit;
|
||||
u32_t base;
|
||||
} __attribute__ ((packed)) gdtr_t;
|
||||
|
||||
typedef gdtr_t idtr_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+37
-37
@@ -1,37 +1,37 @@
|
||||
|
||||
#ifndef PORTIO_H
|
||||
#define PORTIO_H
|
||||
|
||||
#include "hos_types.h"
|
||||
|
||||
#define outportb(port, val) \
|
||||
__asm__ __volatile__ ("outb %%al, %%dx" : : "a" (val), "d" (port));
|
||||
|
||||
#define outportw(port, val) \
|
||||
__asm__ __volatile__ ("outw %%ax, %%dx" : : "a" (val), "d" (port));
|
||||
|
||||
#define outportd(port, val) \
|
||||
__asm__ __volatile__ ("outl %%eax, %%dx" : : "a" (val), "d" (port));
|
||||
|
||||
static inline u8_t inportb(u16_t port)
|
||||
{
|
||||
u8_t val;
|
||||
__asm__ __volatile__ ("inb %%dx, %%al" : "=a" (val) : "d" (port));
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline u16_t inportw(u16_t port)
|
||||
{
|
||||
u16_t val;
|
||||
__asm__ __volatile__ ("inw %%dx, %%al" : "=a" (val) : "d" (port));
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline u32_t inportd(u16_t port)
|
||||
{
|
||||
u32_t val;
|
||||
__asm__ __volatile__ ("inl %%dx, %%al" : "=a" (val) : "d" (port));
|
||||
return val;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef PORTIO_H
|
||||
#define PORTIO_H
|
||||
|
||||
#include "hos_types.h"
|
||||
|
||||
#define outportb(port, val) \
|
||||
__asm__ __volatile__ ("outb %%al, %%dx" : : "a" (val), "d" (port));
|
||||
|
||||
#define outportw(port, val) \
|
||||
__asm__ __volatile__ ("outw %%ax, %%dx" : : "a" (val), "d" (port));
|
||||
|
||||
#define outportd(port, val) \
|
||||
__asm__ __volatile__ ("outl %%eax, %%dx" : : "a" (val), "d" (port));
|
||||
|
||||
static inline u8_t inportb(u16_t port)
|
||||
{
|
||||
u8_t val;
|
||||
__asm__ __volatile__ ("inb %%dx, %%al" : "=a" (val) : "d" (port));
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline u16_t inportw(u16_t port)
|
||||
{
|
||||
u16_t val;
|
||||
__asm__ __volatile__ ("inw %%dx, %%al" : "=a" (val) : "d" (port));
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline u32_t inportd(u16_t port)
|
||||
{
|
||||
u32_t val;
|
||||
__asm__ __volatile__ ("inl %%dx, %%al" : "=a" (val) : "d" (port));
|
||||
return val;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user