Michael Brown
c42a384709
Moved most buffer debug messages to DBG2.
Make expand_buffer() a non-inline function, so that we can add debug
messages.
Expandable buffers now don't *always* round up to the next power of two.
This allows e.g. loading a 137MB ISO image on a machine with only 256MB
RAM...
17 gadus atpakaļ
Michael Brown
c8b3e969a0
Allow buffers to be pre-expanded on demand.
17 gadus atpakaļ
Michael Brown
d9204ef676
Use physical address in debug messages; they make more sense to read.
17 gadus atpakaļ
Michael Brown
fbfed96965
buffer.c should be using copy_{to,from}_user, rather than
copy_{to,from}_phys.
17 gadus atpakaļ
Michael Brown
c0ef730ec4
Fix bug in buffer.c, add buffer mini-unit test.
17 gadus atpakaļ
Michael Brown
e2dcd05b67
Update buffer-handling code to enable expandable buffers.
17 gadus atpakaļ
Michael Brown
bb2024c6d6
Move include/buffer.h to include/gpxe/buffer.h
17 gadus atpakaļ
Michael Brown
88e38fa148
We don't actually have a stdio.h header file. Our printf() functions are
defined in vsprintf.h. (This may change, since vsprintf.h is a
non-standard name, but for now it's the one to use.)
There should be no need to include vsprintf.h just for DBG() statements,
since include/compiler.h forces it in for a debug build anyway.
18 gadus atpakaļ
Marty Connor
1da4faa896
include stdio.h to suppress printf warning, general warnings fixups
18 gadus atpakaļ
Michael Brown
af23ff8a24
Assertions are now handled via the POSIX-like <assert.h>.
18 gadus atpakaļ
Michael Brown
df9cbc23cc
Added documentation and ASSERT() statements.
19 gadus atpakaļ
Michael Brown
33dbdda28e
Allow data blocks to be less than sizeof ( struct buffer_free_block ) in
size. (The restriction on the size of free blocks remains.)
19 gadus atpakaļ
Michael Brown
0e494614b5
Some versions of doxygen seem to object to "@ret None" or similar.
19 gadus atpakaļ
Michael Brown
2ddbac101e
Move API docs to buffer.h, implementation to buffer.c.
19 gadus atpakaļ
Michael Brown
eff1cd867b
errno.h now required in order to compile.
19 gadus atpakaļ
Michael Brown
e911a74724
More documentation
19 gadus atpakaļ
Michael Brown
a2915ad06d
Added preliminary doxygen documentation
19 gadus atpakaļ
Michael Brown
40c7b127aa
Added const to fill_buffer
19 gadus atpakaļ
Michael Brown
73429d6da1
Make "struct buffer"s reusable between sessions.
19 gadus atpakaļ
Michael Brown
bab2924e89
Return -1 to indicate buffer overflow. Allow buffer fill level to be read
easily from struct buffer.
19 gadus atpakaļ
Michael Brown
a89651f3bb
Added debugging
19 gadus atpakaļ
Michael Brown
b2869ed6b8
Added explanatory comment.
19 gadus atpakaļ
Michael Brown
e75b7480d0
Modified to use physical addresses, and to not assume that we can directly
refer to data outside of our data or stack segments.
19 gadus atpakaļ
Michael Brown
ef05a27f25
Start of an implementation using doubly-linked lists and virtual
addresses. This will have to be reworked to use physical addresses thanks
to the PXE spec.
19 gadus atpakaļ