Ovmf/Xen: port XenBusDxe to other architectures

This patch updates XenBusDxe to use the 16-bit compare and exchange
function that was introduced for this purpose to the
BaseSynchronizationLib. It also provides a new generic implementation
of TestAndClearBit () using the same 16-bit compare and exchange, making
this module fully architecture agnostic.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16975 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Ard Biesheuvel
2015-02-28 20:33:34 +00:00
committed by lersek
parent b94c3ac93d
commit e482753b33
10 changed files with 49 additions and 197 deletions

View File

@@ -35,9 +35,9 @@
#include <IndustryStandard/Xen/memory.h>
#include <Library/XenHypercallLib.h>
#include <Library/SynchronizationLib.h>
#include "GrantTable.h"
#include "InterlockedCompareExchange16.h"
#define NR_RESERVED_ENTRIES 8