Address ing function of Wince ceddk

Source: Internet
Author: User

Author: arm-WinCE

 

The address ing function is provided in ceddk/ddk_map/ddk_map.c. This module mainly provides two functions for ing physical addresses to virtual addresses and un ing:

 

1. pvoid mmmapiospace (physical_address physicaladdress, ulong numberofbytes, Boolean cacheenable)

Physicaladdress: The physical start address to be mapped.

Numberofbytes: number of bytes to be mapped

Cacheenable: Indicates whether to enable cache. If it is a register mapped to a device, it should be false.

This function is often used in drivers. during initialization, virtual addresses are mapped from physical addresses and operated on devices through virtual addresses. This function actually calls the virtualalloc and virtualcopy functions to map physical addresses to virtual addresses. The return value of the function is the mapped virtual address.

 

2. Void mmunmapiospace (in pvoid baseaddress, in ulong numberofbytes)

Baseaddress: point to the mapped virtual address

Numberofbytes: number of bytes mapped

This function is used to cancel the ing by calling the virtualfree function.

 

You can also see the transbusaddrtovirtual and transbusaddrtostatic functions in this module. These two functions have been replaced by the bustransbusaddrtovirtual and bustransbusaddrtostatic functions in the bus module of ceddk, we will not repeat it here.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.