Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

The following items will be graded for this checkpoint. Programming assignment: · src/virtio.c · Your virtio.c and virtio.h files you created in checkpoint 2: · Delegates device specific VirtIO...

1 answer below »
The following items will be graded for this checkpoint.
Programming assignment:
· src/virtio.c
· Your virtio.c and virtio.h files you created in checkpoint 2:
· Delegates device specific VirtIO (GPU, input, block) to gpu.c, input.c, or block.c (create these new files and associated headers).
· src/gpu.c
· Create an initialization sequence. Recall that the descriptor table, driver ring, and device ring have already been created and added in checkpoint 2.
· Recall the order of initialization: (1) get display info, (2) create 2D resource, (3) attach backing, (4) set scanout.
· Create a routine that transfers the backing and flushes, such as gpu_transfer_and_flush().
· Create primitives that draw lines and rectangles.
· Keep track of all GPUs globally.
· src
lock.c
· Create an initialization sequence for all block devices.
· Create routines that (1) reads a set of bytes from the block device into a buffer and (2) writes a set of bytes from a buffer into the block device. Recall that the offset of the block device is specified by a sector number. The byte offset is sector * 512.
· src/input.c
· Create an initialization sequence that determines the type of input device (keyboard or mouse).
· Create a routine that gives event buffers to the input device.
· Create a routine that retrieves events from the input device into an event queue or ring buffer.
· Make sure you lock critical sections, and do not lock non-critical sections!
 
Create a tag called "checkpoint3". I will grade checkpoint3, or if that doesn't exist, the master
anch.
View Ru
ic
Checkpoint 3 is a Heavy Lift!
Hello COSC562!
 
I want to warn you that checkpoint 3 is quite a heavy lift. You need to make sure your request system is working properly (gra
ing a descriptor, filling it, and putting it on the driver ring, then waiting for a response on the device ring). The easiest way to test this is to start first with the entropy driver.
 
At first, you need to poll the device by continually examining the index pointer on the device ring (the used ring). When that changes from what you've seen, that means that the device put something there, and you need to read it.
 
When everything is finished, a device will send an external inte
upt to your PLIC, which means you will need to make sure you have a proper trap handler that forwards the inte
upt to the proper PCI device.
Answered 7 days After Oct 23, 2022

Solution

Jahir Abbas answered on Oct 30 2022
61 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here