예제 #1
0
파일: api.py 프로젝트: zhouat/pyrebox
def va_to_pa(pgd,addr):
    """ Virtual to physical address.

        :param pgd: PGD, or address space of the address to translate  
        :type addr: int

        :param addr: Virtual address to translate
        :type addr: int

        :return: The translated physical address
        :rtype: int
    """
    import c_api
    #If this function call fails, it will raise an exception. 
    #Given that the exception is self explanatory, we just let it propagate upwards 
    return c_api.va_to_pa(pgd,addr)
예제 #2
0
파일: api.py 프로젝트: CRYP706URU/pyrebox
def va_to_pa(pgd, addr):
    """ Virtual to physical address.

        :param pgd: PGD, or address space of the address to translate
        :type addr: int

        :param addr: Virtual address to translate
        :type addr: int

        :return: The translated physical address
        :rtype: int
    """
    import c_api
    # If this function call fails, it will raise an exception.
    # Given that the exception is self explanatory, we just let it propagate
    # upwards
    return c_api.va_to_pa(pgd, addr)