Skip to content

Commit

Permalink
qemu: MMU: Memory regions for qemu_x86
Browse files Browse the repository at this point in the history
Define the memory regions needed to generate boot time page
tables.

JIRA:ZEP-2098

Signed-off-by: Adithya Baglody <[email protected]>
  • Loading branch information
AdithyaBaglody authored and Anas Nashif committed Jun 13, 2017
1 parent 83644a4 commit 576c1eb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions arch/x86/soc/ia32/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,22 @@
#include <uart.h>
#include <device.h>
#include <init.h>
#include <mmustructs.h>

#ifdef CONFIG_X86_MMU

#ifdef CONFIG_XIP
MMU_BOOT_REGION(CONFIG_PHYS_LOAD_ADDR, CONFIG_ROM_SIZE*1024, MMU_ENTRY_READ);

MMU_BOOT_REGION(CONFIG_PHYS_RAM_ADDR, CONFIG_RAM_SIZE*1024, MMU_ENTRY_WRITE);
#else
MMU_BOOT_REGION(CONFIG_PHYS_LOAD_ADDR, CONFIG_RAM_SIZE*1024, MMU_ENTRY_WRITE);
#endif /*CONFIG_XIP */

MMU_BOOT_REGION(CONFIG_LOAPIC_BASE_ADDRESS, 4*1024, MMU_ENTRY_WRITE);
MMU_BOOT_REGION(CONFIG_IOAPIC_BASE_ADDRESS, 1024*1024, MMU_ENTRY_WRITE);

/*HPET */
MMU_BOOT_REGION(CONFIG_HPET_TIMER_BASE_ADDRESS, 4*1024, MMU_ENTRY_WRITE);

#endif /* CONFIG_X86_MMU*/

0 comments on commit 576c1eb

Please sign in to comment.