diff mbox

e1000 fix: read access to some registers is missing.

Message ID 172731552.20091031182943@uni-ulm.de
State New
Headers show

Commit Message

Kay Ackermann Oct. 31, 2009, 5:29 p.m. UTC
While writing working on an e1000 driver for my university's OS I
noticed that some registers aren't readable in QEMU, but they should
be readable as stated in Intels Driver Developer Manual (and also
verified on real hardware).





Oh and is there any specific reason why Jumbo-Frames are limited to 4k instead of i.e. Alteon 9014 bytes?

Regards,
Kay Ackermann

Comments

Avi Kivity Nov. 1, 2009, 2:05 p.m. UTC | #1
On 10/31/2009 07:29 PM, Kay Ackermann wrote:
>
> While writing working on an e1000 driver for my university's OS I
>
> noticed that some registers aren't readable in QEMU, but they should
>
> be readable as stated in Intels Driver Developer Manual (and also
>
> verified on real hardware).
>
>
>
> diff --git a/hw/e1000.c b/hw/e1000.c
>
> index 028afd1..3987e70 100644
>
> --- a/hw/e1000.c
>
> +++ b/hw/e1000.c
>
> @@ -789,6 +789,8 @@ static uint32_t (*macreg_readops[])(E1000State *, 
> int) = {
>
>      getreg(MANC),        getreg(MDIC),        getreg(SWSM),       
>  getreg(STATUS),
>
>      getreg(TORL),        getreg(TOTL),        getreg(IMS),       
>  getreg(TCTL),
>
>      getreg(RDH),        getreg(RDT),        getreg(VET),       
>  getreg(ICS),
>
> +    getreg(TDBAL),        getreg(TDBAH),        getreg(RDBAH),       
>  getreg(RDBAL),
>
> +    getreg(TDLEN),        getreg(RDLEN),
>
>      [TOTH] = mac_read_clr8,        [TORH] = mac_read_clr8,       
>  [GPRC] = mac_read_clr4,
>
>      [GPTC] = mac_read_clr4,        [TPR] = mac_read_clr4,       
>  [TPT] = mac_read_clr4,
>
>
>
>
> Oh and is there any specific reason why Jumbo-Frames are limited to 4k 
> instead of i.e. Alteon 9014 bytes?
>
>
>

There used to be a 4K buffer somewhere in the path.  I think it's larger 
now.
diff mbox

Patch

diff --git a/hw/e1000.c b/hw/e1000.c
index 028afd1..3987e70 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -789,6 +789,8 @@  static uint32_t (*macreg_readops[])(E1000State *, int) = {
     getreg(MANC),	getreg(MDIC),	getreg(SWSM),	getreg(STATUS),
     getreg(TORL),	getreg(TOTL),	getreg(IMS),	getreg(TCTL),
     getreg(RDH),	getreg(RDT),	getreg(VET),	getreg(ICS),
+    getreg(TDBAL),	getreg(TDBAH),	getreg(RDBAH),	getreg(RDBAL),
+    getreg(TDLEN),	getreg(RDLEN),
 
     [TOTH] = mac_read_clr8,	[TORH] = mac_read_clr8,	[GPRC] = mac_read_clr4,
     [GPTC] = mac_read_clr4,	[TPR] = mac_read_clr4,	[TPT] = mac_read_clr4,