Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 890302
Collapse All | Expand All

(-)a/src/arch/linux/mapping/mapping.c (-4 / +4 lines)
Lines 47-54 static int kmem_mappings = 0; Link Here
47
static struct mem_map_struct kmem_map[MAX_KMEM_MAPPINGS];
47
static struct mem_map_struct kmem_map[MAX_KMEM_MAPPINGS];
48
48
49
static int init_done = 0;
49
static int init_done = 0;
50
unsigned char * const mem_base;
50
unsigned char * mem_base;
51
char * const lowmem_base;
51
char * lowmem_base;
52
52
53
static struct mappingdrivers *mappingdrv[] = {
53
static struct mappingdrivers *mappingdrv[] = {
54
#ifdef HAVE_SHM_OPEN
54
#ifdef HAVE_SHM_OPEN
Lines 205-211 void *alias_mapping(int cap, unsigned targ, size_t mapsize, int protect, void *s Link Here
205
  addr = mappingdriver.alias(cap, target, mapsize, protect, source);
205
  addr = mappingdriver.alias(cap, target, mapsize, protect, source);
206
  update_aliasmap(target, mapsize, (cap & MAPPING_VGAEMU) ? target : source);
206
  update_aliasmap(target, mapsize, (cap & MAPPING_VGAEMU) ? target : source);
207
  if (cap & MAPPING_INIT_LOWRAM) {
207
  if (cap & MAPPING_INIT_LOWRAM) {
208
    *(unsigned char **)&mem_base = addr;
208
    mem_base = addr;
209
  }
209
  }
210
  return addr;
210
  return addr;
211
}
211
}
Lines 416-422 void *alloc_mapping(int cap, size_t mapsize, off_t target) Link Here
416
416
417
  if (cap & MAPPING_INIT_LOWRAM) {
417
  if (cap & MAPPING_INIT_LOWRAM) {
418
    Q__printf("MAPPING: LOWRAM_INIT, cap=%s, base=%p\n", cap, addr);
418
    Q__printf("MAPPING: LOWRAM_INIT, cap=%s, base=%p\n", cap, addr);
419
    *(char **)(&lowmem_base) = addr;
419
    lowmem_base = addr;
420
  }
420
  }
421
  return addr;
421
  return addr;
422
}
422
}
(-)a/src/include/memory.h (-2 / +2 lines)
Lines 209-215 void *lowmemp(const void *ptr); Link Here
209
   restrictions it can be non-zero. Non-zero values block vm86 but at least
209
   restrictions it can be non-zero. Non-zero values block vm86 but at least
210
   give NULL pointer protection.
210
   give NULL pointer protection.
211
*/
211
*/
212
extern unsigned char * const mem_base;
212
extern unsigned char * mem_base;
213
213
214
/* lowmem_base points to a shared memory image of the area 0--1MB+64K.
214
/* lowmem_base points to a shared memory image of the area 0--1MB+64K.
215
   It does not have any holes or mapping for video RAM etc.
215
   It does not have any holes or mapping for video RAM etc.
Lines 221-227 extern unsigned char * const mem_base; Link Here
221
   It is set "const" to help GCC optimize accesses. In reality it is set only
221
   It is set "const" to help GCC optimize accesses. In reality it is set only
222
   once, at startup
222
   once, at startup
223
*/
223
*/
224
extern char * const lowmem_base;
224
extern char * lowmem_base;
225
225
226
#define UNIX_READ_BYTE(addr)		(*(Bit8u *) (addr))
226
#define UNIX_READ_BYTE(addr)		(*(Bit8u *) (addr))
227
#define UNIX_WRITE_BYTE(addr, val)	(*(Bit8u *) (addr) = (val) )
227
#define UNIX_WRITE_BYTE(addr, val)	(*(Bit8u *) (addr) = (val) )

Return to bug 890302