+++ /dev/null
-//++\r
-// Copyright (c) 2006, Intel Corporation \r
-// All rights reserved. This program and the accompanying materials \r
-// are licensed and made available under the terms and conditions of the BSD License \r
-// which accompanies this distribution. The full text of the license may be found at \r
-// http://opensource.org/licenses/bsd-license.php \r
-// \r
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-// \r
-// Module Name:\r
-//\r
-// IpfCpuCache.s\r
-//\r
-// Abstract:\r
-//\r
-// Contains Misc assembly procedures to support IPF CPU AP.\r
-//\r
-// Revision History:\r
-//\r
-//--\r
-\r
-.file "IpfCpuCache.s"\r
-\r
-#include "IpfMacro.i"\r
-#include "IpfDefines.h"\r
-\r
-//-----------------------------------------------------------------------------\r
-//++\r
-// Flush Cache\r
-//\r
-// Arguments : \r
-\r
-// Input = in0 = Starting Address to Flush.\r
-// Input = in1 = Length in bytes.\r
-// Input = b0 = return branch register.\r
-// On Entry :\r
-//\r
-// Return Value: \r
-//\r
-// VOID\r
-// SalFlushCache (\r
-// IN UINT64 BaseToFlush,\r
-// IN UINT64 LengthToFlush\r
-// );\r
-//\r
-//--\r
-//---------------------------------------------------------------------------\r
-PROCEDURE_ENTRY (SalFlushCache)\r
-\r
- NESTED_SETUP (5,8,0,0)\r
- \r
- mov loc2 = ar.lc\r
- \r
- mov loc3 = in0 // Start address.\r
- mov loc4 = in1;; // Length in bytes.\r
- \r
- cmp.eq p6,p7 = loc4, r0;; // If Length is zero then don't flush any cache\r
- (p6) br.spnt.many DoneFlushingC;; \r
- \r
- add loc4 = loc4,loc3 \r
- mov loc5 = 1;;\r
- sub loc4 = loc4, loc5 ;; // the End address to flush\r
- \r
- dep loc3 = r0,loc3,0,5 \r
- dep loc4 = r0,loc4,0,5;; \r
- shr loc3 = loc3,5 \r
- shr loc4 = loc4,5;; // 32 byte cache line\r
- \r
- sub loc4 = loc4,loc3;; // total flush count, It should be add 1 but \r
- // the br.cloop will first execute one time \r
- mov loc3 = in0 \r
- mov loc5 = 32 \r
- mov ar.lc = loc4;;\r
-\r
-StillFlushingC:\r
- fc loc3;; \r
- sync.i;;\r
- srlz.i;;\r
- add loc3 = loc5,loc3;;\r
- br.cloop.sptk.few StillFlushingC;;\r
-\r
-DoneFlushingC: \r
- mov ar.lc = loc2 \r
- NESTED_RETURN\r
-\r
-PROCEDURE_EXIT (SalFlushCache)\r
-\r