Once I initialize and load my GDT into the GDTR using lgdt, how can I update the GDT later?
Am I correct if I use the sgdt command to get the base address and then update or add entries followed by reloading it again with the lgdt? Is there some other way to do it?
Or am I missing something and the GDT is never "meant" to be updated once initialized and loaded?
How to update GDT entries after initial loading?
585 Views Asked by darkknight97 At
1
There are 1 best solutions below
Related Questions in X86
- Why do we need AX instead of MOV DS, data directly with a segment?
- Drawing circles of increasing radius
- Assembly print on screen using pop ecx
- How to add values from vector to each other
- Intel x64 instructions CMPSB/CMPSW/CMPSD/CMPSQ
- Compact implementation of logical AND in x86 assembly
- Can feenableexcept hurt a program performance?
- How do I display the result and remainder in ax and dx in Assembly (tasm)
- ASM : Trouble using int21h on real machine
- jmp instruction *%eax
- What steps are needed to load a second stage bootloader by name on a FAT32 file system in x86 Assembly?
- Assembly code to print a new line string
- Write System Call Argument Registers
- How to jump to an address saved in a register in intel assembly?
- Find middle value of a list
Related Questions in OPERATING-SYSTEM
- Why two threads accessing one resource crashes one thread?
- How to tell the difference between linux and mac
- Can a single thread be shared among multiple processes ? If yes how?
- /usr/lib/* files had been deleted, how to restore these files
- What does a POSIX interface refer to in terms of microkernels?
- Is zero copy principle supported in Mac
- Why segment files into chunks for HTTP streaming?
- Add/remove process from kernel runqueue
- How does my computer know to which character a char corresponds?
- Who starts the OS process scheduler?
- ^M behind operating system version?
- How to make a scanf() type function in a 32bit os in c?
- How is `dup2` actually working?
- Logged in hostname/IP in linux command history
- Had 16-bit DOS a memory access limitation of 1 MB? If yes, how?
Related Questions in OSDEV
- Rustc/LLVM generates faulty code for aarch64 with opt-level=0
- MinGW's ld cannot perform PE operations on non PE output file
- GCC 5.1.0-4 cross compiler build fail
- Link object files from header files in real mode when using GCC -m16 option?
- Constant reboot after setting up the Global Descriptor Table and protected mode
- Can't load flat binary file into kernel
- Linear addressing and the GDT
- How do you find the PCI memory hole on x86?
- Extended ASCII characters are printed in yellow instead of white - OSDev
- The Kernel starts behaving abnormally when the kernel code gets a little bigger
- LD errors while linking 16-bit real mode code into a Multiboot compliant ELF executable
- How can I provide a reliable callback functionality?
- Can HDD emulation be used to allow me to use my own bootable file system on a CD?
- Is it bad that a process should self create an own stack?
- OS development - converting logical block format to Cylinder-Head-Sector
Related Questions in I386
- 32 bit libraries not detected by locate command
- C++ unable to assign objects passed as pointer in methods to variable
- Undefined symbols for architecture i386/armv7 [cocoapods]
- Cordova + XCTest results in 'Undefined symbols for architecture i386'
- Ignoring file "path", missing required architecture i386/armv7 in file "path"
- Django 3.1|Python 3.6.12: Custom Template Tags not showing up all the sudden?
- AssImp library problems on CDT eclipse OS X 10.6.8 : unsupported file format for architecture i386
- How to install the i386 version of R on ubuntu?
- PolarSSL's asm code execute different result in iPad4 and simulator
- How to run i386 binary on MIPS platform?
- Issue with "Undefined symbols for architecture i386"
- nasm and gcc: 32 bit linking failed (64 bit Mac OS X)
- NASM jmp wonkiness
- no product after "build success" of a cocoa touch static library project
- Boost XCode i386
Related Questions in GDT
- Constant reboot after setting up the Global Descriptor Table and protected mode
- Linear addressing and the GDT
- What happens if a process calls out to code belonging to another process?
- How can I initialise the GDT?
- I failed in switching the cpu from real-mode to protected-mode
- Why loading GDT in the following way works
- Boot sector stuck in "Booting from hard disk" loop in Qemu after switching to 32bit protected mode
- custom OS chrashes while loading GDT
- Rust gnu-asm, far jump in real mode
- Implementing User Mode and Kernel Mode Switching in 64 bit UEFI OS
- Why in xv6 there's sizeof(gdt)-1 in gdtdesc
- GDT segment reload failed
- If LDT does not exist in 64-bit architecture how are 32-bit systems that use it emulated on a 64-bit architecture?
- How to update GDT entries after initial loading?
- What does the "D" stand for in 386's "D bit"?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I understand that this question is old however I want to highlight some things that the comments didn't mention, that is what the CPU caches and what does not.
cs,ds,es,fs,gs,ss,ldtr,tr) get assigned with segment selectors which specify a segment descriptors. A segment selector is always 16 bits and consists of:gdtrdoes nothing more than loading a value togdtr(which consist of the GDT's base address and its size)mov es, ax, withaxhaving the value 0x0010 for example:gdtrmay point to a different location, even an invalid one, and may have any size, again, even an invalid one - the CPU does not care.mov ax, es. (axbecomes 0x0010, even thought that GDT segment descriptor may contain anything or may not even exist at the present time)Source: Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 3: System Programming Guide CHAPTER 3: PROTECTED-MODE MEMORY MANAGEMENT
I suggest you to also take a look at wiki.osdev.org, specifically:
Please ask for any clarifications