metalsvm/arch/x86/include/asm/stddef.h
stefan 45219bce2e - huge commit
- enable the paging support
- redesign of the APIC code

TODO:
- Currently, we are not able to start user-level applications.
- The RTL8139 driver does not longer work. Perhaps, a bug in the output function.
- The APIC codes doesn't work on all systems. Therefore, the code is currently disabled.



git-svn-id: http://svn.lfbs.rwth-aachen.de/svn/scc/trunk/MetalSVM@326 315a16e6-25f9-4109-90ae-ca3045a26c18
2010-12-10 06:16:58 +00:00

68 lines
1.9 KiB
C

/*
* Copyright 2010 Stefan Lankes, Chair for Operating Systems,
* RWTH Aachen University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of MetalSVM.
*/
#ifndef __ARCH_STDDEF_H__
#define __ARCH_STDDEF_H__
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned long size_t;
typedef long ptrdiff_t;
#ifdef __KERNEL__
typedef long ssize_t;
typedef long off_t;
#endif
typedef unsigned long long uint64_t;
typedef long long int64_t;
typedef unsigned int uint32_t;
typedef int int32_t;
typedef unsigned short uint16_t;
typedef short int16_t;
typedef unsigned char uint8_t;
typedef char int8_t;
typedef unsigned short wchar_t;
#ifndef _WINT_T
#define _WINT_T
typedef unsigned int wint_t;
#endif
/* This defines what the stack looks like after an ISR was running */
struct state {
/*
* We switched from software- to hardwaree-based multitasking
* Therefore, we do not longer save the registers by hand.
*/
/*unsigned int gs, fs, es, ds; */ /* pushed the segs last */
unsigned int edi, esi, ebp, esp, ebx, edx, ecx, eax; /* pushed by 'pusha' */
unsigned int int_no, err_code; /* our 'push byte #' and ecodes do this */
/*unsigned int eip, cs, eflags, useresp, ss;*/ /* pushed by the processor automatically */
};
uint32_t apic_cpu_id(void);
#define LOGICAL_CPUID apic_cpu_id()
#ifdef __cplusplus
}
#endif
#endif