Commit 27092462 authored by hudson@kremvax.wan's avatar hudson@kremvax.wan
Browse files

Use stubs to locate alloc_dma_memory() and fix bootflags for 2.0.4

parent 09dc0e8711bf
...@@ -96,10 +96,8 @@ void ...@@ -96,10 +96,8 @@ void
bootflag_write_bootblock( void ) bootflag_write_bootblock( void )
{ {
gui_stop_menu(); gui_stop_menu();
void * (*AllocateUncacheableMemory)( size_t ) = (void*) 0xff99b3a8;
void (*FreeUncacheableMemory)( const void * ) = (void*) 0xff99b3dc;
uint8_t *block = AllocateUncacheableMemory( 0x200 ); uint8_t *block = alloc_dma_memory( 0x200 );
bmp_printf( FONT_MED, 0, 40, "mem=%08x read=%08x", block, cf_device->read_block ); bmp_printf( FONT_MED, 0, 40, "mem=%08x read=%08x", block, cf_device->read_block );
int rc = cf_device->read_block( cf_device, 0x0, 1, block ); int rc = cf_device->read_block( cf_device, 0x0, 1, block );
msleep( 100 ); msleep( 100 );
...@@ -114,7 +112,7 @@ bootflag_write_bootblock( void ) ...@@ -114,7 +112,7 @@ bootflag_write_bootblock( void )
rc = cf_device->write_block( cf_device, 0x0, 1, block ); rc = cf_device->write_block( cf_device, 0x0, 1, block );
bmp_printf( FONT_MED, 600, 60, "write=%d", rc ); bmp_printf( FONT_MED, 600, 60, "write=%d", rc );
FreeUncacheableMemory( block ); free_dma_memory( block );
} }
......
...@@ -675,5 +675,16 @@ FreeMemory( ...@@ -675,5 +675,16 @@ FreeMemory(
void * buf void * buf
); );
/** Allocate DMA memory for writing to the CF card */
extern void *
alloc_dma_memory(
size_t len
);
extern void
free_dma_memory(
const void * len
);
#endif #endif
...@@ -126,3 +126,5 @@ NSTUB( 0xFF890188, gui_massive_event_loop ) ...@@ -126,3 +126,5 @@ NSTUB( 0xFF890188, gui_massive_event_loop )
NSTUB( 0xFF9B3910, gui_timer_something ) NSTUB( 0xFF9B3910, gui_timer_something )
NSTUB( 0xFFCB48CC, audio_thresholds ) NSTUB( 0xFFCB48CC, audio_thresholds )
NSTUB( 0xFF85B438, sounddev_active_in ) NSTUB( 0xFF85B438, sounddev_active_in )
NSTUB( 0xFF9B9FD0, alloc_dma_memory )
NSTUB( 0xFF9BA004, free_dma_memory )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment