MOS Source Code
Loading...
Searching...
No Matches
x86_platform.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#pragma once
4
6
7#include <mos/type_utils.hpp>
8
9#define X86_BIOS_MEMREGION_PADDR 0xf0000
10#define BIOS_MEMREGION_SIZE 0x10000
11
12#define X86_EBDA_MEMREGION_PADDR 0x80000
13#define EBDA_MEMREGION_SIZE 0x20000
14
15#define X86_VIDEO_DEVICE_PADDR 0xb8000
16
17#define MOS_SYSCALL_INTR 0x88
18
19struct platform_regs_t : mos::NamedType<"Platform.Registers">
20{
22 {
23 memzero(this, sizeof(*this));
24 }
25
27 {
28 *this = *regs;
29 }
30
32 reg_t di, si, bp, dx, cx, bx, ax;
34 // iret params
38} __packed;
39
40MOS_STATIC_ASSERT(sizeof(platform_regs_t) == 176, "platform_regs_t has incorrect size");
41
43void x86_dump_stack_at(ptr_t this_frame, bool can_access_vmaps);
44
#define __packed
Definition mos_global.h:29
#define MOS_STATIC_ASSERT
Definition mos_global.h:14
#define memzero(ptr, size)
platform_regs_t(const platform_regs_t *regs)
uintn reg_t
Definition types.h:47
unsigned long ptr_t
Definition types.h:21
mos_platform_info_t x86_platform
void x86_setup_lapic_timer()
void x86_dump_stack_at(ptr_t this_frame, bool can_access_vmaps)