diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2010-02-15 22:48:28 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-02-15 22:48:28 -0500 |
commit | d7e998fdd0ea1cacbc83e9add182c49917bf35e6 (patch) | |
tree | f9ef70f06a3ba914abff8ad6531be34d5ec3dc28 /src/biosvar.h | |
parent | 525be697f95eaa6a037b924afc99c971c0444db6 (diff) | |
download | seabios-d7e998fdd0ea1cacbc83e9add182c49917bf35e6.tar.gz |
Dynamically allocate each drive_g with malloc_fseg().
This eliminates the limit on the number of available drives. It also
allows for each driver to allocate additional custom fields.
Diffstat (limited to 'src/biosvar.h')
-rw-r--r-- | src/biosvar.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/biosvar.h b/src/biosvar.h index d011966b..c67503cd 100644 --- a/src/biosvar.h +++ b/src/biosvar.h @@ -329,9 +329,11 @@ static inline u16 get_global_seg(void) { (var) = (val); \ } while (0) #if MODESEGMENT -#define ADJUST_GLOBAL_PTR(var) (var) +#define STORE_GLOBAL_PTR(var) (var) +#define RETRIEVE_GLOBAL_PTR(var) (var) #else -#define ADJUST_GLOBAL_PTR(var) ((typeof(var))((void*)var - BUILD_BIOS_ADDR)) +#define STORE_GLOBAL_PTR(var) ((typeof(var))((void*)var - BUILD_BIOS_ADDR)) +#define RETRIEVE_GLOBAL_PTR(var) ((typeof(var))((void*)var + BUILD_BIOS_ADDR)) #endif |