I'm doing operating system lab on QEMU. I found that read/write is allowed when accessing physical address after paging which is larger than RAM. Is it the same condition on a real x86 machine? Will x32 or x64 cause different results?
Can x86 cpu read or write on physical address which is larger than RAM?
372 Views Asked by cyyzero At
1
There are 1 best solutions below
Related Questions in MEMORY
- 9 Digit Addresses in Hexadecimal System in MacOS
- Memory location changing from 0 to 1 consistently on Mac
- Would event listeners prevent garbage collecting objects referenced in outer function scopes?
- tensorrt inference problem: CPU memory leak
- How to estimate the memory size of a binary voxelized geometry?
- Java Memory UTF-16 Vs UTF-8
- Spring Boot application container memory footprint (Java 21)
- Low memory Windows CE
- How to throw an error when a program acesses a block of memory created by you that has been deallocated by a call of free?
- Golang bufio.Scanner: token too long
- Get the address and size of a loaded shared object on memory from C
- In Redis Databases how do we need to calculate the table size
- ClickHouse Materialized View consuming a lot of Memory and CPU
- How to reduce memory usage for large matrix calculations?
- How to use memray with Gunicorn or flask dev server?
Related Questions in X86
- How to call a C language function from x86 assembly code?
- the difference between two style of inline ASM
- Understanding the differences between mov and lea instructions in x86 assembly
- ARM Assembly code is not executing in Vitis IDE
- x86 - compare numbers and push the result onto the stack
- Seeking for the the method for adding the DL (data register) value to DX register
- link.exe unresolved external symbol _mainCRTStartup
- x86 Wrote a boot loader that prints a message to the screen but the characters are completely different to what I expected
- How does CPU tell between MMIO(Memory Mapped IO) and normal memory access in x86 architecture
- Why do register arg values need to be re-assigned in NASM after an int 0x80 system call?
- Why does LLVM-MCA measure an execution stall?
- Why does shr eax, 32 not do anything?
- Evaluating this in Assembly (A % B) % (C % D)
- Understanding throughput of simd sum implementation x86
- Making portable execution errors
Related Questions in RAM
- Windows 64-bit: Do overlapped MMF windows mean more RAM consumption (doubling the RAM where the file views overlap)?
- Read/write data to DS1642
- Failed to use memory bits in fpga
- Is it better to pass a C++ object by reference than by value if it is in RAM?
- Stm32 Problem with reading from Flash memory (incorrect data)
- MariaDB not releasing RAM after jobs finish
- How to secure a Python project on Windows from domain administrators?
- Memory consumption of Parent & child process in Linux
- Simulation contradiction using the same Vivado block ram IP
- RAM crash executing procedure in Spyder
- Will the 16n prefetch in DDR5 affect the bandwidth of small-granularity memory accesses?
- How do I view individual memory blocks on my PC?
- pidstat output to file, once
- Get memory usage of this process C++ Win32
- how do I determine how much RAM a jupyter notebook has allocated and is using?
Related Questions in ADDRESS-SPACE
- Are executable files virtual addresses shown by disassemblers definitive?
- Understanding QEMU usermode emulation memory map
- Why do class D and E IP-addresses have no subnet mask?
- Is PCI "CF8h/CFCh" IO port addresses only applicable to processors with an IO address space?
- Question about memory space in microprocessor
- Can x86 cpu read or write on physical address which is larger than RAM?
- What is the purpose of two address spaces in x86?
- How to acquire virtual address space and separately provision memory on Win64, MacOS and Linux?
- Generating the instances of OPC UA objects automatically (Produce an XML for the addressSpace of the OPC UA Server) via JAVA
- Confusing, what is this inside the channel in Go Routines
- LLVM global constructor is not called for ATmel processors
- Does what define a cpu's address space?
- Why is the heap section present when there are no malloc used
- Differentiate .BSS from Heap Accesses
- Is there a way to force a process to share address space from another process?
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 # Hahtags
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?
The physical address space contains RAM, ROM, memory mapped devices (some PCI and some built into the chipset) and unused space.
An OS can access all of it, including unused space (even though there's no sane reason to deliberately access unused space).
The total amount of physical address space depends on the CPU, and is a "size in bits" (which you can obtain from the
CPUIDinstruction) that ranges from 32 bits to 52 bits, but is often in the 36 to 48 bits range. If you try to use paging to access a "too high, not supported by the CPU" physical address you will get a General Protection Exception (because the "not supported by CPU physical address bits" are treated as reserved and the CPU checks if reserved bits are set in page table entries, etc).Note that when writing an OS (for modern CPUs) it's easier to assume that physical addresses are 64 bits (regardless of what the CPU supports) and that the physical address space includes a reserved area that can't be accessed (where the size of the reserved area depends on what the CPU supports); as this simplifies code and data structures used for physical memory management (e.g. C has a
uint64_ttype but nothing has auint52_t).Yes; both Qemu and real hardware work the same.
The CPU supports several types of paging structures - "plain 32-bit paging", PSE36, PAE (Physical Address Extensions), and long mode. For x32 you can't use long mode paging, but PAE normally has the same layout and the same physical address restrictions (the only case where it doesn't is some Xeon Phi accelerator cards).
If x32 is using "plain 32-bit paging" physical addresses will be restricted to 32 bits; and if it's using PSE36 physical addresses will be restricted to 36 bits.
The other possibility is that x32 isn't using any paging at all. In this case addresses are masked so that only 32 bits can be used (e.g. if you create a segment with a base address of 0xFFFFF000 and "high enough" limit; then use an offset within the segment that's 0x00001000 or more, the result will be masked causing physical addresses to wrap around; like
(0xFFFFF000 + 0x00001234) & 0xFFFFFFFF = 0x00000234).Apart from that, it still works the same (you can still accessed unused parts of the physical address space, there's just less of it, and you might not be able to access all RAM).