Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[pcbios] Support arbitrary splits of the e820 memory map
Allow for an arbitrary number of splits of the system memory map via
INT 15,e820.

Features of the new map-mangling algorithm include:

  Supports random access to e820 map entries.

  Requires only sequential access support from the underlying e820
  map, even if our caller uses random access.

  Empty regions will always be stripped.

  Always terminates with %ebx=0, even if the underlying map terminates
  with CF=1.

  Allows for an arbitrary number of hidden regions, with underlying
  regions split into as many subregions as necessary.

Total size increase to achieve this is 193 bytes.
  • Loading branch information
Michael Brown committed Aug 18, 2008
1 parent 9737095 commit 320b072
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 360 deletions.
4 changes: 2 additions & 2 deletions src/arch/i386/core/umalloc.c
Expand Up @@ -194,8 +194,8 @@ userptr_t urealloc ( userptr_t ptr, size_t new_size ) {

/* Collect any free blocks and update hidden memory region */
ecollect_free();
hide_region ( EXTMEM, user_to_phys ( bottom, -sizeof ( extmem ) ),
user_to_phys ( top, 0 ) );
hide_umalloc ( user_to_phys ( bottom, -sizeof ( extmem ) ),
user_to_phys ( top, 0 ) );

return ( new_size ? new : UNOWHERE );
}
Expand Down

0 comments on commit 320b072

Please sign in to comment.