1 / 13

Memory

Memory. The programmer’s model .text, .data user program (instruction memory) and data area .ktext, .kdata kernel program and data area The computer’s model instruction memory user space 0-7fffffff, kernel space 80000000 - ffffffff data memory

knut
Download Presentation

Memory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Memory The programmer’s model • .text, .data • user program (instruction memory) and data area • .ktext, .kdata • kernel program and data area The computer’s model • instruction memory • user space 0-7fffffff, kernel space 80000000 - ffffffff • data memory • user space 0-7fffffff, kernel space 80000000 - ffffffff

  2. How can we tell User/Kernel apart? 31 30 29 28 27 0 ? x x x x…... By looking at the address! • PC[31] • 0, User program • 1, Kernel program • data addr[31] • 0, User data • 1, Kernel data

  3. Address Decoding So far; Instruction decoding • Now address decoding 32 PC PC[31] TAP BOX [31]

  4. CPU model How to detect a kernel instruction kinst CP0 MIPS PIPELINE 32 instruction address [31] Instruction Memory

  5. CPU model How to detect kernel data access kdata CP0 MIPS PIPELINE data mem address 32 [31] Instruction Memory

  6. Address Mapping CP0 MIPS PIPELINE 32 32 data mem address data 8/16/32 bits Address bus Data bus

  7. Address Mapping CP0 MIPS PIPELINE Control signals r/w, 8, 16, 32 bits Address bus Data bus Control bus

  8. Address Mapping Address bus Data bus Control bus 00……0 .. .. . . 0fff…..f 10……0 .. .. . . 1fff…..f n0……0 .. .. . . nfff…..f …. Mem 1 Mem 2 Mem n

  9. Enable and REDUCED address • Address 0-7fffffff 31 30 29 28 27 0 0 0 0 0 [27:0] points out the REDUCED address in mem 1 mem 1 Enable

  10. lw $t0 0($t1), $t1=0…0 Address bus Data bus Control bus read=(ADDR[31..28]=0000) and CTRL[READ] word=CTRL[WORD] 32 address decoder read, word 28 data word 00……0 .. . 0fff…..f

  11. lw $t0 0($t1), $t1=0…0 Address bus Data bus Control bus CTRL[stall]=0 Until data ready 32 address decoder read, word 28 data word 00……0 .. . 0fff…..f

  12. sb $t0 0($t1), $t1=0…0 Address bus Data bus Control bus write=(ADDR[31..28]=0000) and CTRL[WRITE] byte=CTRL[BYTE] 32 address decoder write, byte 28 data word 00……0 .. . 0fff…..f

  13. sw $t0 0($t1), $t1=0…1 Address bus Data bus Control bus CTRL[ALIGNMENT]=(ADDR[31..28]=0000) and (ADDR[0] or ADDR[1]) 32 address decoder Alignment Error!!!

More Related