Lines Matching refs:xs

173 static XENSTORE_PRIVATE xs;  variable
280 if (IsListEmpty (&xs.RegisteredWatches)) { in XenStoreFindWatch()
283 for (Entry = GetFirstNode (&xs.RegisteredWatches); in XenStoreFindWatch()
284 !IsNull (&xs.RegisteredWatches, Entry); in XenStoreFindWatch()
285 Entry = GetNextNode (&xs.RegisteredWatches, Entry)) { in XenStoreFindWatch()
432 WaitList[0] = xs.EventChannelEvent; in XenStoreWaitForEvent()
472 Cons = xs.XenStore->req_cons; in XenStoreWriteStore()
473 Prod = xs.XenStore->req_prod; in XenStoreWriteStore()
483 Status = XenStoreWaitForEvent (xs.EventChannelEvent, in XenStoreWriteStore()
493 xs.XenStore->req_cons = xs.XenStore->req_prod = 0; in XenStoreWriteStore()
497 Dest = XenStoreGetOutputChunk (Cons, Prod, xs.XenStore->req, &Available); in XenStoreWriteStore()
513 xs.XenStore->req_prod += Available; in XenStoreWriteStore()
520 XenEventChannelNotify (xs.Dev, xs.EventChannel); in XenStoreWriteStore()
551 Cons = xs.XenStore->rsp_cons; in XenStoreReadStore()
552 Prod = xs.XenStore->rsp_prod; in XenStoreReadStore()
562 Status = XenStoreWaitForEvent (xs.EventChannelEvent, in XenStoreReadStore()
572 xs.XenStore->rsp_cons = xs.XenStore->rsp_prod = 0; in XenStoreReadStore()
576 Src = XenStoreGetInputChunk (Cons, Prod, xs.XenStore->rsp, &Available); in XenStoreReadStore()
597 xs.XenStore->rsp_cons += Available; in XenStoreReadStore()
604 XenEventChannelNotify (xs.Dev, xs.EventChannel); in XenStoreReadStore()
654 EfiAcquireLock (&xs.RegisteredWatchesLock); in XenStoreProcessMessage()
660 EfiAcquireLock (&xs.WatchEventsLock); in XenStoreProcessMessage()
661 InsertHeadList (&xs.WatchEvents, &Message->Link); in XenStoreProcessMessage()
662 EfiReleaseLock (&xs.WatchEventsLock); in XenStoreProcessMessage()
669 EfiReleaseLock (&xs.RegisteredWatchesLock); in XenStoreProcessMessage()
672 EfiAcquireLock (&xs.ReplyLock); in XenStoreProcessMessage()
673 InsertTailList (&xs.ReplyList, &Message->Link); in XenStoreProcessMessage()
674 EfiReleaseLock (&xs.ReplyLock); in XenStoreProcessMessage()
753 while (IsListEmpty (&xs.ReplyList)) { in XenStoreReadReply()
762 EfiAcquireLock (&xs.ReplyLock); in XenStoreReadReply()
763 Entry = GetFirstNode (&xs.ReplyList); in XenStoreReadReply()
766 EfiReleaseLock (&xs.ReplyLock); in XenStoreReadReply()
962 EfiAcquireLock (&xs.WatchEventsLock); in XenStoreWaitWatch()
963 if (IsListEmpty (&xs.WatchEvents) || in XenStoreWaitWatch()
964 Last == GetFirstNode (&xs.WatchEvents)) { in XenStoreWaitWatch()
965 EfiReleaseLock (&xs.WatchEventsLock); in XenStoreWaitWatch()
973 for (Entry = GetFirstNode (&xs.WatchEvents); in XenStoreWaitWatch()
974 Entry != Last && !IsNull (&xs.WatchEvents, Entry); in XenStoreWaitWatch()
975 Entry = GetNextNode (&xs.WatchEvents, Entry)) { in XenStoreWaitWatch()
979 EfiReleaseLock (&xs.WatchEventsLock); in XenStoreWaitWatch()
985 Last = GetFirstNode (&xs.WatchEvents); in XenStoreWaitWatch()
986 EfiReleaseLock (&xs.WatchEventsLock); in XenStoreWaitWatch()
1060 xs.Dev = Dev; in XenStoreInit()
1062 xs.EventChannel = (evtchn_port_t)XenHypercallHvmGetParam (HVM_PARAM_STORE_EVTCHN); in XenStoreInit()
1064 xs.XenStore = (VOID *) (XenStoreGpfn << EFI_PAGE_SHIFT); in XenStoreInit()
1066 xs.XenStore, xs.EventChannel)); in XenStoreInit()
1068 InitializeListHead (&xs.ReplyList); in XenStoreInit()
1069 InitializeListHead (&xs.WatchEvents); in XenStoreInit()
1070 InitializeListHead (&xs.RegisteredWatches); in XenStoreInit()
1072 EfiInitializeLock (&xs.ReplyLock, TPL_NOTIFY); in XenStoreInit()
1073 EfiInitializeLock (&xs.RegisteredWatchesLock, TPL_NOTIFY); in XenStoreInit()
1074 EfiInitializeLock (&xs.WatchEventsLock, TPL_NOTIFY); in XenStoreInit()
1077 Status = XenStoreInitComms (&xs); in XenStoreInit()
1095 if (!IsListEmpty (&xs.RegisteredWatches)) { in XenStoreDeinit()
1099 Entry = GetFirstNode (&xs.RegisteredWatches); in XenStoreDeinit()
1100 while (!IsNull (&xs.RegisteredWatches, Entry)) { in XenStoreDeinit()
1102 Entry = GetNextNode (&xs.RegisteredWatches, Entry); in XenStoreDeinit()
1112 if (!IsListEmpty (&xs.WatchEvents)) { in XenStoreDeinit()
1115 Entry = GetFirstNode (&xs.WatchEvents); in XenStoreDeinit()
1116 while (!IsNull (&xs.WatchEvents, Entry)) { in XenStoreDeinit()
1118 Entry = GetNextNode (&xs.WatchEvents, Entry); in XenStoreDeinit()
1125 if (!IsListEmpty (&xs.ReplyList)) { in XenStoreDeinit()
1128 Entry = GetFirstNode (&xs.ReplyList); in XenStoreDeinit()
1129 while (!IsNull (&xs.ReplyList, Entry)) { in XenStoreDeinit()
1131 Entry = GetNextNode (&xs.ReplyList, Entry); in XenStoreDeinit()
1138 gBS->CloseEvent (xs.EventChannelEvent); in XenStoreDeinit()
1140 if (xs.XenStore->server_features & XENSTORE_SERVER_FEATURE_RECONNECTION) { in XenStoreDeinit()
1141 xs.XenStore->connection = XENSTORE_RECONNECT; in XenStoreDeinit()
1142 XenEventChannelNotify (xs.Dev, xs.EventChannel); in XenStoreDeinit()
1143 while (*(volatile UINT32*)&xs.XenStore->connection == XENSTORE_RECONNECT) { in XenStoreDeinit()
1144 XenStoreWaitForEvent (xs.EventChannelEvent, EFI_TIMER_PERIOD_MILLISECONDS (100)); in XenStoreDeinit()
1151 SetMem (xs.XenStore->req, XENSTORE_RING_SIZE, 0xff); in XenStoreDeinit()
1152 SetMem (xs.XenStore->rsp, XENSTORE_RING_SIZE, 0xff); in XenStoreDeinit()
1153 xs.XenStore->req_cons = xs.XenStore->req_prod = 0; in XenStoreDeinit()
1154 xs.XenStore->rsp_cons = xs.XenStore->rsp_prod = 0; in XenStoreDeinit()
1156 xs.XenStore = NULL; in XenStoreDeinit()
1370 EfiAcquireLock (&xs.RegisteredWatchesLock); in XenStoreRegisterWatch()
1371 InsertTailList (&xs.RegisteredWatches, &Watch->Link); in XenStoreRegisterWatch()
1372 EfiReleaseLock (&xs.RegisteredWatchesLock); in XenStoreRegisterWatch()
1385 EfiAcquireLock (&xs.RegisteredWatchesLock); in XenStoreRegisterWatch()
1387 EfiReleaseLock (&xs.RegisteredWatchesLock); in XenStoreRegisterWatch()
1410 EfiAcquireLock (&xs.RegisteredWatchesLock); in XenStoreUnregisterWatch()
1412 EfiReleaseLock (&xs.RegisteredWatchesLock); in XenStoreUnregisterWatch()
1417 EfiAcquireLock (&xs.WatchEventsLock); in XenStoreUnregisterWatch()
1418 Entry = GetFirstNode (&xs.WatchEvents); in XenStoreUnregisterWatch()
1419 while (!IsNull (&xs.WatchEvents, Entry)) { in XenStoreUnregisterWatch()
1421 Entry = GetNextNode (&xs.WatchEvents, Entry); in XenStoreUnregisterWatch()
1428 EfiReleaseLock (&xs.WatchEventsLock); in XenStoreUnregisterWatch()