Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Andy Valencia Newsgroups: comp.lang.c,alt.os.development Subject: Re: [OSDev] How to switch to long mode in x86 CPUs? Date: Sat, 01 Mar 2025 20:02:57 -0800 Organization: A noiseless patient Spider Lines: 22 Message-ID: <174088817787.9328.7228067901904056569@media.vsta.org> References: <871pvje5yq.fsf@onesoftnet.eu.org> Injection-Date: Sun, 02 Mar 2025 05:05:09 +0100 (CET) Injection-Info: dont-email.me; posting-host="97433e568f395b750cdb5ac83fc3d692"; logging-data="677087"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ExdOf5GaAyYOlnRJfzu8s" User-Agent: rn.py v0.0.1 Cancel-Lock: sha1:MP2Cj5xevLt62h8u+zI39GDMGKU= Bytes: 1796 cross@spitfire.i.gajendra.net (Dan Cross) writes: > >I am trying to develop my own, simple operating system to learn more > >about how kernels work and low level stuff like that. However, I am > >stuck at setting up paging while switching long mode (64-bit protected > >mode) in x86 processors. Two things in addition to the fellow who cross-posted this and gave you some great analysis. 1. If you use bochs, you can single step the emulator itself, and basically have a microcode view of what the processor's trying to do with your code. This can save you _tons_ of time. 2. You should crib from working code. For 32-bit x86, may I humbly point at my protected mode microkernel, VSTa: https://sources.vsta.org:7100/vsta/index Andy Valencia Home page: https://www.vsta.org/andy/ To contact me: https://www.vsta.org/contact/andy.html Fediverse: @vandys@goto.vsta.org