diff options
| author | Alexey Gavrilov <90127298+rebovas@users.noreply.github.com> | 2024-03-27 19:50:26 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-27 19:50:26 +0700 |
| commit | a276644952ed018e77ca64181059434a6bc4ee62 (patch) | |
| tree | e6a457ec4b2758c0c3bef78df475ad52d92a7ab4 /include | |
| parent | 91b4d8fa6bed598e2969f16a7a953e293a1b7f89 (diff) | |
| parent | e51dea0b6e34c2959b3b0f4a5db6b11d4b619960 (diff) | |
Merge pull request #5 from rebovas/acpi_madt
Acpi madt + some updates
Diffstat (limited to 'include')
| -rw-r--r-- | include/StringOperations.cpp | 6 | ||||
| -rw-r--r-- | include/StringOperations.h | 10 | ||||
| -rw-r--r-- | include/arch | 6 | ||||
| -rw-r--r-- | include/types.h | 17 |
4 files changed, 28 insertions, 11 deletions
diff --git a/include/StringOperations.cpp b/include/StringOperations.cpp index 01e7a76..055892e 100644 --- a/include/StringOperations.cpp +++ b/include/StringOperations.cpp @@ -6,7 +6,7 @@ MemArea::MemArea() start = final = NULL; }; -MemArea::MemArea(const memAddr start, const memAddr final) +MemArea::MemArea(const uintptr start, const uintptr final) { this->start = start; this->final = final; @@ -17,12 +17,12 @@ MemArea::MemArea(const memAddr start, const memAddr final) } }; -memAddr MemArea::begin() +uintptr MemArea::begin() { return start; } -memAddr MemArea::end() +uintptr MemArea::end() { if(start == final) return start; else return final + 1; diff --git a/include/StringOperations.h b/include/StringOperations.h index 81d7144..5d2826c 100644 --- a/include/StringOperations.h +++ b/include/StringOperations.h @@ -7,15 +7,15 @@ class MemArea { private: - memAddr start, final; + uintptr start, final; public: MemArea(); - MemArea(const memAddr start, const memAddr final); - memAddr begin(); - memAddr end(); + MemArea(const uintptr start, const uintptr final); + uintptr begin(); + uintptr end(); bool valid(); - typedef memAddr iterator; + typedef uintptr iterator; }; class StringOperations diff --git a/include/arch b/include/arch new file mode 100644 index 0000000..f5fc8f7 --- /dev/null +++ b/include/arch @@ -0,0 +1,6 @@ +#ifndef ARCH_H +#define ARCH_H + +#define __IAPC + +#endif diff --git a/include/types.h b/include/types.h index e578adb..f7c0eb6 100644 --- a/include/types.h +++ b/include/types.h @@ -1,13 +1,24 @@ -#define NULL 0 +#ifndef TYPES_H +#define TYPES_H + +#include <arch> +#define NULL 0 + +#if defined(__IAPC) typedef unsigned char uint8; typedef unsigned short int uint16; typedef unsigned long uint32; typedef unsigned long long uint64; #if defined(__x86_64) - typedef uint64 memAddr; + typedef uint64 uintptr; #else - typedef uint32 memAddr; + typedef uint32 uintptr; +#endif +#else + #error IA-PC only support +#endif + #endif |
