Revision: 17941
          http://sourceforge.net/p/edk2/code/17941
Author:   luobozhang
Date:     2015-07-14 04:02:35 +0000 (Tue, 14 Jul 2015)
Log Message:
-----------
NetworkPkg: Fix an error that the call function declared implicitly.

Use NetRandomInitSeed() instead of AsmReadTsc() to generate
a random seed.
Macro definition of EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE for EBC 
architecture.
Add some space to make codes more standard.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>
Reviewed-by: jiaxinwu <[email protected]>

Modified Paths:
--------------
    trunk/edk2/NetworkPkg/DnsDxe/DnsImpl.c
    trunk/edk2/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h

Modified: trunk/edk2/NetworkPkg/DnsDxe/DnsImpl.c
===================================================================
--- trunk/edk2/NetworkPkg/DnsDxe/DnsImpl.c      2015-07-14 03:41:44 UTC (rev 
17940)
+++ trunk/edk2/NetworkPkg/DnsDxe/DnsImpl.c      2015-07-14 04:02:35 UTC (rev 
17941)
@@ -1574,8 +1574,8 @@
   //
   // Fill header
   //
-  DnsHeader = (DNS_HEADER *)Frag.Bulk; 
-  DnsHeader->Identification = (UINT16)AsmReadTsc ();
+  DnsHeader = (DNS_HEADER *) Frag.Bulk; 
+  DnsHeader->Identification = (UINT16)NET_RANDOM (NetRandomInitSeed());
   DnsHeader->Flags.Uint16 = 0x0000;
   DnsHeader->Flags.Bits.RD = 1;
   DnsHeader->Flags.Bits.OpCode = DNS_FLAGS_OPCODE_STANDARD;
@@ -1585,12 +1585,12 @@
   DnsHeader->AuthorityNum = 0;
   DnsHeader->AditionalNum = 0;
 
-  DnsHeader->Identification = HTONS(DnsHeader->Identification);
-  DnsHeader->Flags.Uint16 = HTONS(DnsHeader->Flags.Uint16);
-  DnsHeader->QuestionsNum = HTONS(DnsHeader->QuestionsNum);
-  DnsHeader->AnswersNum = HTONS(DnsHeader->AnswersNum);
-  DnsHeader->AuthorityNum = HTONS(DnsHeader->AuthorityNum);
-  DnsHeader->AditionalNum = HTONS(DnsHeader->AditionalNum);
+  DnsHeader->Identification = HTONS (DnsHeader->Identification);
+  DnsHeader->Flags.Uint16 = HTONS (DnsHeader->Flags.Uint16);
+  DnsHeader->QuestionsNum = HTONS (DnsHeader->QuestionsNum);
+  DnsHeader->AnswersNum = HTONS (DnsHeader->AnswersNum);
+  DnsHeader->AuthorityNum = HTONS (DnsHeader->AuthorityNum);
+  DnsHeader->AditionalNum = HTONS (DnsHeader->AditionalNum);
 
   Frag.Len = sizeof (*DnsHeader);
 

Modified: trunk/edk2/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
===================================================================
--- trunk/edk2/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h   2015-07-14 03:41:44 UTC 
(rev 17940)
+++ trunk/edk2/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h   2015-07-14 04:02:35 UTC 
(rev 17941)
@@ -82,6 +82,8 @@
 #define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    0x0012
 #elif defined (MDE_CPU_AARCH64)
 #define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    0x0013
+#elif defined (MDE_CPU_EBC)
+#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    0x0011
 #endif
 
 /// DHCP offer types among HTTP boot.


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to