[SCM] applications.git branch, master, updated. 378c398fdbe156b591b6a94ae4a4228bb77e35a9

ontologiae ontologiae at gmail.com
Sun Dec 5 15:28:21 UTC 2010


The following commit has been merged in the master branch:
commit 378c398fdbe156b591b6a94ae4a4228bb77e35a9
Author: ontologiae <ontologiae at gmail.com>
Date:   Sun Dec 5 16:27:07 2010 +0100

    First try to set GDT from Lisaac code...

diff --git a/isaacos/startup.li b/isaacos/startup.li
index 90493f8..e1cd6b8 100755
--- a/isaacos/startup.li
+++ b/isaacos/startup.li
@@ -58,11 +58,46 @@ Section Public
 
   - main <-
   ( + dir:DIRECTORY;   
-        
+    
+    "Activation GDT\n".print;
+    GDT.add 0h limit 0 type 0;  
+    GDT.add 0h limit FFFFFh type 09Bh; 
+    GDT.add 0h limit FFFFFh type 093h; 
+    GDT.add 0h limit 0 type 097h; 
+    GDT.add 0h limit FFFFFh type 0FFh; 
+    GDT.add 0h limit FFFFFh type 0F3h; 
+    GDT.add 0h limit 0 type 0F7h; 
+
+    GDT.active_gdt;
     "System initialization..\n".print;
+
     SYSTEM.make;
     "Opening FileSystem...\n".print;
+    /*
+   mov eax,0
+          mov ebx,0FFFFFh    ; desc 08h : CODE segment.
+          mov cx,0809Bh      ; Code 16 bits (Flat mode).  
+          call desc
+        
+          ; *** DATA 16 Bits ***
+          mov eax,0
+          mov ebx,0FFFFFh     ; desc 10h : DATA 16Bits segment.
+          mov cx,08093h      ; Data Fixe (Flat mode)
+          call Desc
+
+          ; *** CODE 32 Bits ***
+          mov eax,0
+          mov ebx,0FFFFFh    ; desc 18h : CODE segment.
+          mov cx,0C09Bh      ; Code 32 bits.  
+          call desc
+        
+          ; *** DATA 32 Bits ***
+          mov eax,0
+          mov ebx,0FFFFFh     ; desc 20h : DATA segment.
+          mov cx,0C093h        ; Data Fixe
+          call Desc
     
+    */
     
   //  SCHEDULER.make;
 
diff --git a/isaacos/x86/system/desc_seg.li b/isaacos/x86/system/desc_seg.li
index 1b18d1c..f3cc066 100755
--- a/isaacos/x86/system/desc_seg.li
+++ b/isaacos/x86/system/desc_seg.li
@@ -29,12 +29,12 @@ Section Inherit
   
 Section Mapping
   
-  + limit_0_15:UINTEGER_16;
-  + address_0_15:UINTEGER_16;
-  + address_16_23:UINTEGER_8;
-  + p_dpl_dt_type:UINTEGER_8;
-  + g_d_0_avl_limt_16_19:UINTEGER_8;
-  + address_24_31:UINTEGER_8;
+  + limit_0_15:UINTEGER_16;// lim0_15;
+  + address_0_15:UINTEGER_16;//	base0_15;
+  + address_16_23:UINTEGER_8;// base16_23
+  + p_dpl_dt_type:UINTEGER_8;// acces 
+  + g_d_0_avl_limt_16_19:UINTEGER_8;// lim16_19 + other
+  + address_24_31:UINTEGER_8;//base24_31
   
 Section GDT  
   
@@ -97,7 +97,7 @@ Section Public
   // Creation. 
   //
   
-  - create addr:UINTEGER_32limit lim:UINTEGER_32type t:UINTEGER_16 <-
+  - create addr:UINTEGER_32 limit lim:UINTEGER_32 type t:UINTEGER_16 <-
   ( ? {valid_desc t};
     
     (lim>0FFFFFh).if {
diff --git a/isaacos/x86/system/gdt.li b/isaacos/x86/system/gdt.li
index 6c543f2..a868ebb 100755
--- a/isaacos/x86/system/gdt.li
+++ b/isaacos/x86/system/gdt.li
@@ -25,7 +25,7 @@ Section Header
     
 Section Private
   
-  - table:MAP_NATIVE_ARRAY(DESC_SEG) := MAP_NATIVE_ARRAY(DESC_SEG).force_conversion 2000h;
+  - table:NATIVE_ARRAY_VOLATILE(DESC_SEG) := CONVERT(NATIVE_ARRAY_VOLATILE(DESC_SEG),POINTER).on 2000h;
     
   - new_descriptor:UINTEGER_16 <-
   ( + free_desc:UINTEGER_16;
@@ -65,7 +65,7 @@ Section Public
     table.item 0.set_link idx;
   );
 
-  - add addr:UINTEGER_32limit lim:UINTEGER_32type t:UINTEGER_16 :UINTEGER_16 <-
+  - add addr:UINTEGER_32 limit lim:UINTEGER_32 type t:UINTEGER_16 :UINTEGER_16 <-
   ( + desc:DESC_SEG;
     + result:UINTEGER_16;
     
@@ -77,4 +77,17 @@ Section Public
   );
 
 
+  - report_gdt <-
+  (
+    // On itère sur la table, et on décrit le desc_seg
+  );
+
+
+   - active_gdt <-
+   ( + local_table : NATIVE_ARRAY(DESC_SEG);
+     local_table := table;
+     asm("lgdtl (@local_table)");
+   );
+
+
 

-- 
applications.git



More information about the Lisaac-commits mailing list