bd863e4112
Add header for pxe_boot()
Michael Brown
2007-01-13 17:23:44 +00:00
4b77061881
Pick up the return status code from the correct place now that we don't overwrite the parameter block until *after* the debug code.
Michael Brown
2007-01-13 16:55:57 +00:00
5817c9f114
When an UNDI API call fails, print everything there is to know about it.
Michael Brown
2007-01-13 16:53:55 +00:00
3b77c7aa1b
Hex dumps are now integrated into the DBG() framework.
Michael Brown
2007-01-13 16:49:38 +00:00
6a3c76c8e0
Always send EOI. We can't feasibly share interrupts (since we have no clue what the "previous" interrupt handler will do, which could range from "just an iret" to "disable the interrupt"), and that means that we have to take responsibility for ACKing all interrupts. Joy.
Michael Brown
2007-01-13 14:45:26 +00:00
86171c53f4
Damn Broadcom and their damned incorrect assumptions about x86 memory allocation.
Michael Brown
2007-01-13 01:48:12 +00:00
341c0b9cfb
Add HTTP test support
Michael Brown
2007-01-12 19:19:59 +00:00
497c3a5aad
Fixed HTTP
Michael Brown
2007-01-12 19:18:13 +00:00
369754f959
Whitespace fix
Michael Brown
2007-01-12 19:17:25 +00:00
63386f4455
Added ENOENT, since HTTP 404 translates to it
Michael Brown
2007-01-12 19:14:01 +00:00
ca3db0bf11
Added isspace() and made strtoul() accept whitespace, as per POSIX.
Michael Brown
2007-01-12 19:11:28 +00:00
83b7933f8a
Damn it; my lovely resilient scheme falls down when you have a protocol that switches from line-oriented to byte-oriented partway through, such as HTTP.
Michael Brown
2007-01-12 18:09:14 +00:00
ad22cccc09
No need to maintain a received byte count; we always fill in sequential order so we can just use buffer->fill.
Michael Brown
2007-01-12 17:16:46 +00:00
996b091b50
Added generic line-buffering code (a la stdio)
Michael Brown
2007-01-12 17:08:37 +00:00
bcd6ca3291
Place multiboot tables in base memory; at least some OSes won't see it if we don't.
Michael Brown
2007-01-12 16:25:05 +00:00
5c72d9c4e0
Print image physical location in registration message.
Michael Brown
2007-01-12 16:20:51 +00:00
0f29e0e46e
Ensure multiboot modules are in ascending order of memory start address, to work around OS bugs.
Michael Brown
2007-01-12 12:03:19 +00:00
53e948bba8
Fix the memory map.
Michael Brown
2007-01-12 11:38:04 +00:00
112d7f9d79
Code used for load buffer and multiboot image testing
Michael Brown
2007-01-12 10:12:11 +00:00
49fc8dcdc3
Use dhcp(), imgfetch() etc. to boot rather than dhcp_test().
Michael Brown
2007-01-12 10:08:27 +00:00
b45a9bfa2d
Added missing declaration.
Michael Brown
2007-01-12 10:07:56 +00:00
a6afbe762c
Make DEBUG=script echo the commands as they are executed
Michael Brown
2007-01-12 10:06:59 +00:00
9952df9b52
Add "dhcp" command
Michael Brown
2007-01-12 09:53:28 +00:00
e2c0055e23
Let ifmgmt.c take care of calling efree(), since it's the once which took out the contract to eventually call efree() when it called fetch().
Michael Brown
2007-01-12 09:46:10 +00:00
39ede8c7e8
Added dhcp() user-level command.
Michael Brown
2007-01-12 09:20:11 +00:00
67aedf34fa
Use systematic names for XXX_IMAGE.
Michael Brown
2007-01-12 09:00:48 +00:00
83559c668a
Don't print "<NULL>" when we use imgautoselect().
Michael Brown
2007-01-12 08:59:25 +00:00
2be2f3b205
Rearrange struct image to reflect usage of the fields
Michael Brown
2007-01-12 08:58:16 +00:00
eba3609e7f
Add debug message
Michael Brown
2007-01-12 08:57:51 +00:00
5162f30028
Ignore comment lines.
Michael Brown
2007-01-12 08:56:48 +00:00
48e0fc3447
API change: the raw image will no longer be (hypothetically) discarded after a call to load().
Michael Brown
2007-01-12 08:15:25 +00:00
6fdc6c81a6
Force probing of multiboot before ELF.
Michael Brown
2007-01-12 08:10:35 +00:00
475d6d1f7c
fetch() now knows nothing about struct image; it simply loads a file and returns the allocated buffer.
Michael Brown
2007-01-12 08:02:27 +00:00
2876197306
Allow "imgexec" with no arguments to boot the file that was loaded with "kernel".
Michael Brown
2007-01-12 07:32:46 +00:00
f135a37f30
Cleaner separation between imgXXX() functions and image_cmd.c
Michael Brown
2007-01-12 07:22:20 +00:00
742f242863
Add free_image
Michael Brown
2007-01-12 06:26:59 +00:00
9817f93094
Add basic "fetch" and "imgstat" commands.
Michael Brown
2007-01-12 06:05:27 +00:00
b9fea9cbac
Added IMAGE_LOADED flag and find_image()
Michael Brown
2007-01-12 06:03:02 +00:00
8b6eaf3c82
Be silent if there are no network interfaces
Michael Brown
2007-01-12 05:48:22 +00:00
e96041872e
Added missing declaration.
Michael Brown
2007-01-12 05:27:02 +00:00
9debfed07a
Place command-line inline, to save on memory allocation hassles.
Michael Brown
2007-01-12 05:26:19 +00:00
f15482d85f
Added basename() to make automatically naming images easier.
Michael Brown
2007-01-12 05:24:51 +00:00
29dadc5ec6
Build automatically expanding buffers from struct buffer and erealloc().
Michael Brown
2007-01-12 03:51:04 +00:00
77b7640af4
Fix the only bug (which was to use DBGC() in place of DBG()!) and add 4kB alignment.
Michael Brown
2007-01-12 03:28:03 +00:00
132a8fe49d
Quick and dirty test for emalloc()
Michael Brown
2007-01-12 03:27:05 +00:00
45ec9c907e
First version of an external memory allocator (not tested)
Michael Brown
2007-01-12 03:15:29 +00:00
1d313234b3
Rename copy_user() to memcpy_user(). Add memmove_user() and userptr_add().
Michael Brown
2007-01-12 03:14:15 +00:00
859da6bd32
Allow external code to update hidden memory regions.
Michael Brown
2007-01-12 03:13:04 +00:00
687c1e3227
Nothing (not even hidemem.c) uses this file!
Michael Brown
2007-01-12 02:45:46 +00:00
39a8ed827c
Long since obsoleted by arch/i386/scripts/i386.lds
Michael Brown
2007-01-12 02:43:10 +00:00
2e088d9afc
Obsoleted by arch/i386/interface/pxe/pxe_call.c
Michael Brown
2007-01-12 02:42:14 +00:00
f81bf3bc52
We *do* have a __data16_array after all!
Michael Brown
2007-01-12 02:37:47 +00:00
2c66588f3e
Add UNULL
Michael Brown
2007-01-12 01:40:12 +00:00
6c894c2a2e
Fix typo
Michael Brown
2007-01-12 01:37:38 +00:00
e4c6418ac0
We may be required to page-align modules, so let's make sure we catch it if we don't.
Michael Brown
2007-01-12 00:09:16 +00:00
7bf94b5ad6
Allow for named images.
Michael Brown
2007-01-11 23:45:18 +00:00
f59ad50504
Provide registration mechanism for loaded images, so that we can e.g. refer to them by name from the command line, or build them into a multiboot module list.
Michael Brown
2007-01-11 23:43:29 +00:00
79a399c05a
alloca() can be useful in some (limited) circumstances.
Michael Brown
2007-01-11 23:19:31 +00:00
f31d91bce5
Populate multiboot information structure before calling OS.
Michael Brown
2007-01-11 21:21:02 +00:00
ddbc60b5ae
Whoever put together the grub multiboot.h header is insane.
Michael Brown
2007-01-11 21:20:27 +00:00
c468c68661
Add command line that can be passed to executed images.
Michael Brown
2007-01-11 21:19:29 +00:00
200d92c76d
Avoid namespace clashes
Michael Brown
2007-01-11 19:42:26 +00:00
bcc98c78b8
Added fields present in the documentation but not in the header file.
Michael Brown
2007-01-11 19:41:13 +00:00
dc51af59a4
Capable of starting a multiboot kernel (albeit without the multiboot information table yet).
Michael Brown
2007-01-11 18:41:15 +00:00
9196e9069c
Add PHYS_CODE, for use as in __asm__ ( PHYS_CODE ( ... ) ), comparable to the REAL_CODE interface.
Michael Brown
2007-01-11 18:40:46 +00:00
d488a172eb
Capable of loading a multiboot image into memory
Michael Brown
2007-01-11 17:44:42 +00:00
7cf4a72389
Add placeholder elf_execute()
Michael Brown
2007-01-11 17:44:07 +00:00
819cd3f41c
Limit -ENOEXEC to mean "this is not in my format".
Michael Brown
2007-01-11 17:06:25 +00:00
6a03552381
Distinguish between ENOMEM (as representing a lack of internal memory as allocated by malloc()) versus all other errors, in particular ENOBUFS (representing a lack of external buffer space, e.g. in a device's TX queue or a user buffer).
Michael Brown
2007-01-11 16:30:21 +00:00
143e3b84a4
Downloaded from current grub CVS.
Michael Brown
2007-01-11 16:22:03 +00:00
c810baad37
Use generic "struct image" rather than "struct elf".
Michael Brown
2007-01-11 16:10:32 +00:00
c6c63d954d
Rename "image" field to "data", because "image->image" is just confusing.
Michael Brown
2007-01-11 16:07:30 +00:00
4fc9333159
Move include/image.h to include/gpxe/image.h
Michael Brown
2007-01-11 16:04:36 +00:00
d84ec0e5d5
Had this file lying around for ages; may as well check it in.
Michael Brown
2007-01-11 15:31:50 +00:00
91ac92bc86
Try image as ELF file first. (Don't yet actually try to execute it).
Michael Brown
2007-01-11 15:27:06 +00:00
3460860bef
Print informative error message when boot fails.
Michael Brown
2007-01-11 15:26:17 +00:00
230f16538f
Create include/gpxe/elf.h for the ELF bits that aren't part of the ELF standard and so don't belong in include/elf.h
Michael Brown
2007-01-11 15:25:07 +00:00
0010e10ef3
Update TFTP to use a struct buffer rather than a callback.
Michael Brown
2007-01-11 15:14:54 +00:00
d9204ef676
Use physical address in debug messages; they make more sense to read.
Michael Brown
2007-01-11 15:08:58 +00:00
7ad1c2eaa8
Removed the Etherboot-specific ELF-image code and replaced it with a generic ELF loader, to be used by the multiboot code.
Michael Brown
2007-01-11 14:44:03 +00:00
10980c12ee
Add image directory back in
Michael Brown
2007-01-11 14:43:15 +00:00
3634e705b7
Remove osloader.c and replace with a prep_segment() that uses userptr_t and get_memmap() in image/segment.c
Michael Brown
2007-01-11 14:32:26 +00:00
ceca6b185c
Added user_to_phys() and memset_user().
Michael Brown
2007-01-11 14:27:27 +00:00
c980cdd0aa
Move memmap.h out of arch/i386; it no longer contains anything architecture-dependent and is needed by the ELF code.
Michael Brown
2007-01-11 14:08:44 +00:00
c6a4055fae
Add phys_to_user() and copy_user().
Michael Brown
2007-01-11 14:01:20 +00:00
fbfed96965
buffer.c should be using copy_{to,from}_user, rather than copy_{to,from}_phys.
Michael Brown
2007-01-11 05:42:06 +00:00
037da9d840
I hate NULL pointer dereferences.
Michael Brown
2007-01-11 05:27:02 +00:00
03390f0cd6
Use pkb_pad() rather than doing it the dangerous way :)
Michael Brown
2007-01-11 05:26:16 +00:00
a3ed0cbbc7
Extract packet-padding login from rtl8139.c to a separate pkbpad.c file.
Michael Brown
2007-01-11 05:25:50 +00:00
6918cf9e9e
Change FTP to use a data buffer rather than a callback function.
Michael Brown
2007-01-11 04:51:20 +00:00
c0ef730ec4
Fix bug in buffer.c, add buffer mini-unit test.
Michael Brown
2007-01-11 04:46:41 +00:00
83fa318b86
Added strerror(0)=="No error", so that TCP protocols can use strerror(rc) in their closed() methods without producing "Error 0x0000" when the connection is closed normally.
Michael Brown
2007-01-11 04:01:31 +00:00
e2dcd05b67
Update buffer-handling code to enable expandable buffers.
Michael Brown
2007-01-11 03:50:47 +00:00
bb2024c6d6
Move include/buffer.h to include/gpxe/buffer.h
Michael Brown
2007-01-11 01:47:26 +00:00
de042993c0
Warn when net device on an active route is not open.
Michael Brown
2007-01-10 20:58:36 +00:00
d45c5e7ce7
Add "route" command (which currently only displays the routing table; it can't modify it).
Michael Brown
2007-01-10 20:51:14 +00:00
d9ba8f790b
Add route() function to display routing table.
Michael Brown
2007-01-10 20:38:20 +00:00
78ded6604a
Try booting from the "boot" network device first (i.e. the one which we were loaded from). The code to identify this device isn't present yet, but the code to act upon the knowledge is.
Michael Brown
2007-01-10 20:21:42 +00:00
1fa5cd0e2b
Add find_pci_netdev()
Michael Brown
2007-01-10 16:16:05 +00:00
fdc97499bf
Add device description fields to struct device.
Michael Brown
2007-01-10 15:27:48 +00:00