tailieunhanh - the giant black book of computer viruses phần 7

có hai mức độ của các bản dịch từ các địa chỉ bộ nhớ mà phần mềm sử dụng và địa chỉ vật lý xác định vị trí byte trong các chip DRAM. Cấp độ đầu tiên chúng tôi đã gặp trước đây trong việc đối phó với các phân đoạn. Như bạn sẽ nhớ lại, trong chế độ thực, | 398 The Giant Black Book of Computer Viruses In the 80386 there are two levels of translations between the memory address which software uses and the physical addresses which locate bytes in the DRAM chips. The first level we have encountered before in dealing with segments. As you will recall in real mode segments are defined to form a sort of most significant word of memory. Physical addresses are found by taking 16 times the segment plus the offset. In 80386 protected mode segments are defined by a descriptor table either the Global Descriptor Table or a Local Descriptor Table. These descriptor tables which consist of 8-byte entries define the segment starting point known as the base the segment size known as the limit and the segment properties for example a code segment a data segment etc. . In protected mode the segment registers cs ss ds es and fs and gs contain selectors instead of address information. The selectors point to entries in the descriptor tables. Thus for example ds will take the value 8. This number is merely a pointer to entry 1 in the descriptor table. The location of that segment could be anywhere in memory. To compute an address the 80386 uses the selector to lock up the segment base in the descriptor table and adds the offset of the memory referenced to it. For example if ds 8 and the base of entry 1 in th GDT was 80000H then instructions of the form mov bx 12987H mov al bx would access linear memory address 80000H 12987H 92987H. Notice however that I call this linear memory not physical memory. That s because there s another translation scheme at work in the 80386. In addition to segmentation the 80386 can also translate memory using a paging scheme in protected mode. This paging scheme lives underneath the segmentation and translates linear addresses into physical addresses. In the 80386 both the entire linear and physical memory is broken up into 4 kilobyte pages. Each page in linear memory can be mapped into any page in physical memory

TỪ KHÓA LIÊN QUAN