summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/AMD64/HalHardwareInit.cpp
blob: 2a44f6965f95ac7c3358c829beb518d478965b72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 *	========================================================
 *
 *	HCore
 * 	Copyright Mahrouss Logic, all rights reserved.
 *
 * 	========================================================
 */

#include <ArchKit/ArchKit.hpp>

// bugs = 0

extern "C" HCore::VoidPtr __EXEC_IVT;

namespace HCore {
bool ke_init_hal() {
  HCore::HAL::Register64 kIdtRegister;

  kIdtRegister.Base = (UIntPtr)__EXEC_IVT;
  kIdtRegister.Limit = sizeof(HAL::Register64) * 256;

  HAL::IDTLoader idt;
  idt.Load(kIdtRegister);

  return true;
}
}  // namespace HCore