changeset 6:3b3650b792e3

add make clean
author taiki
date Wed, 26 Mar 2014 08:51:13 +0900
parents 6015cafa617e
children 7047eac9c44e
files .hgignore Makefile bootx64.c
diffstat 3 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Wed Mar 26 08:51:13 2014 +0900
@@ -0,0 +1,8 @@
+syntax: glob
+
+*.o
+*.so
+*.efi
+*.swp
+disk
+ovmf
--- a/Makefile	Wed Mar 26 06:59:58 2014 +0900
+++ b/Makefile	Wed Mar 26 08:51:13 2014 +0900
@@ -41,3 +41,6 @@
 
 clean:
 	rm -f $(TARGET) $(OBJS)
+	umount /mnt/nbd
+	qemu-nbd -d /dev/nbd0
+	rmmod nbd
--- a/bootx64.c	Wed Mar 26 06:59:58 2014 +0900
+++ b/bootx64.c	Wed Mar 26 08:51:13 2014 +0900
@@ -8,12 +8,13 @@
 {
     InitializeLib(image, systab);
 
-    Print(L"test start.\n");
+    Print(L"Test start.\n");
 
     UINTN map_size, cookie, size, version;
     map_size = EFI_PAGE_SIZE * 2;
     EFI_MEMORY_DESCRIPTOR *md;
 
+    Print(L"AlocatePool\n");
     EFI_STATUS status = uefi_call_wrapper(BS->AllocatePool, 3, EfiLoaderData, map_size, &md);
 
     if (EFI_ERROR(status)) {
@@ -26,20 +27,12 @@
     }
 
 
+    Print(L"Exit Boot Services\n");
     status = uefi_call_wrapper(BS->ExitBootServices, 2, image, cookie);
 
     if (EFI_ERROR(status)) {
         Print(L"error 'exit boot services' %r \n", status);
     }
 
-    asm volatile ("cli" ::);
-
-    cr0_t cr0;
-    asm volatile("mov %%cr0,%0\n\t" : "=r" (cr0));
-    while(1) { }
-    cr0.pg = 0;
-    asm volatile("mov %0, %%cr0" : : "r" (cr0));
-
-
     return EFI_SUCCESS;
 }