Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.development    |    Operating system development chatter    |    4,255 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,559 of 4,255    |
|    James Harris to All    |
|    Re: paging makes OS to reboot infinitely    |
|    07 Dec 22 14:09:51    |
      From: james.harris.1@gmail.com              On 06/12/2022 17:00, אורי ויסבלום wrote:              > First of all, thank you all for replying, I really appreciate it.       >       > James:       >> If in 32-bit mode do you have a page directory and the requisite initial       > page tables set up (or the equivalent) and do they identity-map the code       > location you are running at? Are they all marked Present and are all       > their other bits correct?       >       > Yes, I mean no instructions are happening after I set CR0. Didn't know it       needs to JMP to a new line of code after it, I thought the jump at the end of       the scope of the function is enough, but it makes a lot of sense I should       identity-map the kernel's        code into virtual mode. But I reckon it's not my only problem there.              Over the years Intel have said that after enabling paging (with MOV CR0)       some of their processors require a JMP, others require identity paging       and still others require both. It's more portable to use identity       mapping and a jump of some sort such as               mov cr0, eax        jmp .next        .next:              Your RET /might be/ good enough as the "jump" or it might not. I don't       know. It's safest just to include a JMP so as to be sure your code meets       Intel specs. (I cannot comment on AMD chips but they would likely have       the same requirements as Intel.)                     --       James Harris              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca