ソースを参照

Merge commit '4a41e734'

fslongjin 2 年 前
コミット
81a508e4c7
2 ファイル変更9 行追加4 行削除
  1. 8 3
      kernel/link.lds
  2. 1 1
      kernel/process/process.c

+ 8 - 3
kernel/link.lds

@@ -20,24 +20,28 @@ SECTIONS
 	}
 	
 	. += KERNEL_VMA;
+	. = ALIGN(32768);
 	text_start_pa = .;
 	.text (text_start_pa): AT(text_start_pa - KERNEL_VMA)
 	{
 		_text = .;
 		
 		*(.text)
+		
 		_etext = .;
 	}
-	. = ALIGN(8);
+	. = ALIGN(32768);
 	data_start_pa = .;
 	.data (data_start_pa): AT(data_start_pa - KERNEL_VMA)
 	{
 		_data = .;
 		*(.data)
-
+		
 		_edata = .;
 	}
-	. = ALIGN(4096);
+
+	. = ALIGN(32768);
+
 	rodata_start_pa = .;
 	.rodata (rodata_start_pa): AT(rodata_start_pa - KERNEL_VMA)
 	{
@@ -52,6 +56,7 @@ SECTIONS
 	.data.init_proc_union (init_proc_union_start_pa): AT(init_proc_union_start_pa - KERNEL_VMA)
 	 { *(.data.init_proc_union) }
 
+	. = ALIGN(32768);
 	 bss_start_pa = .;
 	.bss (bss_start_pa): AT(bss_start_pa - KERNEL_VMA)
 	{

+ 1 - 1
kernel/process/process.c

@@ -52,7 +52,7 @@ void __switch_to(struct process_control_block *prev, struct process_control_bloc
     __asm__ __volatile__("movq	%0,	%%fs \n\t" ::"a"(next->thread->fs));
     __asm__ __volatile__("movq	%0,	%%gs \n\t" ::"a"(next->thread->gs));
     // wrmsr(0x175, next->thread->rbp);
-   
+
 }
 
 /**