following on from my previous post about testing ndiswrapper with the 64 bit
BCM43xx broadcom wireless driver.
the error doesnt come from read_exports() in load_pe_images that I first
thought. if read_exports() cant find the export data section (entitled .edata
which the broadcom driver doesnt have) it returns a success return value
anyway. I should debug code by testing on the machine rather than just read
the code :-)
load_pe_images() fails from fixup_reloc(). after testing it Ive found two
first fixup_reloc() attempts to find the .reloc section. get_section() is
pointed at the start of the section headers at an address 0x01d0 bytes after
the start of the image file. in fact from a hexdump of the driver file, the
section headers start at 0x1e0. inserting a filler member char fill in the
nt_header structure in pe_linker.h solves this.
second fixup_reloc() attempts to iterate though the sections to locate the
.reloc section header, but the iteration doesnt work. sect_hdr++ doesnt
point to the start of the next section header and the iteration simply points
to the same address (the first section header address which is the .text
section header). Ive had to change it to sect_hdr = (char *)sect_hdr +
sizeof(struct section_header). this seems to work and it finds the .reloc
section header (which is the last section header).
I then come across a kernel general protection error. I am trying to debug this
at the moment the kernel oops indicates it comes from the RVA2VA function.
earlier, I was testing this driver against version 0.12. for convenience, I
commented out the calls to fixup_reloc and fixup_import in load_pe_images().
it would happily load the driver and attempt to initialise the ndis device but
failed at the function pointer miniport->init. however if I do the same with
1.0rc2, it fails at a much earlier stage.
I will update the list as I go along.
From: Karl Vogel <karl.vogel@se...> - 2005-01-13 16:02:20
Frank Zago <fzago@...> wrote in news:41E6865E.10800
> Some changes have been made in the cvs treeto fix some of these problems.
Anything from before today, has no chance of working on amd64. The fixes
that went into cvs this morning are essential to make it work, but are
If you don't mind crashes, then try it out.. but don't expect miracles just
From: Lorenzo Milesi <lorenzo.milesi@gm...> - 2005-01-13 16:17:10
On Thu, 13 Jan 2005 15:55:00 +0000 (UTC), Karl Vogel
> Frank Zago <fzago@...> wrote in news:41E6865E.10800
> Anything from before today, has no chance of working on amd64. The fixes
> that went into cvs this morning are essential to make it work, but are
> still untested.
> If you don't mind crashes, then try it out.. but don't expect miracles just
> yet :)
i've downloaded CVS one or two hours ago. it loads the module but
doesn't create the interface.