alpine 3.6
obsolete weakness #45

1

Weakness Breakdown


Definition:

An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:

xf86-video-ast/src/xf86-video-ast-1.1.5/src/ast_vgatool.h

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.6 obsolete weakness.

 #define WriteAST1180SOC(addr, data)	\
{	\
        ULONG temp;	\
        *(ULONG *) (pAST->MMIOVirtualAddr + 0xF004) = (addr) & 0xFFFF0000;	\
        *(ULONG *) (pAST->MMIOVirtualAddr + 0xF000) = 0x1;	\
        *(ULONG *) (pAST->MMIOVirtualAddr + 0x10000 + ((addr) & 0x0000FFFF)) = (data);	\
        temp = *(ULONG *) (pAST->MMIOVirtualAddr + 0x10000 + ((addr) & 0x0000FFFF));	\
}

#define ReadAST1180MEM(addr, data)	\
{	\
        *(ULONG *) (pAST->MMIOVirtualAddr + 0xF004) = (addr) & 0xFFFF0000;	\
        *(ULONG *) (pAST->MMIOVirtualAddr + 0xF000) = 0x1;	\
        data = (*(ULONG *) (pAST->MMIOVirtualAddr + 0x10000 + ((addr) & 0x0000FFFF)));	\
}

#define WriteAST1180MEM(addr, data)	\
{	\
        *(ULONG *) (pAST->MMIOVirtualAddr + 0xF004) = (addr) & 0xFFFF0000;	\
        *(ULONG *) (pAST->MMIOVirtualAddr + 0xF000) = 0x1;	\
        *(ULONG *) (pAST->MMIOVirtualAddr + 0x10000 + ((addr) & 0x0000FFFF)) = (data);	\
}

/* Delay */
#define DelayUS(x)		usleep(x)
#define DelayMS(x)		DelayUS(1000*x) 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.