Skip to content

Commit

Permalink
Update MemoryFence for virtual_media driver
Browse files Browse the repository at this point in the history
MemoryFence is used by kernelflinger, however, currently MemoryFence
is defined in header file, it leads to link failure due to lack of
symbol.

Add MemoryFence implementation in virtual_media driver to fix this
issue.

Tracked-On: OAM-113553
Signed-off-by: Zhong,Fangjian <[email protected]>
  • Loading branch information
yang8621 authored and Zhong,Fangjian committed Nov 23, 2023
1 parent 932b139 commit 06f22b3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/virtual_media/VirtioLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@

#define EFI_PAGES_TO_SIZE(Pages) ((Pages) << EFI_PAGE_SHIFT)

#ifdef MemoryFence
#undef MemoryFence
VOID
EFIAPI
MemoryFence (
VOID
)
{
__asm__ __volatile__ ("":::"memory");
}
#endif

/**
Expand Down

0 comments on commit 06f22b3

Please sign in to comment.