j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: mcayland Date: Sun Aug 11 09:24:33 2013 New Revision: 1202 URL: http://tracker.coreboot.org/trac/openbios/changeset/1202
Log: OFMEM: add ofmem_release_io() function
Similar to ofmem_release_phys() and ofmem_release_virt(), create a new function to release memory claimed with ofmem_claim_io().
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/include/libopenbios/ofmem.h trunk/openbios-devel/libopenbios/ofmem_common.c
Modified: trunk/openbios-devel/include/libopenbios/ofmem.h ============================================================================== --- trunk/openbios-devel/include/libopenbios/ofmem.h Sun Aug 11 09:24:30 2013 (r1201) +++ trunk/openbios-devel/include/libopenbios/ofmem.h Sun Aug 11 09:24:33 2013 (r1202) @@ -120,6 +120,7 @@ extern void ofmem_release( ucell virt, ucell size ); extern void ofmem_release_phys( phys_addr_t phys, ucell size ); extern void ofmem_release_virt( ucell virt, ucell size ); +extern void ofmem_release_io( ucell virt, ucell size ); extern phys_addr_t ofmem_translate( ucell virt, ucell *ret_mode );
/* memory and virtual-memory nodes */
Modified: trunk/openbios-devel/libopenbios/ofmem_common.c ============================================================================== --- trunk/openbios-devel/libopenbios/ofmem_common.c Sun Aug 11 09:24:30 2013 (r1201) +++ trunk/openbios-devel/libopenbios/ofmem_common.c Sun Aug 11 09:24:33 2013 (r1202) @@ -929,6 +929,16 @@ remove_range(virt, size, &ofmem->virt_range); }
+/* release memory allocated by ofmem_claim_io */ +void ofmem_release_io( ucell virt, ucell size ) +{ + OFMEM_TRACE("ofmem_release_io addr=" FMT_ucellx " size=" FMT_ucellx "\n", + virt, size); + + ofmem_t *ofmem = ofmem_arch_get_private(); + remove_range(virt, size, &ofmem->io_range); +} + /* release memory allocated by ofmem_claim - 6.3.2.4 */ void ofmem_release( ucell virt, ucell size ) {