Presentation is loading. Please wait.

Presentation is loading. Please wait.

Project 4 Kristoffer Robin Stokke. Direct Memory Access New hardware device to toy with! Hardware controller with direct access to physical devices as.

Similar presentations


Presentation on theme: "Project 4 Kristoffer Robin Stokke. Direct Memory Access New hardware device to toy with! Hardware controller with direct access to physical devices as."— Presentation transcript:

1 Project 4 Kristoffer Robin Stokke

2 Direct Memory Access New hardware device to toy with! Hardware controller with direct access to physical devices as well as RAM Used to transfer data from floppy to (physical) memory in our project! See the code in floppy.c

3 Direct Memory Access Limitations – Transfers to memory must be within the first 16 MBs! – Transfers must not cross a 64kB boundary! – All addresses are physical! – See the P4 FAQ!

4 Processes in P4 User mode Virtual address space –?–?

5 Virtual Address Space Each process «believes» to run in a separate address space entirely dedicated to itself Shell Virtual RAM 0x0 0xFFFFFFFF

6 Virtual Address Space Behind the scenes, the MMU maps virtual addresses to physical addresses using paging mechanisms Shell Virtual RAM 0x0 0xFFFFFFFF Physical RAM 0x0 0xFFFFFFFF

7 Virtual Address Space Code to set up processes with paging enabled have been given see kernel.c and paging.c Kernel Process Kernel Process data, code, stack Kernel ProcessesThreadsPhysical memory 0x – to - 1 0x0

8 Process Management Dynamic loading – how? – Simple filesystem on floppy containing process directory – Implement readdir() – Implement loadproc() – Who calls these functions?

9 readdir(uint32_t* buf) Systemcall called from shell Copies data from floppy to memory (buf) using DMA – From where? Is there a problem with that? – Explain in design!

10 loadproc() Systemcall by shell to load a process Allocate space for data (see memory.c) – Enough for code / data + 8kB stack! Load data into memory from floppy Use create_process() to setup the process

11 Keyboard Keyboard is connected to the CPU like the interrupt controller – IRQ1 signals keypress – Key can be read from port 0x60 Code set up for you in entry.S – Calls keyboard_interrupt(), which calls appropriate handler, which might call putchar() Design getchar(), putchar() and init()

12 Remember.. Lots of small things that can go wrong! – Attempt to identify such sections and design correctly to avoid them Use the makefile to test the different implementations as stated in the project description

13 Snake x

14 A Word of Warning Only one delivery; goes for printed documents as well as deliveries by mail. Correctors now take the first of the delivered items to avoid duplicate work. Is this OK?

15 Good luck!


Download ppt "Project 4 Kristoffer Robin Stokke. Direct Memory Access New hardware device to toy with! Hardware controller with direct access to physical devices as."

Similar presentations


Ads by Google