Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream sddf blk to use offsets, and initialise blk system with blk_config.h #74

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

erichchan999
Copy link
Contributor

@erichchan999 erichchan999 commented Jul 3, 2024

This PR changes the vaddr used in the sddf block queues to offsets instead.

It also pushes some of the initialisation of the sddf block memory regions logic in a header file blk_config.h This now matches how other device classes are initialised.

The linux userspace block directories are refactored to match that of the sound system.

Max sddf buffers size for block increased, its quite easily possible that we have more than 4192 buffers.

_Static_assert(BLK_DATA_REGION_SIZE_DRIV >= BLK_TRANSFER_SIZE && BLK_DATA_REGION_SIZE_DRIV % BLK_TRANSFER_SIZE == 0,
"Driver data region size must be a multiple of the transfer size");

// @ericc: TODO: improve the default switch case error handling
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this, this whole header will be removed hopefully soon and so no todos.


SDDF_DIR := $(abspath ../../dep/sddf)

INCLUDE := include
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
INCLUDE := include
VMM_INCLUDE := include

Comment on lines 64 to 65
// @ericc: After changing to using offsets in the sddf protocol, we no longer need to know the
// physical address of any mappings. But now that it is a part of the libuio library, we'll simply do nothing.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems just like a comment explaining things rather than a TODO. If that's the case we should remove the @ericc.

@@ -214,16 +214,15 @@
<map mr="req_blk_driver" vaddr="0x20200000" perms="rw" cached="false" setvar_vaddr="blk_req_queue_driver" />
<map mr="resp_blk_driver" vaddr="0x20400000" perms="rw" cached="false" setvar_vaddr="blk_resp_queue_driver" />
<map mr="data_blk_driver" vaddr="0x20800000" perms="rw" cached="true" setvar_vaddr="blk_data_driver" />

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace?

@@ -421,10 +427,10 @@ bool virtio_blk_handle_resp(struct virtio_blk_device *state)
data->sddf_data, data->sddf_count,
data->sddf_block_number, 0, 0, true
};

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the whitespace.

…config.h

Signed-off-by: Eric Chan <[email protected]>
Signed-off-by: Ivan Velickovic <[email protected]>
@Ivan-Velickovic Ivan-Velickovic merged commit b5c1d70 into main Jul 5, 2024
5 checks passed
@Ivan-Velickovic Ivan-Velickovic deleted the upstream_blk branch July 5, 2024 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants