Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cf8ad33 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-olpc-for-linus' of...

Merge branch 'x86-olpc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-olpc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, olpc: Constify an olpc_ofw() arg
  x86, olpc: Use pr_debug() for EC commands
  x86, olpc: Add comment about implicit optimization barrier
  x86, olpc: Add support for calling into OpenFirmware
parents 66cd55d2 54e5bc02
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ Offset Proto Name Meaning
080/010	ALL	hd0_info	hd0 disk parameter, OBSOLETE!!
090/010	ALL	hd1_info	hd1 disk parameter, OBSOLETE!!
0A0/010	ALL	sys_desc_table	System description table (struct sys_desc_table)
0B0/010	ALL	olpc_ofw_header	OLPC's OpenFirmware CIF and friends
140/080	ALL	edid_info	Video mode setup (struct edid_info)
1C0/020	ALL	efi_info	EFI 32 information (struct efi_info)
1E0/004	ALL	alk_mem_k	Alternative mem check, in KB
+9 −0
Original line number Diff line number Diff line
@@ -2060,6 +2060,15 @@ config OLPC
	  Add support for detecting the unique features of the OLPC
	  XO hardware.

config OLPC_OPENFIRMWARE
	bool "Support for OLPC's Open Firmware"
	depends on !X86_64 && !X86_PAE
	default y if OLPC
	help
	  This option adds support for the implementation of Open Firmware
	  that is used on the OLPC XO-1 Children's Machine.
	  If unsure, say N here.

endif # X86_32

config K8_NB
+10 −1
Original line number Diff line number Diff line
@@ -70,6 +70,14 @@ struct sys_desc_table {
	__u8  table[14];
};

/* Gleaned from OFW's set-parameters in cpu/x86/pc/linux.fth */
struct olpc_ofw_header {
	__u32 ofw_magic;	/* OFW signature */
	__u32 ofw_version;
	__u32 cif_handler;	/* callback into OFW */
	__u32 irq_desc_table;
} __attribute__((packed));

struct efi_info {
	__u32 efi_loader_signature;
	__u32 efi_systab;
@@ -92,7 +100,8 @@ struct boot_params {
	__u8  hd0_info[16];	/* obsolete! */		/* 0x080 */
	__u8  hd1_info[16];	/* obsolete! */		/* 0x090 */
	struct sys_desc_table sys_desc_table;		/* 0x0a0 */
	__u8  _pad4[144];				/* 0x0b0 */
	struct olpc_ofw_header olpc_ofw_header;		/* 0x0b0 */
	__u8  _pad4[128];				/* 0x0c0 */
	struct edid_info edid_info;			/* 0x140 */
	struct efi_info efi_info;			/* 0x1c0 */
	__u32 alt_mem_k;				/* 0x1e0 */
+31 −0
Original line number Diff line number Diff line
#ifndef _ASM_X86_OLPC_OFW_H
#define _ASM_X86_OLPC_OFW_H

/* index into the page table containing the entry OFW occupies */
#define OLPC_OFW_PDE_NR 1022

#define OLPC_OFW_SIG 0x2057464F	/* aka "OFW " */

#ifdef CONFIG_OLPC_OPENFIRMWARE

/* run an OFW command by calling into the firmware */
#define olpc_ofw(name, args, res) \
	__olpc_ofw((name), ARRAY_SIZE(args), args, ARRAY_SIZE(res), res)

extern int __olpc_ofw(const char *name, int nr_args, const void **args, int nr_res,
		void **res);

/* determine whether OFW is available and lives in the proper memory */
extern void olpc_ofw_detect(void);

/* install OFW's pde permanently into the kernel's pgtable */
extern void setup_olpc_ofw_pgd(void);

#else /* !CONFIG_OLPC_OPENFIRMWARE */

static inline void olpc_ofw_detect(void) { }
static inline void setup_olpc_ofw_pgd(void) { }

#endif /* !CONFIG_OLPC_OPENFIRMWARE */

#endif /* _ASM_X86_OLPC_OFW_H */
+1 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ obj-$(CONFIG_SCx200) += scx200.o
scx200-y			+= scx200_32.o

obj-$(CONFIG_OLPC)		+= olpc.o
obj-$(CONFIG_OLPC_OPENFIRMWARE)	+= olpc_ofw.o
obj-$(CONFIG_X86_MRST)		+= mrst.o

microcode-y				:= microcode_core.o
Loading