⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 port_mem.c

📁 Next BIOS Source code : Extensible Firmware Interface
💻 C
字号:
// CR_Start
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c)  1999 - 2003 Intel Corporation. All rights reserved
// This software and associated documentation (if any) is furnished
// under a license and may only be used or copied in accordance
// with the terms of the license. Except as permitted by such
// license, no part of this software or documentation may be
// reproduced, stored in a retrieval system, or transmitted in any
// form or by any means without the express written consent of
// Intel Corporation.
//
//
///////////////////////////////////////////////////////////////////////////////
// CR_End

//************************************************************************************************//
// port.c
//
// Description:
//    Functions in this file provide the port from Windows based calls (memcpy and memset)
//    to their EFI implementations. 
//
//************************************************************************************************//

#include <efi.h>
#include <efidriverlib.h>

void* memcpy(void *dest, void *src, UINTN count);
void* memset(void *dest, UINT8 c, UINTN count);

#pragma function(memcpy)
#pragma function(memset)

///////////////////////////////////////////////////////////////////////////////
//
//  Function Name: memcpy
//
//  Description:   copy specified number of bytes from source to destination
//
//  Returns:
//
///////////////////////////////////////////////////////////////////////////////
void* memcpy(void *dest, void *src, UINTN count)
{
    EfiCopyMem(dest, (void *)src, count);

    return dest;
} // End of memcpy()

///////////////////////////////////////////////////////////////////////////////
//
//  Function Name: memset
//
//  Description:   set specified count of buffer to desired value
//
//  Returns:
//
///////////////////////////////////////////////////////////////////////////////
void *  memset(void *dest, UINT8 c, UINTN count)
{
    EfiSetMem(dest, count, c);

    return dest;
} // End of memset()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -