From 5ec939293fa5cac42faaf1e643f6f8b2abadfb7f Mon Sep 17 00:00:00 2001 From: gatieme Date: Tue, 21 Mar 2017 23:44:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86print=5Fsegment,=20?= =?UTF-8?q?=E6=89=93=E5=8D=B0=5F=5FKERNEL=5FCS,=20=5F=5FKERNEL=5FDS,=20=5F?= =?UTF-8?q?=5FUSER=5FCS,=20=5F=5FUSER=5FDS...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- study/kernel/03-vmarea/01/hello.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/study/kernel/03-vmarea/01/hello.c b/study/kernel/03-vmarea/01/hello.c index a198e77..021fcd4 100644 --- a/study/kernel/03-vmarea/01/hello.c +++ b/study/kernel/03-vmarea/01/hello.c @@ -75,19 +75,20 @@ static void print_segment(void) /* - ----------------------------------------------------------------- - | | INDEX | T1| RPL | - ----------------------------------------------------------------- - __KERNEL_CS = 0x0010 = B 0 0 0 0 0 0 0 0 0 0 0 1 0 | 0 | 0 0 | - ----------------------------------------------------------------- - __KERNEL_DS = 0x0018 = B 0 0 0 0 0 0 0 0 0 0 0 1 0 | 1 | 0 0 | - ----------------------------------------------------------------- - __USER_DS = 0x0033 = B 0 0 0 0 0 0 0 0 0 0 1 1 0 | 0 | 1 1 | - ----------------------------------------------------------------- - __USER_DS = 0x0028 = B 0 0 0 0 0 0 0 0 0 0 1 0 0 | 1 | 0 0 | - ----------------------------------------------------------------- + --------------------------------------------------------------------------------------------- + | | INDEX | TI| RPL | + --------------------------------------------------------------------------------------------- + __KERNEL_CS = 0x0010 = B 0 0 0 0 0 0 0 0 0 0 0 1 0 | 0 | 0 0 | index = 2, TI = 0, RPL = 0 + --------------------------------------------------------------------------------------------- + __KERNEL_DS = 0x0018 = B 0 0 0 0 0 0 0 0 0 0 0 1 1 | 0 | 0 0 | index = 3, TI = 0, RPL = 0 + --------------------------------------------------------------------------------------------- + __USER_DS = 0x0033 = B 0 0 0 0 0 0 0 0 0 0 1 1 0 | 0 | 1 1 | index = 6, TI = 0, RPL = 3 + --------------------------------------------------------------------------------------------- + __USER_DS = 0x002B = B 0 0 0 0 0 0 0 0 0 0 1 0 1 | 0 | 1 1 | index = 5, TI = 0, RPL = 3 + --------------------------------------------------------------------------------------------- - LITTLE_ | 低字节 -=> 高字节 | + | LE little-endian | 低字节 -=> 高字节 | + --------------------------------------------------------------------------------------------- __KERNEL_CS = 0x0010 = | 00010000 00000000 | __KERNEL_DS = 0x0018 = | 00011000 00000000 | __USER_DS = 0x0033 = | 00110011 00000000 |