MCPcopy Create free account
hub / github.com/coreboot/coreboot / bounce_buffer_stop

Function bounce_buffer_stop

src/commonlib/storage/bouncebuf.c:61–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61int bounce_buffer_stop(struct bounce_buffer *state)
62{
63 if (state->flags & GEN_BB_WRITE) {
64 // Invalidate cache so that CPU can see any newly DMA'd data
65 dcache_invalidate_by_mva(state->bounce_buffer,
66 state->len_aligned);
67 }
68
69 if (state->bounce_buffer == state->user_buffer)
70 return 0;
71
72 if (state->flags & GEN_BB_WRITE)
73 memcpy(state->user_buffer, state->bounce_buffer, state->len);
74
75 free(state->bounce_buffer);
76
77 return 0;
78}

Callers 1

sdhci_send_commandFunction · 0.85

Calls 3

dcache_invalidate_by_mvaFunction · 0.50
memcpyFunction · 0.50
freeFunction · 0.50

Tested by

no test coverage detected