Re: python dependencies Ubuntu 15.04
Hello, just a wild guess: Which python Version is default on Ubuntu? Most distributions use python2 as default. I know that e.g. Arch uses python3. Just try a python --version to find out. Kind regards Christian Mauderer Am 12.08.2015 um 10:38 schrieb punit vara: sudo apt-get install python-all-dev I have done this .Still python error. Any help will be appreciated. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel -- embedded brains GmbH Christian Mauderer Dornierstr. 4 D-82178 Puchheim Germany email: christian.maude...@embedded-brains.de Phone: +49-89-18 94 741 - 18 Fax: +49-89-18 94 741 - 08 PGP: Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Protected and Unprotected operations on Chain_control
Hi, For operations related to manipulation of Chain_Node we have two modes for that: protected and unprotected. In protected access to chain we guard the operation by disabling the interrupts while in unprotected we don't guard it. Is it that we don't disable interrupts in unprotected mode because we are sure that ISR will not affect the operation and with protected ISR may affect the operation so we guard operation against it. When is protected and unprotected used in respect with the context? Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Protected and Unprotected operations on Chain_control
thread dispatch occurs due to an interrupt. if interrupts are disabled, then no dispatch. On Wed, Aug 12, 2015 at 2:23 PM, Saurabh Gadia ga...@usc.edu wrote: Hi, #define _ISR_Disable( _level ) \ do { \ _CPU_ISR_Disable( _level ); \ _Assert( _Debug_Is_owner_of_giant() ); \ RTEMS_COMPILER_MEMORY_BARRIER(); \ } while (0) the above macro has description: @brief Disables interrupts on this processor. * * This macro disables all interrupts on this processor so that a critical * section of code is protected from concurrent access by interrupts of this * processor. Disabling of interrupts disables thread dispatching on the * processor as well. * * On SMP configurations other processors can enter such sections if not * protected by other means. * * @param[out] _level The argument @a _level will contain the previous * interrupt mask level. */ And : #define _ISR_Disable_without_giant( _level ) \ do { \ _CPU_ISR_Disable( _level ); \ RTEMS_COMPILER_MEMORY_BARRIER(); \ } while (0) The above lock is acquired for SMP. But how are both macros different. With former Macro it disables all interrupts as level is highest but how does it ensure thread_dispatch_disable? Thanks, Saurabh Gadia On Wed, Aug 12, 2015 at 9:52 AM, Gedare Bloom ged...@gwu.edu wrote: On Wed, Aug 12, 2015 at 11:48 AM, Saurabh Gadia ga...@usc.edu wrote: Hi, For operations related to manipulation of Chain_Node we have two modes for that: protected and unprotected. In protected access to chain we guard the operation by disabling the interrupts while in unprotected we don't guard it. Is it that we don't disable interrupts in unprotected mode because we are sure that ISR will not affect the operation and with protected ISR may affect the operation so we guard operation against it. When is protected and unprotected used in respect with the context? Correct. unprotected means something else has already ensured mutual exclusion. Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Fwd: SMP support for Raspberry Pi 2
Hi, It would be great if somebody can help here. [1] How are the mailbox registers available for each core of Pi2 to be used. [2] Another thing is that I don't know which registers of Pi 1 are available for Pi2 as well. The ones in this link https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2836/QA7_rev3.4.pdf , are quite different from the ones for Pi 1. [3] Can the same mailbox interface as Pi1 be used? Thanks. On Wed, Aug 12, 2015 at 1:29 AM, Joel Sherrill joel.sherr...@oarcorp.com wrote: On 8/11/2015 2:06 PM, Rohini Kulkarni wrote: Hi, I would have to register the related mailbox interrupt and associate it with a handler that should be same as _SMP_Inter_processor_interrupt_handler(). Am I right? That sounds correct. From where can I get a reference of how to do this? I would look at the Xilinx code that registers interrupts. The API should be the same. Also the clock driver, etc. The actual handler and IRQ number will vary. On 11 Aug 2015 00:41, Joel Sherrill joel.sherr...@oarcorp.com mailto: joel.sherr...@oarcorp.com wrote: The source for the CPU supplement is in doc/cpu_supplement in the RTEMS tree. I do not know when the latest online was built so reading it there is probably safest. To build it, you will likely have to install some texinfo and texlive tools. cd $r/doc ../bootstrap cd ../.. mkdir b-doc cd b-doc $r/doc/configure --enable-maintainer-mode \ --prefix=DIRECTORY make make install That should be similar to how it is built. --joel On 8/10/2015 1:35 PM, Rohini Kulkarni wrote: The documentation that Sebastian was referring to. On Tue, Jul 28, 2015 at 12:24 PM, Sebastian Huber sebastian.hu...@embedded-brains.de mailto: sebastian.hu...@embedded-brains.de mailto: sebastian.hu...@embedded-brains.de mailto: sebastian.hu...@embedded-brains.de wrote: Hello Rohini, please use the devel list. On 28/07/15 07:41, Rohini Kulkarni wrote: Hi, I wish to understand where the interprocessor interrupts are used during the boot process. During final initialization of SMP I can see rtems_interrupt_handler_install( ARM_GIC_IRQ_SGI_0, IPI, RTEMS_INTERRUPT_UNIQUE, bsp_inter_processor_interrupt, NULL ); Raspberry Pi 2 does not have the generic interrupt controller. Interrupt routing will have to be handled differently. So I wish to understand how/ where it is used. I suppose this might be the problem. Sorry, that the documentation is so scattered. I think we should move everything into the CPU Architecture Supplement. It would be nice if you can help to improve the documentation since you have a different view point. What is the CPU Architecture Supplement? You must install the IPI during the system initialization. It is raised via the _CPU_SMP_Send_interrupt() function, for an example see arm-a9mpcore-smp.c. Thanks. On Wed, Jul 22, 2015 at 7:08 PM, Rohini Kulkarni krohini1...@gmail.com mailto:krohini1...@gmail.com mailto: krohini1...@gmail.com mailto:krohini1...@gmail.com mailto: krohini1...@gmail.com mailto:krohini1...@gmail.com mailto: krohini1...@gmail.com mailto:krohini1...@gmail.com wrote: Ok. Qemu suggestion seems helpful for the cache configuration issue though. I am trying with Pi 1. Thanks. On 22 Jul 2015 18:59, Sebastian Huber sebastian.hu...@embedded-brains.de mailto: sebastian.hu...@embedded-brains.de mailto: sebastian.hu...@embedded-brains.de mailto: sebastian.hu...@embedded-brains.de mailto:sebastian.hu...@embedded-brains.de mailto: sebastian.hu...@embedded-brains.de mailto: sebastian.hu...@embedded-brains.de mailto: sebastian.hu...@embedded-brains.de wrote: Sorry, I cannot help you here since I never worked with a Raspberry Pi. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de mailto:sebastian.hu...@embedded-brains.de mailto: sebastian.hu...@embedded-brains.de mailto: sebastian.hu...@embedded-brains.de mailto:sebastian.hu...@embedded-brains.de mailto:sebastian.hu...@embedded-brains.de mailto: sebastian.hu...@embedded-brains.de mailto:
[PATCH 5/6] add video outch support for rpi bsp
From: YANG Qiao yangqiao0...@me.com --- c/src/lib/libbsp/arm/raspberrypi/Makefile.am |1 + .../lib/libbsp/arm/raspberrypi/console/font_data.h | 4639 c/src/lib/libbsp/arm/raspberrypi/console/outch.c | 405 ++ c/src/lib/libbsp/arm/raspberrypi/include/bsp.h |3 + .../lib/libbsp/arm/raspberrypi/startup/bspstart.c |2 + .../libbsp/arm/raspberrypi/startup/bspstarthooks.c |1 + 6 files changed, 5051 insertions(+) create mode 100644 c/src/lib/libbsp/arm/raspberrypi/console/font_data.h create mode 100644 c/src/lib/libbsp/arm/raspberrypi/console/outch.c diff --git a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am index b4853a6..65cc0c0 100644 --- a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am +++ b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am @@ -116,6 +116,7 @@ libbsp_a_SOURCES += ../../shared/console_write.c libbsp_a_SOURCES += console/console-config.c libbsp_a_SOURCES += console/usart.c libbsp_a_SOURCES += console/fb.c +libbsp_a_SOURCES += console/outch.c # clock libbsp_a_SOURCES += clock/clockdrv.c ../../../shared/clockdrv_shell.h diff --git a/c/src/lib/libbsp/arm/raspberrypi/console/font_data.h b/c/src/lib/libbsp/arm/raspberrypi/console/font_data.h new file mode 100644 index 000..1f473e5 --- /dev/null +++ b/c/src/lib/libbsp/arm/raspberrypi/console/font_data.h @@ -0,0 +1,4639 @@ +/** + * @file + * + * @ingroup raspberrypi + * + * @brief graphic text console font file + * + */ +/* + * Copyright (c) 2015 Yang Qiao + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * + * http://www.rtems.org/license/LICENSE + * + */ + +#ifndef LIBBSP_ARM_RASPBERRYPI_FONT_DATA_H +#define LIBBSP_ARM_RASPBERRYPI_FONT_DATA_H + +#define RPI_FONT_CHARS 256 +#define RPI_FONT_WIDTH 8 +#define RPI_FONT_HEIGHT 16 +#define RPI_FONT_SIZE (RPI_FONT_CHARS * RPI_FONT_HEIGHT) + +static unsigned char rpi_font[RPI_FONT_SIZE] = { + + /* 0 0x00 '^@' */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + + /* 1 0x01 '^A' */ + 0x00, /* */ + 0x00, /* */ + 0x7e, /* 0110 */ + 0x81, /* 1001 */ + 0xa5, /* 10100101 */ + 0x81, /* 1001 */ + 0x81, /* 1001 */ + 0xbd, /* 1001 */ + 0x99, /* 10011001 */ + 0x81, /* 1001 */ + 0x81, /* 1001 */ + 0x7e, /* 0110 */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + + /* 2 0x02 '^B' */ + 0x00, /* */ + 0x00, /* */ + 0x7e, /* 0110 */ + 0xff, /* */ + 0xdb, /* 11011011 */ + 0xff, /* */ + 0xff, /* */ + 0xc3, /* 1111 */ + 0xe7, /* 11100111 */ + 0xff, /* */ + 0xff, /* */ + 0x7e, /* 0110 */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + + /* 3 0x03 '^C' */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x6c, /* 01101100 */ + 0xfe, /* 1110 */ + 0xfe, /* 1110 */ + 0xfe, /* 1110 */ + 0xfe, /* 1110 */ + 0x7c, /* 0100 */ + 0x38, /* 00111000 */ + 0x10, /* 0001 */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + + /* 4 0x04 '^D' */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x10, /* 0001 */ + 0x38, /* 00111000 */ + 0x7c, /* 0100 */ + 0xfe, /* 1110 */ + 0x7c, /* 0100 */ + 0x38, /* 00111000 */ + 0x10, /* 0001 */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + + /* 5 0x05 '^E' */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x18, /* 00011000 */ + 0x3c, /* 0000 */ + 0x3c, /* 0000 */ + 0xe7, /* 11100111 */ + 0xe7, /* 11100111 */ + 0xe7, /* 11100111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 0000 */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + + /* 6 0x06 '^F' */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x18, /* 00011000 */ + 0x3c, /* 0000 */ + 0x7e, /* 0110 */ + 0xff, /* */ + 0xff, /* */ + 0x7e, /* 0110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 0000 */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + + /* 7 0x07 '^G' */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /* */ + 0x00, /*
[PATCH 1/6] add mailbox support for rpi bsp
From: YANG Qiao yangqiao0...@me.com --- c/src/lib/libbsp/arm/raspberrypi/Makefile.am | 4 ++ c/src/lib/libbsp/arm/raspberrypi/include/mailbox.h | 32 + .../libbsp/arm/raspberrypi/include/raspberrypi.h | 49 +++ c/src/lib/libbsp/arm/raspberrypi/misc/mailbox.c| 56 ++ c/src/lib/libbsp/arm/raspberrypi/preinstall.am | 4 ++ 5 files changed, 145 insertions(+) create mode 100644 c/src/lib/libbsp/arm/raspberrypi/include/mailbox.h create mode 100644 c/src/lib/libbsp/arm/raspberrypi/misc/mailbox.c diff --git a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am index 03be711..e1398bb 100644 --- a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am +++ b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am @@ -45,6 +45,7 @@ include_bsp_HEADERS += include/mmu.h include_bsp_HEADERS += include/usart.h include_bsp_HEADERS += include/raspberrypi.h include_bsp_HEADERS += include/rpi-gpio.h +include_bsp_HEADERS += include/mailbox.h include_libcpu_HEADERS = ../../../libcpu/arm/shared/include/cache_.h \ ../../../libcpu/arm/shared/include/arm-cp15.h @@ -128,6 +129,9 @@ libbsp_a_SOURCES += gpio/rpi-gpio.c # I2C +# Mailbox +libbsp_a_SOURCES += misc/mailbox.c + # Cache libbsp_a_SOURCES += ../../../libcpu/shared/src/cache_manager.c libbsp_a_SOURCES += ../../../libcpu/arm/shared/include/cache_.h diff --git a/c/src/lib/libbsp/arm/raspberrypi/include/mailbox.h b/c/src/lib/libbsp/arm/raspberrypi/include/mailbox.h new file mode 100644 index 000..e6cb0f8 --- /dev/null +++ b/c/src/lib/libbsp/arm/raspberrypi/include/mailbox.h @@ -0,0 +1,32 @@ +/** + * @file + * + * @ingroup raspberrypi + * + * @brief mailbox support. + */ +/* + * Copyright (c) 2015 Yang Qiao + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * + * http://www.rtems.org/license/LICENSE + * + */ + +#ifndef LIBBSP_ARM_RASPBERRYPI_MAILBOX_H +#define LIBBSP_ARM_RASPBERRYPI_MAILBOX_H + +#ifdef __cplusplus +extern C { +#endif /* __cplusplus */ + +extern unsigned int raspberrypi_mailbox_read(unsigned int channel); +extern void raspberrypi_mailbox_write(unsigned int channel, unsigned int data); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* LIBBSP_ARM_RASPBERRYPI_MAILBOX_H */ diff --git a/c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h b/c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h index ddcd4ff..ef7a061 100644 --- a/c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h +++ b/c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h @@ -7,6 +7,7 @@ */ /* + * Copyright (c) 2015 Yang Qiao * Copyright (c) 2014 Andre Marques andre.lousa.marques at gmail.com * Copyright (c) 2013 Alan Cudmore. * @@ -272,6 +273,54 @@ /** @} */ +/** +* @name Mailbox Registers +* +* @{ +*/ + +#define BCM2835_MBOX_BASE (RPI_PERIPHERAL_BASE+0xB880) + +#define BCM2835_MBOX_PEEK (BCM2835_MBOX_BASE+0x10) +#define BCM2835_MBOX_READ (BCM2835_MBOX_BASE+0x00) +#define BCM2835_MBOX_WRITE (BCM2835_MBOX_BASE+0x20) +#define BCM2835_MBOX_STATUS (BCM2835_MBOX_BASE+0x18) +#define BCM2835_MBOX_SENDER (BCM2835_MBOX_BASE+0x14) +#define BCM2835_MBOX_CONFIG (BCM2835_MBOX_BASE+0x1C) + +#define BCM2835_MBOX_FULL (BCM2835_MBOX_BASE+0x8000) +#define BCM2835_MBOX_EMPTY (BCM2835_MBOX_BASE+0x4000) + +/** @} */ + +/** +* @name Mailbox Channels +* +* @{ +*/ + +/* Power Manager channel */ +#define BCM2835_MBOX_CHANNEL_PM 0 +/* Framebuffer channel */ +#define BCM2835_MBOX_CHANNEL_FB 1 + /* Virtual UART channel */ +#define BCM2835_MBOX_CHANNEL_VUART 2 + /* VCHIQ channel */ +#define BCM2835_MBOX_CHANNEL_VCHIQ 3 + /* LEDs channel */ +#define BCM2835_MBOX_CHANNEL_LED4 + /* Button channel */ +#define BCM2835_MBOX_CHANNEL_BUTTON 5 + /* Touch screen channel */ +#define BCM2835_MBOX_CHANNEL_TOUCHS 6 +/* Property tags (ARM - VC) channel */ +#define BCM2835_MBOX_CHANNEL_PROP_AVC 8 + /* Property tags (VC - ARM) channel */ +#define BCM2835_MBOX_CHANNEL_PROP_VCA 9 + +/** @} */ + + /** @} */ #endif /* LIBBSP_ARM_RASPBERRYPI_RASPBERRYPI_H */ diff --git a/c/src/lib/libbsp/arm/raspberrypi/misc/mailbox.c b/c/src/lib/libbsp/arm/raspberrypi/misc/mailbox.c new file mode 100644 index 000..8ec730a --- /dev/null +++ b/c/src/lib/libbsp/arm/raspberrypi/misc/mailbox.c @@ -0,0 +1,56 @@ +/** + * @file + * + * @ingroup raspberrypi + * + * @brief mailbox support. + */ +/* + * Copyright (c) 2015 Yang Qiao + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * + * http://www.rtems.org/license/LICENSE + * + */ + +#include stdint.h +#include stdbool.h +#include bsp/raspberrypi.h +#include bsp/mailbox.h + +#define BCM2835_MBOX_DATA_MASK(data) (data 0xFFF0U) +#define BCM2835_MBOX_CHANNEL_MASK(data) (data 0xFU) + +static inline bool bcm2835_mailbox_is_empty() +{ + return
[PATCH 2/6] add vc support for rpi bsp
From: YANG Qiao yangqiao0...@me.com --- c/src/lib/libbsp/arm/raspberrypi/Makefile.am | 4 + c/src/lib/libbsp/arm/raspberrypi/include/vc.h | 140 +++ c/src/lib/libbsp/arm/raspberrypi/misc/vc.c | 248 c/src/lib/libbsp/arm/raspberrypi/misc/vc_defines.h | 436 + c/src/lib/libbsp/arm/raspberrypi/preinstall.am | 4 + 5 files changed, 832 insertions(+) create mode 100644 c/src/lib/libbsp/arm/raspberrypi/include/vc.h create mode 100644 c/src/lib/libbsp/arm/raspberrypi/misc/vc.c create mode 100644 c/src/lib/libbsp/arm/raspberrypi/misc/vc_defines.h diff --git a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am index e1398bb..3593e60 100644 --- a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am +++ b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am @@ -46,6 +46,7 @@ include_bsp_HEADERS += include/usart.h include_bsp_HEADERS += include/raspberrypi.h include_bsp_HEADERS += include/rpi-gpio.h include_bsp_HEADERS += include/mailbox.h +include_bsp_HEADERS += include/vc.h include_libcpu_HEADERS = ../../../libcpu/arm/shared/include/cache_.h \ ../../../libcpu/arm/shared/include/arm-cp15.h @@ -132,6 +133,9 @@ libbsp_a_SOURCES += gpio/rpi-gpio.c # Mailbox libbsp_a_SOURCES += misc/mailbox.c +# VideoCore +libbsp_a_SOURCES += misc/vc.c + # Cache libbsp_a_SOURCES += ../../../libcpu/shared/src/cache_manager.c libbsp_a_SOURCES += ../../../libcpu/arm/shared/include/cache_.h diff --git a/c/src/lib/libbsp/arm/raspberrypi/include/vc.h b/c/src/lib/libbsp/arm/raspberrypi/include/vc.h new file mode 100644 index 000..4e91fde --- /dev/null +++ b/c/src/lib/libbsp/arm/raspberrypi/include/vc.h @@ -0,0 +1,140 @@ +/** + * @file + * + * @ingroup raspberrypi_vc + * + * @brief video core support. + * + */ + +/* + * Copyright (c) 2015 Yang Qiao + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * + * http://www.rtems.org/license/LICENSE + * + */ + +#ifndef LIBBSP_ARM_RASPBERRYPI_VC_H +#define LIBBSP_ARM_RASPBERRYPI_VC_H + +/** + * @defgroup raspberrypi_vc Register Definitions + * + * @ingroup arm_raspberrypi + * + * @brief Register Definitions + * + * @{ + */ + +typedef struct +{ + uint32_t width; + uint32_t height; +} bcm2835_get_display_size_entries; + +int +bcm2835_mailbox_get_display_size(bcm2835_get_display_size_entries* _entries); + + +typedef enum +{ + bcm2835_mailbox_pixel_order_bgr = 0, + bcm2835_mailbox_pixel_order_rgb = 1 +} bcm2835_pixel_order; + +typedef enum +{ + bcm2835_mailbox_alpha_mode_0_opaque = 0, + bcm2835_mailbox_alpha_mode_0_transparent = 1, + bcm2835_mailbox_alpha_mode_ignored= 2 +} bcm2835_alpha_mode; + +typedef struct +{ + uint32_t xres; + uint32_t yres; + uint32_t xvirt; + uint32_t yvirt; + uint32_t depth; + bcm2835_pixel_order pixel_order; + bcm2835_alpha_mode alpha_mode; + uint32_t voffset_x; + uint32_t voffset_y; + uint32_t overscan_left; + uint32_t overscan_right; + uint32_t overscan_top; + uint32_t overscan_bottom; + uint32_t base; + size_t size; + uint32_t pitch; +} bcm2835_init_frame_buffer_entries; + +int +bcm2835_mailbox_init_frame_buffer(bcm2835_init_frame_buffer_entries* _entries); + +typedef struct +{ + uint32_t pitch; +}bcm2835_get_pitch_entries; + +int +bcm2835_mailbox_get_pitch(bcm2835_get_pitch_entries* _entries); + +typedef struct +{ + char cmdline[1024]; +} bcm2835_get_cmdline_entries; + +int +bcm2835_mailbox_get_cmdline(bcm2835_get_cmdline_entries* _entries); + +typedef enum +{ + bcm2835_mailbox_power_udid_sd_card = 0xu, + bcm2835_mailbox_power_udid_uart0 = 0x0001u, + bcm2835_mailbox_power_udid_uart1 = 0x0002u, + bcm2835_mailbox_power_udid_usb_hcd = 0x0003u, + bcm2835_mailbox_power_udid_i2c0 = 0x0004u, + bcm2835_mailbox_power_udid_i2c1 = 0x0005u, + bcm2835_mailbox_power_udid_i2c2 = 0x0006u, + bcm2835_mailbox_power_udid_spi = 0x0007u, + bcm2835_mailbox_power_udid_ccp2tx = 0x0008u, +} bcm2835_power_device_id; + +typedef struct +{ + bcm2835_power_device_id dev_id; + uint32_t state; +} bcm2835_set_power_state_entries; + +#define BCM2835_MAILBOX_SET_POWER_STATE_REQ_ON(1 0) +#define BCM2835_MAILBOX_SET_POWER_STATE_REQ_WAIT (1 1) +#define BCM2835_MAILBOX_POWER_STATE_ON (1 0) +#define BCM2835_MAILBOX_POWER_STATE_NODEV(1 1) +int +bcm2835_mailbox_set_power_state(bcm2835_set_power_state_entries* _entries); + +typedef struct +{ + uint32_t base; + size_t size; +}bcm2835_get_arm_memory_entries; + +int +bcm2835_mailbox_get_arm_memory(bcm2835_get_arm_memory_entries* _entries); + +typedef struct +{ + uint32_t base; + size_t size; +}bcm2835_get_vc_memory_entries; + +int +bcm2835_mailbox_get_vc_memory(bcm2835_get_vc_memory_entries* _entries); +/** @} */ + +#endif /* LIBBSP_ARM_RASPBERRYPI_VC_H */ diff --git a/c/src/lib/libbsp/arm/raspberrypi/misc/vc.c b/c/src/lib/libbsp/arm/raspberrypi/misc/vc.c new file
[PATCH 4/6] add fb support for rpi bsp
From: YANG Qiao yangqiao0...@me.com --- c/src/lib/libbsp/arm/raspberrypi/Makefile.am | 5 +- c/src/lib/libbsp/arm/raspberrypi/console/fb.c | 331 + c/src/lib/libbsp/arm/raspberrypi/include/bsp.h | 2 + .../arm/raspberrypi/startup/bspgetworkarea.c | 61 c/src/lib/libbsp/arm/raspberrypi/startup/linkcmds | 5 +- c/src/lib/libbsp/arm/raspberrypi/startup/mminit.c | 42 +++ 6 files changed, 442 insertions(+), 4 deletions(-) create mode 100644 c/src/lib/libbsp/arm/raspberrypi/console/fb.c create mode 100644 c/src/lib/libbsp/arm/raspberrypi/startup/bspgetworkarea.c create mode 100644 c/src/lib/libbsp/arm/raspberrypi/startup/mminit.c diff --git a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am index e0b4806..b4853a6 100644 --- a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am +++ b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am @@ -79,7 +79,6 @@ libbsp_a_LIBADD = # Shared libbsp_a_SOURCES += ../../shared/bootcard.c libbsp_a_SOURCES += ../../shared/bspclean.c -libbsp_a_SOURCES += ../../shared/bspgetworkarea.c libbsp_a_SOURCES += ../../shared/bsplibc.c libbsp_a_SOURCES += ../../shared/bsppost.c libbsp_a_SOURCES += ../../shared/bsppredriverhook.c @@ -97,6 +96,7 @@ libbsp_a_SOURCES += ../shared/arm-cp15-set-ttb-entries.c libbsp_a_SOURCES += ../../shared/bspreset_loop.c libbsp_a_SOURCES += startup/bspstart.c libbsp_a_SOURCES += startup/cmdline.c +libbsp_a_SOURCES += startup/bspgetworkarea.c # IRQ libbsp_a_SOURCES += ../shared/arm-cp15-set-exception-handler.c @@ -115,6 +115,7 @@ libbsp_a_SOURCES += ../../shared/console_select.c libbsp_a_SOURCES += ../../shared/console_write.c libbsp_a_SOURCES += console/console-config.c libbsp_a_SOURCES += console/usart.c +libbsp_a_SOURCES += console/fb.c # clock libbsp_a_SOURCES += clock/clockdrv.c ../../../shared/clockdrv_shell.h @@ -147,7 +148,7 @@ libbsp_a_SOURCES += startup/bspstarthooks.c # LIBMM libbsp_a_SOURCES += startup/mm_config_table.c -libbsp_a_SOURCES += ../shared/mminit.c +libbsp_a_SOURCES += startup/mminit.c ### # Network# diff --git a/c/src/lib/libbsp/arm/raspberrypi/console/fb.c b/c/src/lib/libbsp/arm/raspberrypi/console/fb.c new file mode 100644 index 000..a83d560 --- /dev/null +++ b/c/src/lib/libbsp/arm/raspberrypi/console/fb.c @@ -0,0 +1,331 @@ +/** + * @file + * + * @ingroup raspberrypi + * + * @brief framebuffer support. + */ + +/* + * Copyright (c) 2015 Yang Qiao + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * + * http://www.rtems.org/license/LICENSE + * + */ + +#include stdlib.h +#include stdio.h +#include errno.h +#include sys/types.h + +#include bsp.h +#include bsp/raspberrypi.h +#include bsp/mailbox.h +#include bsp/vc.h + +#include rtems.h +#include rtems/libio.h +#include rtems/fb.h +#include rtems/framebuffer.h +#include rtems/score/atomic.h + +#define SCREEN_WIDTH 1024 +#define SCREEN_HEIGHT 768 +#define BPP 32 +#define BUFFER_SIZE (SCREEN_WIDTH*SCREEN_HEIGHT*BPP/8) + +/* flag to limit driver to protect against multiple opens */ +static Atomic_Flag driver_mutex; + +/* + * screen information for the driver (fb0). + */ + +static struct fb_var_screeninfo fb_var_info = { + .xres= SCREEN_WIDTH, + .yres= SCREEN_HEIGHT, + .bits_per_pixel = BPP +}; + +static struct fb_fix_screeninfo fb_fix_info = { + .smem_start = (void *) NULL, + .smem_len= 0, + .type= FB_TYPE_PACKED_PIXELS, + .visual = FB_VISUAL_TRUECOLOR, + .line_length = 0 +}; + +int raspberrypi_get_fix_screen_info( struct fb_fix_screeninfo *info ) +{ + *info = fb_fix_info; + return 0; +} + +int raspberrypi_get_var_screen_info( struct fb_var_screeninfo *info ) +{ + *info = fb_var_info; + return 0; +} + +static int +find_mode_from_cmdline(void) +{ + const char* opt; + char* endptr; + uint32_t width; + uint32_t height; + uint32_t bpp; + opt = rpi_cmdline_arg(--video=); + if (opt) + { + opt += sizeof(--video=)-1; + width = strtol(opt, endptr, 10); + if (*endptr != 'x') + { + return -2; + } + opt = endptr+1; + height = strtol(opt, endptr, 10); + switch (*endptr) + { + case '-': + opt = endptr+1; + if (strlen(opt) = 2) + bpp = strtol(opt, endptr, 10); + else + { + bpp = strtol(opt, endptr, 10); + if (*endptr != ' ') + { + return -4; + } + } + case ' ': + case 0: + break; + default: + return -3; + } + } + else +return -1; + + fb_var_info.xres= width; + fb_var_info.yres
[PATCH 3/6] add cmdline support for rpi bsp
From: YANG Qiao yangqiao0...@me.com --- c/src/lib/libbsp/arm/raspberrypi/Makefile.am | 1 + c/src/lib/libbsp/arm/raspberrypi/include/bsp.h | 5 +++ .../lib/libbsp/arm/raspberrypi/startup/bspstart.c | 1 + .../libbsp/arm/raspberrypi/startup/bspstarthooks.c | 2 ++ c/src/lib/libbsp/arm/raspberrypi/startup/cmdline.c | 40 ++ 5 files changed, 49 insertions(+) create mode 100644 c/src/lib/libbsp/arm/raspberrypi/startup/cmdline.c diff --git a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am index 3593e60..e0b4806 100644 --- a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am +++ b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am @@ -96,6 +96,7 @@ libbsp_a_SOURCES += ../shared/arm-cp15-set-ttb-entries.c # Startup libbsp_a_SOURCES += ../../shared/bspreset_loop.c libbsp_a_SOURCES += startup/bspstart.c +libbsp_a_SOURCES += startup/cmdline.c # IRQ libbsp_a_SOURCES += ../shared/arm-cp15-set-exception-handler.c diff --git a/c/src/lib/libbsp/arm/raspberrypi/include/bsp.h b/c/src/lib/libbsp/arm/raspberrypi/include/bsp.h index 5379b13..7cb9e70 100644 --- a/c/src/lib/libbsp/arm/raspberrypi/include/bsp.h +++ b/c/src/lib/libbsp/arm/raspberrypi/include/bsp.h @@ -7,6 +7,7 @@ */ /* + * Copyright (c) 2015 Yang Qiao * Copyright (c) 2013 Alan Cudmore * * The license and distribution terms for this file may be @@ -37,6 +38,10 @@ extern C { #define BSP_GPIO_PINS_PER_BANK 32 #define BSP_GPIO_PINS_PER_SELECT_BANK 10 +void rpi_init_cmdline(void); +const char* rpi_cmdline(void); +const char* rpi_cmdline_arg(const char* arg); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/c/src/lib/libbsp/arm/raspberrypi/startup/bspstart.c b/c/src/lib/libbsp/arm/raspberrypi/startup/bspstart.c index c5786bf..884d5ef 100644 --- a/c/src/lib/libbsp/arm/raspberrypi/startup/bspstart.c +++ b/c/src/lib/libbsp/arm/raspberrypi/startup/bspstart.c @@ -26,4 +26,5 @@ void bsp_start(void) { bsp_interrupt_initialize(); +rpi_init_cmdline(); } diff --git a/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c b/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c index 047c8ad..7d72fe7 100644 --- a/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c +++ b/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c @@ -7,6 +7,7 @@ */ /* + * Copyright (c) 2015 Yang Qiao * Copyright (c) 2013. Hesham AL-Matary * Copyright (c) 2013 by Alan Cudmore * based on work by: @@ -29,6 +30,7 @@ void BSP_START_TEXT_SECTION bsp_start_hook_0(void) { + rpi_init_cmdline(); } diff --git a/c/src/lib/libbsp/arm/raspberrypi/startup/cmdline.c b/c/src/lib/libbsp/arm/raspberrypi/startup/cmdline.c new file mode 100644 index 000..c1ed29a --- /dev/null +++ b/c/src/lib/libbsp/arm/raspberrypi/startup/cmdline.c @@ -0,0 +1,40 @@ +/** + * @file + * + * @ingroup raspberrypi + * + * @brief mailbox support. + */ +/* + * Copyright (c) 2015 Yang Qiao + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * + * http://www.rtems.org/license/LICENSE + * + */ + +#include bsp.h +#include bsp/vc.h + +#define MAX_CMDLINE_LENGTH 1024 +static char* _rpi_cmdline; +static bcm2835_get_cmdline_entries get_cmdline_entries; + +void rpi_init_cmdline(void) +{ + bcm2835_get_cmdline_entries get_cmdline_entries; + bcm2835_mailbox_get_cmdline(get_cmdline_entries); + _rpi_cmdline = get_cmdline_entries.cmdline; +} + +const char* rpi_cmdline(void) +{ + return _rpi_cmdline; +} + +const char* rpi_cmdline_arg(const char* arg) +{ + return strstr (rpi_cmdline (), arg); +} -- 2.1.0 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: RSB Ubuntu 15.04 64 bit fails to build.
On 12/08/2015 3:18 pm, punit vara wrote: I am facing problem with python .I installed python but don't know why still same problem .Can anybody tell me how to solve python dependencies in Ubuntu 15.04 64 bit. please find the attachment of error report. https://lists.rtems.org/pipermail/users/2015-July/029272.html Does this help ? Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
python dependencies Ubuntu 15.04
sudo apt-get install python-all-dev I have done this .Still python error. Any help will be appreciated. RTEMS Tools Project - Source Builder Error Report Build: error: building i386-rtems4.11-gdb-7.9-x86_64-linux-gnu-1 Command Line: ../source-builder/sb-set-builder --log=l-i386.txt --prefix=/home/punit/developmentx/rtems/4.11 4.11/rtems-i386 Python: 2.7.10 (default, Aug 9 2015, 10:57:15) [GCC 4.9.2] https://github.com/punitvara/rtems-source-builder.git/origin/b65c131f2e11e352fde6efa0ec2fe5000dad3a4a-modified Linux punit-Compaq-420 3.19.0-25-generic #26-Ubuntu SMP Fri Jul 24 21:17:31 UTC 2015 x86_64 Tail of the build log: checking whether getsubopt is declared without a macro... yes checking whether grantpt is declared without a macro... yes checking whether initstate is declared without a macro... yes checking whether initstate_r is declared without a macro... yes checking whether mkdtemp is declared without a macro... yes checking whether mkostemp is declared without a macro... yes checking whether mkostemps is declared without a macro... yes checking whether mkstemp is declared without a macro... yes checking whether mkstemps is declared without a macro... yes checking whether posix_openpt is declared without a macro... yes checking whether ptsname is declared without a macro... yes checking whether ptsname_r is declared without a macro... yes checking whether random is declared without a macro... yes checking whether random_r is declared without a macro... yes checking whether realpath is declared without a macro... yes checking whether rpmatch is declared without a macro... yes checking whether setenv is declared without a macro... yes checking whether setstate is declared without a macro... yes checking whether setstate_r is declared without a macro... yes checking whether srandom is declared without a macro... yes checking whether srandom_r is declared without a macro... yes checking whether strtod is declared without a macro... yes checking whether strtoll is declared without a macro... yes checking whether strtoull is declared without a macro... yes checking whether unlockpt is declared without a macro... yes checking whether unsetenv is declared without a macro... yes checking whether strstr works in linear time... yes checking whether strstr works... (cached) yes checking for nlink_t... yes checking whether fchmodat is declared without a macro... yes checking whether fstat is declared without a macro... yes checking whether fstatat is declared without a macro... yes checking whether futimens is declared without a macro... yes checking whether lchmod is declared without a macro... yes checking whether lstat is declared without a macro... yes checking whether mkdirat is declared without a macro... yes checking whether mkfifo is declared without a macro... yes checking whether mkfifoat is declared without a macro... yes checking whether mknod is declared without a macro... yes checking whether mknodat is declared without a macro... yes checking whether stat is declared without a macro... yes checking whether utimensat is declared without a macro... yes checking whether chdir is declared without a macro... yes checking whether chown is declared without a macro... yes checking whether dup is declared without a macro... yes checking whether dup2 is declared without a macro... yes checking whether dup3 is declared without a macro... yes checking whether environ is declared without a macro... yes checking whether euidaccess is declared without a macro... yes checking whether faccessat is declared without a macro... yes checking whether fchdir is declared without a macro... yes checking whether fchownat is declared without a macro... yes checking whether fdatasync is declared without a macro... yes checking whether fsync is declared without a macro... yes checking whether ftruncate is declared without a macro... yes checking whether getcwd is declared without a macro... yes checking whether getdomainname is declared without a macro... yes checking whether getdtablesize is declared without a macro... yes checking whether getgroups is declared without a macro... yes checking whether gethostname is declared without a macro... yes checking whether getlogin is declared without a macro... yes checking whether getlogin_r is declared without a macro... yes checking whether getpagesize is declared without a macro... yes checking whether getusershell is declared without a macro... yes checking whether setusershell is declared without a macro... yes checking whether endusershell is declared without a macro... yes checking whether group_member is declared without a macro... yes checking whether isatty is declared without a macro... yes checking whether lchown is declared without a macro... yes checking whether link is declared without a macro... yes checking whether linkat is declared without a macro... yes checking whether lseek is declared without a macro... yes checking whether pipe is declared without
Re: Fwd: Re: [PATCH] GSoC: Cache configurations Raspberry Pi 2 support
On 12/08/2015 6:02 am, Rohini Kulkarni wrote: Yes I have tried this. Didn't work out :( What was the reason ? I do not remembering seeing it. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Protected and Unprotected operations on Chain_control
On Wed, Aug 12, 2015 at 11:48 AM, Saurabh Gadia ga...@usc.edu wrote: Hi, For operations related to manipulation of Chain_Node we have two modes for that: protected and unprotected. In protected access to chain we guard the operation by disabling the interrupts while in unprotected we don't guard it. Is it that we don't disable interrupts in unprotected mode because we are sure that ISR will not affect the operation and with protected ISR may affect the operation so we guard operation against it. When is protected and unprotected used in respect with the context? Correct. unprotected means something else has already ensured mutual exclusion. Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Uniprocessor configuration.
The uniprocessor is used by default. So the way you ran RTEMS for your Getting Started will do. On Tue, Aug 11, 2015 at 9:39 PM, Saurabh Gadia ga...@usc.edu wrote: Hi, how should I make sure that testcases I am implementing are running under uniprocessor configuration? What do we have to do to run rtems for uniprocessor architecture? Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 1/1] add t1lib patch
On Aug 12, 2015, at 03:01 AM, Joel Sherrill joel.sherr...@oarcorp.com wrote: On 8/12/2015 8:18 AM, QIAO YANG wrote: Hi, So here I patch the configure.in file instead of its output. If this one is good to go, I'll send you the two other patches for microwindows-bset and t1lib-bset , with its' correct patch urls. The patch has to include the source (configure.in) and generated file (configure). Once the patch is applied, the configure script should match what would be generated but the end user is not expected to be able to generate the configure script. Include both files and ensure the configure is actually generated from the latest configure.in. I've added the generation in the build process. After the configure.in is patched, I regenerate the configure script. Is that ok? Best wishes On Aug 12, 2015, at 02:16 AM, YANG QIAO yangqiao0...@me.com wrote: From: YANG Qiao yangqiao0...@me.com mailto:yangqiao0...@me.com --- tools/4.11/t1lib/t1lib-5.1.2.diff | 58 +++ 1 file changed, 58 insertions(+) create mode 100644 tools/4.11/t1lib/t1lib-5.1.2.diff diff --git a/tools/4.11/t1lib/t1lib-5.1.2.diff b/tools/4.11/t1lib/t1lib-5.1.2.diff new file mode 100644 index 000..1c59e2b --- /dev/null +++ b/tools/4.11/t1lib/t1lib-5.1.2.diff @@ -0,0 +1,58 @@ +--- t1lib-5.1.2.orig/configure.in 2015-08-12 14:35:01.064674452 +0200 t1lib-5.1.2/configure.in 2015-08-12 14:35:05.148674279 +0200 +@@ -225,14 +225,52 @@ + + dnl Check which ANSI integer type is 64 bit + +-AC_CACHE_CHECK( which ANSI integer type is 64 bit, ac_64bit_type, +- AC_TRY_RUN([ ++echo $ECHO_N checking \which ANSI integer type is 64 bit\... $ECHO_C 6 ++if test ${ac_64bit_type+set} = set; then ++ echo $ECHO_N (cached) $ECHO_C 6 ++else ++ if test $cross_compiling = yes; then ++ ac_64bit_type=none ++else ++ cat conftest.$ac_ext _ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h conftest.$ac_ext ++cat conftest.$ac_ext _ACEOF ++/* end confdefs.h. */ ++ + int main(void) { + if (sizeof(long)==8) + return(0); + else + return(1); +-}], ac_64bit_type=long, ac_64bit_type=none)) ++} ++_ACEOF ++rm -f conftest$ac_exeext ++if { (eval echo $as_me:$LINENO: \$ac_link\) 5 ++ (eval $ac_link) 25 ++ ac_status=$? ++ echo $as_me:$LINENO: \$? = $ac_status 5 ++ (exit $ac_status); } { ac_try='./conftest$ac_exeext' ++ { (eval echo $as_me:$LINENO: \$ac_try\) 5 ++ (eval $ac_try) 25 ++ ac_status=$? ++ echo $as_me:$LINENO: \$? = $ac_status 5 ++ (exit $ac_status); }; }; then ++ ac_64bit_type=long ++else ++ echo $as_me: program exited with status $ac_status 5 ++echo $as_me: failed program was: 5 ++sed 's/^/| /' conftest.$ac_ext 5 ++ ++( exit $ac_status ) ++ac_64bit_type=none ++fi ++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++fi ++fi ++echo $as_me:$LINENO: result: $ac_64bit_type 5 ++echo ${ECHO_T}$ac_64bit_type 6 + if test $ac_64bit_type = long + then + T1_AA_TYPE64=-DT1_AA_TYPE64=long -- 2.1.0 -- Joel Sherrill, Ph.D. Director of Research Development joel.sherr...@oarcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 1/1] add t1lib patch
Hi, So here I patch the configure.in file instead of its output. If this one is good to go, I'll send you the two other patches for microwindows-bset and t1lib-bset , with its' correct patch urls. Best wishes On Aug 12, 2015, at 02:16 AM, YANG QIAO yangqiao0...@me.com wrote: From: YANG Qiao yangqiao0...@me.com --- tools/4.11/t1lib/t1lib-5.1.2.diff | 58 +++ 1 file changed, 58 insertions(+) create mode 100644 tools/4.11/t1lib/t1lib-5.1.2.diff diff --git a/tools/4.11/t1lib/t1lib-5.1.2.diff b/tools/4.11/t1lib/t1lib-5.1.2.diff new file mode 100644 index 000..1c59e2b --- /dev/null +++ b/tools/4.11/t1lib/t1lib-5.1.2.diff @@ -0,0 +1,58 @@ +--- t1lib-5.1.2.orig/configure.in 2015-08-12 14:35:01.064674452 +0200 t1lib-5.1.2/configure.in 2015-08-12 14:35:05.148674279 +0200 +@@ -225,14 +225,52 @@ + + dnl Check which ANSI integer type is 64 bit + +-AC_CACHE_CHECK( which ANSI integer type is 64 bit, ac_64bit_type, +- AC_TRY_RUN([ ++echo $ECHO_N checking \which ANSI integer type is 64 bit\... $ECHO_C 6 ++if test ${ac_64bit_type+set} = set; then ++ echo $ECHO_N (cached) $ECHO_C 6 ++else ++ if test $cross_compiling = yes; then ++ ac_64bit_type=none ++else ++ cat conftest.$ac_ext _ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h conftest.$ac_ext ++cat conftest.$ac_ext _ACEOF ++/* end confdefs.h. */ ++ + int main(void) { + if (sizeof(long)==8) + return(0); + else + return(1); +-}], ac_64bit_type=long, ac_64bit_type=none)) ++} ++_ACEOF ++rm -f conftest$ac_exeext ++if { (eval echo $as_me:$LINENO: \$ac_link\) 5 ++ (eval $ac_link) 25 ++ ac_status=$? ++ echo $as_me:$LINENO: \$? = $ac_status 5 ++ (exit $ac_status); } { ac_try='./conftest$ac_exeext' ++ { (eval echo $as_me:$LINENO: \$ac_try\) 5 ++ (eval $ac_try) 25 ++ ac_status=$? ++ echo $as_me:$LINENO: \$? = $ac_status 5 ++ (exit $ac_status); }; }; then ++ ac_64bit_type=long ++else ++ echo $as_me: program exited with status $ac_status 5 ++echo $as_me: failed program was: 5 ++sed 's/^/| /' conftest.$ac_ext 5 ++ ++( exit $ac_status ) ++ac_64bit_type=none ++fi ++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++fi ++fi ++echo $as_me:$LINENO: result: $ac_64bit_type 5 ++echo ${ECHO_T}$ac_64bit_type 6 + if test $ac_64bit_type = long + then + T1_AA_TYPE64=-DT1_AA_TYPE64=long -- 2.1.0 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Protected and Unprotected operations on Chain_control
Hi, #define _ISR_Disable( _level ) \ do { \ _CPU_ISR_Disable( _level ); \ _Assert( _Debug_Is_owner_of_giant() ); \ RTEMS_COMPILER_MEMORY_BARRIER(); \ } while (0) the above macro has description: @brief Disables interrupts on this processor. * * This macro disables all interrupts on this processor so that a critical * section of code is protected from concurrent access by interrupts of this * processor. Disabling of interrupts disables thread dispatching on the * processor as well. * * On SMP configurations other processors can enter such sections if not * protected by other means. * * @param[out] _level The argument @a _level will contain the previous * interrupt mask level. */ And : #define _ISR_Disable_without_giant( _level ) \ do { \ _CPU_ISR_Disable( _level ); \ RTEMS_COMPILER_MEMORY_BARRIER(); \ } while (0) The above lock is acquired for SMP. But how are both macros different. With former Macro it disables all interrupts as level is highest but how does it ensure thread_dispatch_disable? Thanks, Saurabh Gadia On Wed, Aug 12, 2015 at 9:52 AM, Gedare Bloom ged...@gwu.edu wrote: On Wed, Aug 12, 2015 at 11:48 AM, Saurabh Gadia ga...@usc.edu wrote: Hi, For operations related to manipulation of Chain_Node we have two modes for that: protected and unprotected. In protected access to chain we guard the operation by disabling the interrupts while in unprotected we don't guard it. Is it that we don't disable interrupts in unprotected mode because we are sure that ISR will not affect the operation and with protected ISR may affect the operation so we guard operation against it. When is protected and unprotected used in respect with the context? Correct. unprotected means something else has already ensured mutual exclusion. Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel