Re: [PATCH 2/2] x86: add e820 descriptor attribute field

2013-03-01 Thread li guang
can we fix if it breaks anything?
I think there are sound reasons that
ACPI add these extended attributes.

在 2013-02-28四的 21:28 -0800,H. Peter Anvin写道:
> NAK in the extreme.  Not only does this break the bootloader protocol, but 
> there are systems in the field that break if you give e820 anything other 
> than a 20-byte buffer.
> 
> liguang  wrote:
> 
> >according to ACPI 5.0 Table 15-273
> >Address Range Descriptor Structure,
> >offset 20 is 32-bit field of Extended
> >Attributes for Address Range Descriptor Structure.
> >
> >Signed-off-by: liguang 
> >---
> > arch/x86/include/uapi/asm/e820.h |7 ++-
> > 1 files changed, 6 insertions(+), 1 deletions(-)
> >
> >diff --git a/arch/x86/include/uapi/asm/e820.h
> >b/arch/x86/include/uapi/asm/e820.h
> >index 2d400b1..eb87284 100644
> >--- a/arch/x86/include/uapi/asm/e820.h
> >+++ b/arch/x86/include/uapi/asm/e820.h
> >@@ -38,6 +38,10 @@
> > #define E820_TYPE_NVS   4
> > #define E820_TYPE_UNUSABLE  5
> > 
> >+#define E820_ATTRIB_NV 0x2
> >+#define E820_ATTRIB_SLOW_ACCESS 0x4
> >+#define E820_ATTRIB_ERR_LOG 0x8
> >+
> > 
> > /*
> >  * reserved RAM used by kernel itself
> >@@ -53,7 +57,8 @@ struct e820entry {
> > __u64 addr; /* start of memory segment */
> > __u64 size; /* size of memory segment */
> > __u32 type; /* type of memory segment */
> >-} __attribute__((packed));
> >+__u32 attrib;
> >+};
> > 
> > struct e820map {
> > __u32 nr_map;
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] x86: add e820 descriptor attribute field

2013-02-28 Thread H. Peter Anvin
NAK in the extreme.  Not only does this break the bootloader protocol, but 
there are systems in the field that break if you give e820 anything other than 
a 20-byte buffer.

liguang  wrote:

>according to ACPI 5.0 Table 15-273
>Address Range Descriptor Structure,
>offset 20 is 32-bit field of Extended
>Attributes for Address Range Descriptor Structure.
>
>Signed-off-by: liguang 
>---
> arch/x86/include/uapi/asm/e820.h |7 ++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
>diff --git a/arch/x86/include/uapi/asm/e820.h
>b/arch/x86/include/uapi/asm/e820.h
>index 2d400b1..eb87284 100644
>--- a/arch/x86/include/uapi/asm/e820.h
>+++ b/arch/x86/include/uapi/asm/e820.h
>@@ -38,6 +38,10 @@
> #define E820_TYPE_NVS 4
> #define E820_TYPE_UNUSABLE5
> 
>+#define E820_ATTRIB_NV 0x2
>+#define E820_ATTRIB_SLOW_ACCESS 0x4
>+#define E820_ATTRIB_ERR_LOG 0x8
>+
> 
> /*
>  * reserved RAM used by kernel itself
>@@ -53,7 +57,8 @@ struct e820entry {
>   __u64 addr; /* start of memory segment */
>   __u64 size; /* size of memory segment */
>   __u32 type; /* type of memory segment */
>-} __attribute__((packed));
>+  __u32 attrib;
>+};
> 
> struct e820map {
>   __u32 nr_map;

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] x86: add e820 descriptor attribute field

2013-02-28 Thread liguang
according to ACPI 5.0 Table 15-273
Address Range Descriptor Structure,
offset 20 is 32-bit field of Extended
Attributes for Address Range Descriptor Structure.

Signed-off-by: liguang 
---
 arch/x86/include/uapi/asm/e820.h |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/uapi/asm/e820.h b/arch/x86/include/uapi/asm/e820.h
index 2d400b1..eb87284 100644
--- a/arch/x86/include/uapi/asm/e820.h
+++ b/arch/x86/include/uapi/asm/e820.h
@@ -38,6 +38,10 @@
 #define E820_TYPE_NVS  4
 #define E820_TYPE_UNUSABLE 5
 
+#define E820_ATTRIB_NV 0x2
+#define E820_ATTRIB_SLOW_ACCESS 0x4
+#define E820_ATTRIB_ERR_LOG 0x8
+
 
 /*
  * reserved RAM used by kernel itself
@@ -53,7 +57,8 @@ struct e820entry {
__u64 addr; /* start of memory segment */
__u64 size; /* size of memory segment */
__u32 type; /* type of memory segment */
-} __attribute__((packed));
+   __u32 attrib;
+};
 
 struct e820map {
__u32 nr_map;
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/