Ignore:
Timestamp:
Jan 27, 2021, 9:35:47 AM (5 years ago)
Author:
Paul Smedley
Message:

Remove remaining support for non-KEE builds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/lib32/memory.c

    r662 r667  
    3232#include <stacktoflat.h>
    3333#include <limits.h>
    34 #ifdef KEE
    3534#include <kee.h>
    36 #endif
    3735#include "malloc.h"
    3836#define _I386_PAGE_H
     
    178176unsigned long virt_to_phys(void * address)
    179177{
    180 #ifdef KEE
    181178    KEEVMPageList pagelist;
    182179    ULONG         nrpages;
     
    187184        }
    188185        return pagelist.addr;
    189 #else
    190     LINEAR addr = (LINEAR)address;
    191     PAGELIST pagelist;
    192 
    193         if(DevLinToPageList(addr, PAGE_SIZE, (PAGELIST NEAR *)&pagelist)) {
    194                 DebugInt3();
    195                 return 0;
    196         }
    197         return pagelist.physaddr;
    198 #endif
    199186}
    200187//******************************************************************************
     
    205192    ULONG addr = 0;
    206193
    207 #ifdef KEE
    208194    SHORT sel;
    209195    rc = KernVMAlloc(PAGE_SIZE, VMDHA_PHYS, (PVOID*)&addr, (PVOID*)&address, &sel);
    210 #else
    211     rc = DevVMAlloc(VMDHA_PHYS, PAGE_SIZE, (LINEAR)&address, (ULONG)&addr);
    212 #endif
    213196    if (rc != 0) {
    214197        DebugInt3();
     
    232215__again:
    233216
    234 #ifdef KEE
    235 
    236217    rc = KernVMAlloc(size, flags, (PVOID*)&addr, (PVOID*)-1, &sel);
    237 #else
    238     rc = DevVMAlloc(flags, size, (LINEAR)-1, (ULONG)&addr);
    239 #endif
    240218    if (rc == 0) {
    241219        *pAddr = (LINEAR)addr;
     
    257235{
    258236    APIRET rc;
    259 
    260 #ifdef KEE
    261         rc = KernVMFree((PVOID)addr);
    262 #else
    263         rc = DevVMFree((LINEAR)addr);
    264 #endif
     237    rc = KernVMFree((PVOID)addr);
    265238    if(rc) {
    266239        DebugInt3();
     
    531504        //size &= 0xFFFFF000;
    532505
    533 #ifdef KEE
    534506    SHORT sel;
    535 
    536         //rc = KernVMAlloc(size, VMDHA_PHYS, (PVOID*)&addr, (PVOID*)&physaddr, &sel);
     507    //rc = KernVMAlloc(size, VMDHA_PHYS, (PVOID*)&addr, (PVOID*)&physaddr, &sel);
    537508    rc = KernVMAlloc(Length, VMDHA_PHYS, (PVOID*)&addr, (PVOID*)&PhysicalAddress, &sel);
    538 #else
    539     //rc = DevVMAlloc(VMDHA_PHYS, size, (LINEAR)&physaddr, (ULONG)&addr);
    540     rc = DevVMAlloc(VMDHA_PHYS, Length, (LINEAR)&PhysicalAddress, (ULONG)&addr);
    541 #endif
    542509    if (rc != 0) {
    543510        dprintf(("ioremap error: %x", rc));
Note: See TracChangeset for help on using the changeset viewer.