OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:25 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Another quick question about iretd
PostPosted: Fri Oct 02, 2020 10:39 pm 
Offline
Member
Member

Joined: Tue Jul 14, 2020 4:01 am
Posts: 70
What is the
Code:
pop
order of iretd?


Top
 Profile  
 
 Post subject: Re: Another quick question about iretd
PostPosted: Fri Oct 02, 2020 10:44 pm 
Offline
Member
Member

Joined: Mon Feb 02, 2015 7:11 pm
Posts: 898
ia32:
Code:
struct InterruptContext
{
    ...
    // iret frame
    uint32_t eip;
    uint32_t cs;
    uint32_t eflags;
    // These are only saved/restored when crossing privilege levels
    uint32_t esp;
    uint32_t ss;
};

x86_64:
Code:
struct InterruptContext
{
    ...
    // iret frame
    uint64_t rip;
    uint64_t cs;
    uint64_t rflags;
    // These are always valid (different behaviour than 32 bits mode)
    uint64_t rsp;
    uint64_t ss;
};

_________________
https://github.com/kiznit/rainbow-os


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 40 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group