switching to new pagemap causes 0xe and more exceptions

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
RayanMargham
Member
Member
Posts: 43
Joined: Tue Jul 05, 2022 12:37 pm

Re: switching to new pagemap causes 0xe and more exceptions

Post by RayanMargham »

i dont have time either :nooo:
RayanMargham
Member
Member
Posts: 43
Joined: Tue Jul 05, 2022 12:37 pm

Re: switching to new pagemap causes 0xe and more exceptions

Post by RayanMargham »

says the same thing for 0x0

Unhandled interrupt/exception number 0x0
RayanMargham
Member
Member
Posts: 43
Joined: Tue Jul 05, 2022 12:37 pm

Re: switching to new pagemap causes 0xe and more exceptions

Post by RayanMargham »

not even a switch case statement fixed it..

Code: Select all

void init_idt() {
  for (int i = 0; i < 256; i++) {
    // Register a default handler
    switch (i) {
    case 0xe:
      RegisterHandler(0xe, page_fault_handler);
      break;
    case 0x0:
      RegisterHandler(0, division_by_zero);
      break;
    default:
      RegisterHandler(i, default_handler);
      break;
    }

    // Setup an IDT entry for all the interrupt stubs
    kernel_interrupt_gate(i, stubs[i]);
  };

  idr.offset = (uint64_t)&IDT;
  idr.size = sizeof(IDT) - 1;

  idt_flush(&idr);
}
MichaelPetch
Member
Member
Posts: 792
Joined: Fri Aug 26, 2016 1:41 pm
Libera.chat IRC: mpetch

Re: switching to new pagemap causes 0xe and more exceptions

Post by MichaelPetch »

I made a pull request with the a fix to this bug. It was actually a small bug in the isr_stub handler themselves where the index into the idt_handlers table wasn't initialized properly so it would run the incorrect handlers.
RayanMargham
Member
Member
Posts: 43
Joined: Tue Jul 05, 2022 12:37 pm

Re: switching to new pagemap causes 0xe and more exceptions

Post by RayanMargham »

gotcha, accepting pr now
RayanMargham
Member
Member
Posts: 43
Joined: Tue Jul 05, 2022 12:37 pm

Re: switching to new pagemap causes 0xe and more exceptions

Post by RayanMargham »

you able to check out ksan now? i still cannot figure it out
RayanMargham
Member
Member
Posts: 43
Joined: Tue Jul 05, 2022 12:37 pm

Re: switching to new pagemap causes 0xe and more exceptions

Post by RayanMargham »

yea and im having smp issues too????
0xe ???
error code = 0x10
RayanMargham
Member
Member
Posts: 43
Joined: Tue Jul 05, 2022 12:37 pm

Re: switching to new pagemap causes 0xe and more exceptions

Post by RayanMargham »

i fixed the smp issue cause i was returning i still cannot figure out ksan tho
Post Reply