Changeset 113aef8 in mainline for uspace/drv/uhci/utils/malloc32.h


Ignore:
Timestamp:
2011-01-29T08:58:46Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d956aa5
Parents:
245b56b5
Message:

TD debug messages refatoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci/utils/malloc32.h

    r245b56b5 r113aef8  
    4242#include <as.h>
    4343
     44#define UHCI_STRCUTURES_ALIGNMENT 16
     45#define UHCI_REQUIRED_PAGE_SIZE 4096
     46
    4447static inline void * addr_to_phys(void *addr)
    4548{
     
    5255
    5356static inline void * malloc32(size_t size)
    54 /* TODO: this is ugly */
    55         { return memalign(16, size); }
     57        { return memalign(UHCI_STRCUTURES_ALIGNMENT, size); }
    5658
    5759static inline void * get_page()
    5860{
    59         void * free_address = as_get_mappable_page(4096);
     61        void * free_address = as_get_mappable_page(UHCI_REQUIRED_PAGE_SIZE);
    6062        assert(free_address);
    6163        if (free_address == 0)
    6264                return 0;
    6365        void* ret =
    64           as_area_create(free_address, 4096, AS_AREA_READ | AS_AREA_WRITE |AS_AREA_CACHEABLE);
     66          as_area_create(free_address, UHCI_REQUIRED_PAGE_SIZE,
     67                  AS_AREA_READ | AS_AREA_WRITE);
    6568        if (ret != free_address)
    6669                return 0;
Note: See TracChangeset for help on using the changeset viewer.