From ff612b866f301686fc490d076a138eaa65d79d4e Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sat, 24 Feb 2018 16:01:13 +0100 Subject: ratp: implement generic command support The RATP implementation now allows executing generic commands with a binary interface: binary requests are received and binary responses are returned. Each command can define its own RATP request contents (e.g. to specify command-specific options) as well as its own RATP response contents (if any data is to be returned). Each command is associated with a pair of numeric unique request and response IDs, and for easy reference these IDs are maintained in the common ratp_bb header. Modules may override generic implemented commands or include their own new ones (as long as the numeric IDs introduced are unique). Signed-off-by: Aleksander Morgado Signed-off-by: Sascha Hauer --- arch/x86/lib/barebox.lds.S | 7 +++++++ arch/x86/mach-efi/elf_ia32_efi.lds.S | 5 +++++ arch/x86/mach-efi/elf_x86_64_efi.lds.S | 5 +++++ 3 files changed, 17 insertions(+) (limited to 'arch/x86') diff --git a/arch/x86/lib/barebox.lds.S b/arch/x86/lib/barebox.lds.S index 23d7546532..6ee9342f47 100644 --- a/arch/x86/lib/barebox.lds.S +++ b/arch/x86/lib/barebox.lds.S @@ -171,6 +171,13 @@ SECTIONS . = ALIGN(4); } > barebox + .barebox_ratp_cmd : AT ( LOADADDR(.got) + SIZEOF (.got) ) { + __barebox_ratp_cmd_start = .; + BAREBOX_RATP_CMDS + __barebox_ratp_cmd_end = .; + . = ALIGN(4); + } > barebox + .barebox_magicvars : AT ( LOADADDR(.barebox_cmd) + SIZEOF (.barebox_cmd) ) { __barebox_magicvar_start = .; BAREBOX_MAGICVARS diff --git a/arch/x86/mach-efi/elf_ia32_efi.lds.S b/arch/x86/mach-efi/elf_ia32_efi.lds.S index 69f43f5547..9477aa7d73 100644 --- a/arch/x86/mach-efi/elf_ia32_efi.lds.S +++ b/arch/x86/mach-efi/elf_ia32_efi.lds.S @@ -70,6 +70,11 @@ SECTIONS __barebox_cmd : { BAREBOX_CMDS } __barebox_cmd_end = .; + . = ALIGN(64); + __barebox_ratp_cmd_start = .; + __barebox_ratp_cmd : { BAREBOX_RATP_CMDS } + __barebox_ratp_cmd_end = .; + . = ALIGN(4096); .dynamic : { *(.dynamic) } . = ALIGN(4096); diff --git a/arch/x86/mach-efi/elf_x86_64_efi.lds.S b/arch/x86/mach-efi/elf_x86_64_efi.lds.S index 93d34d17ab..90b6b9f3f1 100644 --- a/arch/x86/mach-efi/elf_x86_64_efi.lds.S +++ b/arch/x86/mach-efi/elf_x86_64_efi.lds.S @@ -72,6 +72,11 @@ SECTIONS __barebox_cmd : { BAREBOX_CMDS } __barebox_cmd_end = .; + . = ALIGN(64); + __barebox_ratp_cmd_start = .; + __barebox_ratp_cmd : { BAREBOX_RATP_CMDS } + __barebox_ratp_cmd_end = .; + . = ALIGN(4096); .dynamic : { *(.dynamic) } . = ALIGN(4096); -- cgit v1.2.3