changeset 14:9ec644ff17fd

add define Make.defaults
author taira
date Thu, 08 Aug 2013 05:17:15 -0400
parents 212d1e8ff02b
children
files Make.defaults x86_64/ready_kernel.c x86_64/sysdeps.h
diffstat 3 files changed, 26 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Make.defaults	Thu Jul 25 02:43:29 2013 -0400
+++ b/Make.defaults	Thu Aug 08 05:17:15 2013 -0400
@@ -30,6 +30,13 @@
 CONFIG_localfs=y
 CONFIG_netfs=n
 
+
+#
+# In advance of execution enable virtual address map.
+#
+
+CONFIG_virtual_address_map=y
+
 #
 # WARNING WARNING WARNING
 #
@@ -75,6 +82,18 @@
 LDFLAGS	   = -nostdlib -znocombreloc
 INSTALL	   = install
 
+##
+# In advance of execution enable virtual address map.
+#
+
+ifeq ($(CONFIG_virtual_address_map),y)
+CFLAGS += -DENABLE_VIRTUAL_ADDRESS_MAP
+endif
+
+ifeq ($(CONFIG_machspec_netconfig),y)
+CFLAGS += -DENABLE_MACHINE_SPECIFIC_NETCONFIG
+endif
+
 ifeq ($(CONFIG_machspec_netconfig),y)
 CFLAGS += -DENABLE_MACHINE_SPECIFIC_NETCONFIG
 endif
--- a/x86_64/ready_kernel.c	Thu Jul 25 02:43:29 2013 -0400
+++ b/x86_64/ready_kernel.c	Thu Aug 08 05:17:15 2013 -0400
@@ -220,6 +220,11 @@
 VOID 
 init_pgtable_register()
 {
+    mmap_desc_t *desc;
+    uefi_call_wrapper(RT->SetVirtualAddressMap, 4, &desc->map_size, &desc->desc_size, 
+        &desc->desc_version, &desc->md);
+    return;
+
     UINTN eax = 0, ebx = 0, ecx = 0, edx = 0;
     eax = 0x80000008;
     //cpuid(&eax, &ebx, &ecx, &edx);    
--- a/x86_64/sysdeps.h	Thu Jul 25 02:43:29 2013 -0400
+++ b/x86_64/sysdeps.h	Thu Aug 08 05:17:15 2013 -0400
@@ -393,15 +393,11 @@
 	 */
 	asm volatile ( "cli" : : );
 
-    /*
-     * TEST source.
-     */
+#ifdef ENABLE_VIRTUAL_ADDRESS_MAP
 
     init_pgtable_register();
     
-    /*
-     * TEST source end.
-     */
+#endif /* ENABLE_VIRTUAL_MEMORY_MAP */ 
 
 	/*
 	 * Relocate kernel (if needed).