Hi To q1, I think the memory
contents should be (on Linux):
0 34
1 ef
2 cd
3 00
4 … To q2, If both of the i/o address
and i/o value are ints, I think the final value should be like these on Linux:
i/o value 0xdfef4523
i/o value 0x00000102 To q3, The large value should be
(on any system):
0x00AA36AB….F5 From:
kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of Dear all: While studying the kernel source code, I always
confused with the Endian Order. I have studied the article about Endian order on the
net. Usually they gave an example as below: A 4 byte LongInt 0xabcdefgh will be arranged in memory as follows: Base Address+0 gh Base Address+1 ef Base Address+2 cd Base Address+3 ab But what is the correct unit I should take to
interpret the content of memory? I purposely use data not 4-bytes alignment in the
following questions. Question 1: What does the memory arrangement look like as the
value is 0xcdef34? Will it be Base Address+0 34 Base Address+1 ef Base Address+2 cd Question 2: if the answer of Q1 is right and some document tells
me that offset 0 i/o address offset 3 i/o value and I got the memory content as Base Address+0 23 Base Address+1 45 Base Address+2 ef Base Address+3 df Base Address+4 02 Base Address+5 01 Does that mean the i/o address is 0xef4523 and i/o
value is 0x0102df? Question 3: If I got a big array which represents a large number
like below: static unsigned char n[] = "\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x "\x90\xEF\xA0\x0D\xF3\x77\x "\xAD\xB3\x00\xA0\x28\x5E\x53\x01\x93\x0E\x "\x "\xF5"; Should the value be 0xF Or this value will be different under different
machine even it is a c source code. Appreciate your help, |