X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fthreads%2Finit.c;h=8a2c4919008291e1f049c9694989991e235d7c9a;hp=da1a98c69da9bcd70374255b98bf591d106b1051;hb=4122c693f95bf1acd0ed0037da694b8c498c9f7e;hpb=987024569c1e5e9468238849dd79ec8d386352e6 diff --git a/src/threads/init.c b/src/threads/init.c index da1a98c..8a2c491 100644 --- a/src/threads/init.c +++ b/src/threads/init.c @@ -94,13 +94,13 @@ make_seg_desc (uint32_t base, uint32_t e0 = ((limit & 0xffff) /* Limit 15:0. */ | (base << 16)); /* Base 15:0. */ uint32_t e1 = (((base >> 16) & 0xff) /* Base 23:16. */ - | ( system << 12) /* 0=system, 1=code/data. */ - | ( type << 8) /* Segment type. */ + | (system << 12) /* 0=system, 1=code/data. */ + | (type << 8) /* Segment type. */ | (dpl << 13) /* Descriptor privilege. */ | (1 << 15) /* Present. */ | (limit & 0xf0000) /* Limit 16:19. */ | (1 << 22) /* 32-bit segment. */ - | ( granularity << 23) /* Byte/page granularity. */ + | (granularity << 23) /* Byte/page granularity. */ | (base & 0xff000000)); /* Base 31:24. */ return e0 | ((uint64_t) e1 << 32); }