mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-03 10:24:57 +00:00
Descriptor tables are always at most 64kb.
This commit is contained in:
@@ -195,7 +195,7 @@ private:
|
||||
|
||||
template <typename DescriptorT, typename LinearMemoryT>
|
||||
//requires is_linear_memory<LinearMemoryT>
|
||||
DescriptorT descriptor_at(LinearMemoryT &memory, const DescriptorTablePointer table, const uint32_t offset) {
|
||||
DescriptorT descriptor_at(LinearMemoryT &memory, const DescriptorTablePointer table, const uint16_t offset) {
|
||||
if(offset > table.limit - 8) {
|
||||
printf("TODO: descriptor table overrun exception.\n");
|
||||
assert(false);
|
||||
|
@@ -652,7 +652,7 @@ void interrupt(
|
||||
if constexpr (ContextT::model >= Model::i80286) {
|
||||
if(context.registers.msw() & MachineStatus::ProtectedModeEnable) {
|
||||
const auto call_gate = descriptor_at<InstructionSet::x86::InterruptDescriptor>(
|
||||
context.linear_memory, table_pointer, uint32_t(exception.vector) << 3);
|
||||
context.linear_memory, table_pointer, uint16_t(exception.vector << 3));
|
||||
|
||||
if(!call_gate.present()) {
|
||||
printf("TODO: should throw for non-present IDT entry\n");
|
||||
|
Reference in New Issue
Block a user