1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#pragma once
4
5#include "mos/platform/platform.h"
6
7#define X86_BIOS_MEMREGION_PADDR 0xf0000
8#define BIOS_MEMREGION_SIZE 0x10000
9
10#define X86_EBDA_MEMREGION_PADDR 0x80000
11#define EBDA_MEMREGION_SIZE 0x20000
12
13#define X86_VIDEO_DEVICE_PADDR 0xb8000
14
15#define MOS_SYSCALL_INTR 0x88
16
17typedef struct _platform_regs
18{
19 reg_t r15, r14, r13, r12, r11, r10, r9, r8;
20 reg_t di, si, bp, dx, cx, bx, ax;
21 reg_t interrupt_number, error_code;
22 // iret params
23 reg_t ip, cs;
24 reg_t eflags;
25 reg_t sp, ss;
26} __packed platform_regs_t;
27
28MOS_STATIC_ASSERT(sizeof(platform_regs_t) == 176, "platform_regs_t has incorrect size");
29
30extern mos_platform_info_t x86_platform;
31void x86_dump_stack_at(ptr_t this_frame, bool can_access_vmaps);
32
33void x86_setup_lapic_timer();
34