diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-07-22 13:01:25 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-07-22 13:01:25 -0400 |
commit | d5eb656b72ecb848a8ee6f2325544562fac86ba8 (patch) | |
tree | 22f6d880831116542de150fdc5dcc7452f5d0179 | |
parent | b0c48fa752e102e4cff728e963a14c81f23a6022 (diff) | |
parent | a8641f9842da20ad9c80ad28db8c10cdaaddfd55 (diff) | |
download | syslinux-gpxeiso.tar.gz |
Merge branch 'master' into gpxeisogpxeiso
-rw-r--r-- | com32/include/sys/pci.h | 10 | ||||
-rw-r--r-- | com32/menu/background.c | 2 | ||||
-rw-r--r-- | com32/modules/ethersel.c | 30 | ||||
-rw-r--r-- | core/runkernel.inc | 21 |
4 files changed, 18 insertions, 45 deletions
diff --git a/com32/include/sys/pci.h b/com32/include/sys/pci.h index 3b07ae7c..adb25632 100644 --- a/com32/include/sys/pci.h +++ b/com32/include/sys/pci.h @@ -29,18 +29,18 @@ struct pci_device { struct pci_bus { uint16_t id; - struct pci_device *pci_device[MAX_PCI_DEVICES]; - uint8_t pci_device_count; + struct pci_device *pci_device[MAX_PCI_DEVICES * MAX_PCI_FUNC]; + uint32_t pci_device_count; }; struct pci_device_list { - struct pci_device pci_device[MAX_PCI_DEVICES]; - uint8_t count; + struct pci_device pci_device[MAX_PCI_BUSES * MAX_PCI_DEVICES * MAX_PCI_FUNC]; + uint32_t count; }; struct pci_bus_list { struct pci_bus pci_bus[MAX_PCI_BUSES]; - uint8_t count; + uint32_t count; }; struct match { diff --git a/com32/menu/background.c b/com32/menu/background.c index 49839cdc..fa034418 100644 --- a/com32/menu/background.c +++ b/com32/menu/background.c @@ -18,7 +18,7 @@ const char *current_background = NULL; void set_background(const char *new_background) { - if (!current_background || + if (!current_background || !new_background || strcmp(current_background, new_background)) { draw_background(new_background); current_background = new_background; diff --git a/com32/modules/ethersel.c b/com32/modules/ethersel.c index 64c2ceb3..d200d627 100644 --- a/com32/modules/ethersel.c +++ b/com32/modules/ethersel.c @@ -35,6 +35,8 @@ #include <console.h> #include <sys/pci.h> #include <com32.h> +#include <syslinux/boot.h> +#include <syslinux/config.h> #ifdef DEBUG # define dprintf printf @@ -42,17 +44,6 @@ # define dprintf(...) ((void)0) #endif -static const char * -get_config(void) -{ - static com32sys_t r; - - r.eax.w[0] = 0x000E; - __intcall(0x22, &r, &r); - - return MK_PTR(r.es, r.ebx.w[0]); -} - static char * skipspace(char *p) { @@ -139,7 +130,7 @@ parse_config(const char *filename) struct match *m; if ( !filename ) - filename = get_config(); + filename = syslinux_config_file(); f = fopen(filename, "r"); if ( !f ) @@ -198,19 +189,6 @@ parse_config(const char *filename) return list; } -static void __attribute__((noreturn)) -execute(const char *cmdline) -{ - static com32sys_t ireg; - - strcpy(__com32.cs_bounce, cmdline); - ireg.eax.w[0] = 0x0003; /* Run command */ - ireg.ebx.w[0] = OFFS(__com32.cs_bounce); - ireg.es = SEG(__com32.cs_bounce); - __intcall(0x22, &ireg, NULL); - exit(255); /* Shouldn't return */ -} - int main(int argc, char *argv[]) { struct match *list, *match; @@ -225,7 +203,7 @@ int main(int argc, char *argv[]) match = find_pci_device(&pci_device_list,list); if ( match ) - execute(match->filename); + syslinux_run_command(match->filename); /* On error, return to the command line */ fputs("Error: no recognized network card found!\n", stderr); diff --git a/core/runkernel.inc b/core/runkernel.inc index 4d627787..143920d0 100644 --- a/core/runkernel.inc +++ b/core/runkernel.inc @@ -216,13 +216,6 @@ new_kernel: mov al,[es:su_loadflags] mov [LoadFlags],al - ; Cap the ramdisk memory range if appropriate - mov eax,[RamdiskMax] - cmp eax,[MyHighMemSize] - ja .ok - mov [MyHighMemSize],eax -.ok: - any_kernel: ; @@ -277,6 +270,7 @@ high_load_done: ; if they see protected-mode kernel data after the setup sectors, so ; clear that memory. ; + push di mov di,[SetupSecs] shl di,9 xor eax,eax @@ -284,6 +278,7 @@ high_load_done: sub cx,di shr cx,2 rep stosd + pop di ; ; Now see if we have an initial RAMdisk; if so, do requisite computation @@ -291,6 +286,12 @@ high_load_done: ; if we tried to load initrd using an old kernel ; load_initrd: + ; Cap the ramdisk memory range if appropriate + mov eax,[RamdiskMax] + cmp eax,[MyHighMemSize] + ja .ok + mov [MyHighMemSize],eax +.ok: xor eax,eax cmp [InitRDPtr],ax jz .noinitrd @@ -598,12 +599,6 @@ loadinitrd: mov si,crlf_msg jmp abort_load -no_high_mem: ; Error routine - mov si,err_nohighmem - jmp abort_load - - ret - section .data crlfloading_msg db CR, LF loading_msg db 'Loading ', 0 |