Commit Graph

6686 Commits

Author SHA1 Message Date
yangyalei
670c245ff2 Exec: Support run exec in current task
Fix the problem when vfork() calls execv() (or execl()) to start a new application:
When the parent thread calls vfork() it receives and gets the pid of the vforked task,
and not the pid of the desired execv'ed application.

issue #3334

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-09-14 22:37:44 +08:00
haopengxiang
5439275293 nuttx/sensors/sensor.h: remove non-standard message from bream private data
These values are only provided by bream private message, should not include in
NMEA 0183 standard struct.

Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-09-14 18:16:34 +08:00
pengyiqiang
e578f3b20d video/fb: add vsync queue
refact vsync queue to support multi fb poll and overlay poll.

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-09-12 22:10:10 +08:00
pengyiqiang
7485816d6f video/fb: use counter record the num of poll ready
add a count to record the number of pollready.

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-09-12 22:10:10 +08:00
Stanley
4d13ac0a87 queue.h: Implement double link list queue split 2023-09-12 22:09:00 +08:00
Xiang Xiao
745dc4299f mmcsd: Rename mmc_rpmb_frame_s to rpmb_frame
align with mmc-utils definition:
https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/tree/mmc_cmds.c#n2085

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-10 23:10:42 +08:00
Stanley
56286a72c6 PAGESIZE and PAGEMASK seems as common macro 2023-09-10 18:18:15 +08:00
wanggang26
83ac6c7c43 mmc: change rpmb operation type define style
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-09 18:16:23 +03:00
Andre Heinemans
329e050c30 Added NXP SE05x support (secure element) 2023-09-09 15:54:08 +08:00
zhangyuan21
1f6d9bbd17 usbdev: add usbdev fs device for usb char device
Add usb_fs driver so that userspace can directly transfer USB packets
through the EP node. ADB, Fastboot, MTP will use usb_fs, these class
driver only need to provide the descriptors and register the usb_fs device.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-09 15:52:08 +08:00
wanggang26
eaff76284b drivers/mmcsd: Add RPMB ioctl
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-09 00:13:42 +08:00
wanggang26
5be2c5d91c mmc: add timeout fields for mmc_ioc_cmd
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-08 22:36:57 +08:00
Jukka Laitinen
b343f5c0e7 drivers/net: Add a management driver for ksz9477 ethernet switch
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-09-08 22:34:27 +08:00
fangxinyong
79004411b4 aio: change aio_fildes int type
if fdcheck enabled, protected fd used to aio_fildes will overflow.
Change to int and also follow posix spec:
https://pubs.opengroup.org/onlinepubs/7908799/xsh/aio.h.html

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-09-08 00:59:31 +03:00
yangyalei
fd776e8cee fix wait after vfork return error
vfork use waitpid hang father process,
but waitpid release child processs information by default.
So when user call wait, it return errno 10.

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-09-08 00:53:56 +03:00
yangyalei
eba2f163ed Revert "fix wait after vfork return error"
This reverts commit 50428979d0.
2023-09-08 00:53:56 +03:00
makejian
f4f2c9ed49 crypto: fix multiple definition of `poly1305_init'
apps/crypto/libtomcrypt/libtomcrypt/src/mac/poly1305/poly1305.c:90: multiple definition of `poly1305_init';
nuttx/crypto/poly1305.c:51: first defined here
Signed-off-by: makejian <makejian@xiaomi.com>
2023-09-07 17:02:08 -03:00
dongjiuzhu1
ee598b3e21 libc/mallopt: implement dummy mallopt
refs:
https://man.freebsd.org/cgi/man.cgi?query=malloc&apropos=0&sektion=3&manpath=SunOS+4.1.3&format=html

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-09-07 23:11:10 +08:00
yinshengkai
3339e4fbc3 drivers/note: fix sched_note declaration inconsistency
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-07 11:25:26 +03:00
dongjiuzhu1
df98320c2c libs/libc: support unlock version for fread/fwrite/fputc/fgetc/...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-09-06 15:08:24 +03:00
likun17
7d7345a620 sensor/bmp180.c:provides work in character device mode and UORB communication mode.
Use the macro CONFIG_SENSORS_BMP180_UORB to enable the uorb feature.

Signed-off-by: likun17 <likun17@xiaomi.com>
2023-09-06 08:02:52 +02:00
zhangyuan21
0efd4d0e12 usbdev: Split usbdev descriptor information
The class device only handles descriptor information specific to the class,
and shared descriptor information is passed through parameters and
handled by the composite driver.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-06 02:29:32 +08:00
Xiang Xiao
a9efeeeebc drivers/clk: Change CLK_SET_RATE_NO_REPARENT to CLK_MUX_SET_RATE_NO_REPARENT
since only mux clk use this flag

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-05 18:05:50 +03:00
likun17
ad643fe7a3 sensor/bmi160.c:provides work in character device mode and UORB communication mode.
Create bmi160_base.h, bmi160_base.c bmi160_uorb.c files, the bmi160_base file stores
public function interfaces, and the bmi160_uorb file stores functions related to the
uorb framework. Switch the character interface and UORB interface through the
macro CONFIG_SENSORS_BMI160_UORB.

Signed-off-by: likun17 <likun17@xiaomi.com>
2023-09-04 08:17:44 +02:00
likun17
bc066af50a sensor/bmi160.c:provides work in character device mode and UORB communication mode.
create a new bmi160.h file.

Signed-off-by: likun17 <likun17@xiaomi.com>
2023-09-04 08:17:44 +02:00
wangjianyu3
8a13da322d binfmt: Support arch copy section by self for dynamic code loading
This option enables architecture-specific memory copy for dynamic code loading.

For example, Ambiq has MRAM regions for instruction which can't load by
the memcpy directly.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2023-09-04 12:23:26 +08:00
wangjianyu3
c749e4bfbd binfmt: ELF support load to LMA
Load all sections to LMA not VMA, so the startup code(e.g. start.S) need
relocate .data section to the final address(VMA) and zero .bss section by self.

For example, SiFli and Actions: Background: Device with small sram,
Bootloader run in sram and psram, need boot to Application, with memory overlap
and without XIP. VMA of .data is in "psram" and LMA in "rom", if not enable
`ELF_LOADTO_LMA`, ELF loader will load the section to VMA (will fill bootloader
itself).

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2023-09-04 12:23:26 +08:00
TimJTi
3b4ea52a79 Remove spinlock, change to i2c_readwrite where appropriate , and consolidate i2c read and write calls. 2023-09-02 16:26:10 +03:00
rongyichang
c898461ca5 video/fb: add xres and yres for fb overlay
xres and yres of video overlay buffer may not same as primay framebuffer.
so add it to check the framebuffer count of overlay

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-09-01 23:19:13 +08:00
Michal Lenc
b005f844f5 ioexpander: add support for ISO1I813T expander
This commit adds basic support for electrically isolated 8 bit expander.
The expander communicates with the MCU via SPI interface. Both single
and multiple pin read are supported.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-08-29 17:35:59 +08:00
dulibo1
ea7f6c5b07 battery:add FAR for battery_gauge_operations_s
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-29 17:35:29 +08:00
Michal Lenc
fa63ef69c9 ioexpander: add support for ISO1H812G expander
This commit adds support for galvanic isolated ISO1H812G SPI expander.
Both single pin and multiple pin writes are supported.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-08-29 10:31:40 +08:00
yinshengkai
221ae1f1d1 drivers/note: Add support for atrace mark/counter type
Use sched_note_mark to view event markers/counter in perfetto

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-29 09:48:15 +08:00
fangxinyong
946ede865d signal: add siginterrupt implementation
https://pubs.opengroup.org/onlinepubs/9699919799/functions/siginterrupt.html

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-29 09:43:42 +08:00
fangxinyong
006b86f47c signal: add more value defines of the siginfo si_code field
The <signal.h> header shall define the symbolic constants of signal
codes why the signal was generated.
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-29 03:06:45 +08:00
dulibo1
e508e5c313 regulator: regulator_get input param add FAR
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-29 02:59:59 +08:00
chao an
3a9088c144 libs/alloca: add alloca implement for MSVC
Reference:
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/alloca?view=msvc-170

Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-28 11:10:08 -03:00
Xiang Xiao
47faeeb360 tls: Move task_tls_alloc and task_tls_destruct to libc
so task_tls_destruct can be called from usrspace, which is required by:
https://github.com/apache/nuttx/pull/10288

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-28 11:02:18 +03:00
Xiang Xiao
cb8df39207 binfmt/elf: Fix the minor style issue
and remove the unused macros and unnecessary cast

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-27 18:46:40 -03:00
SPRESENSE
f7400a857d drivers/audio/cxd56: Move cxd56 sources into arch/cxd56xx
CXD56 audio functions are inside of the CXD56.
So implementation of it should be under arch directory.
2023-08-26 01:20:32 +08:00
chengkai
d867c46bbc serial/uart/h5: add bt h5 uart serial driver
Signed-off-by: chengkai <chengkai@xiaomi.com>
2023-08-25 17:17:37 +08:00
SPRESENSE
4393f47e5d sensors: Remove undefined SCU functions for fxos8700cq
Remove undefined SCU functions for fxos8700cq.
2023-08-25 17:06:00 +08:00
SPRESENSE
7d0d6234eb sensors: Move SCU-specific bmp280 sensor into spresense board
Move SCU-specific bmp280 sensor into spresense board layer.
2023-08-25 17:06:00 +08:00
SPRESENSE
ffcea1da4f sensors: Move SCU-specific bmi160 sensor into spresense board
Move SCU-specific bmi160 sensor into spresense board layer.
2023-08-25 17:06:00 +08:00
SPRESENSE
795dcee521 sensors: Move SCU-specific ak09912 sensor into spresense board
Move SCU-specific ak09912 sensor into spresense board layer.
Rename a function name to register SCU sensor driver
from ak09912_register to ak09912_scu_register.
2023-08-25 17:06:00 +08:00
Michal Lenc
f851b79f89 pwm: add option to set channel output polarity with IOCTL command
Channel polarity can now be set with PWMIOC_SETCHARACTERISTICS ioctl
command as field cpol was added to pwm_info_s structure. This way the
polarity can be easily set from application layer for each channel
apart and also can be change on at runtime if required (although this is
not likely).

Helper defines were also added to simplify the definition of low and high
polarity level. Architecture level should take care of writing the
polarity to correct MCU registers.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-08-24 18:25:47 -03:00
Stuart Ianna
60bead4f84 debug: Let boards define custom debug configuration.
Allows the debug behavior to be specified as part of the board, architecture or chip configuration. This is useful when using out-of tree custom board configurations.
2023-08-24 12:26:59 +08:00
Xiang Xiao
c91cd510fc include/nuttx/list.h: Restore the origin copyright notice
which was removed accidentally in:
https://github.com/apache/nuttx/pull/1629

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-23 23:00:08 +03:00
Xiang Xiao
f5fe171ed8 include/nuttx/list: Rewrite list_entry/list_first_entry/list_last_entry
and remove the comment to avoid containing the potential Linux GPL code

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-23 21:40:35 +03:00
Michal Lenc
00128ff2fe pwm: fix incorrect documentation for PWMIOC_SETCHARACTERISTICS IOCTL
Documentation for PWMIOC_SETCHARACTERISTICS ioctl command mentioned
that this command will neither start nor stop the pulsed output. This
however is incorrect as PWMIOC_SETCHARACTERISTICS command leads to
pwm_start() function which starts the pulsed output.

While this might not be the correct behaviour (I would probably welcome
the option to set PWM characteristics without starting the pulsed output)
it is the way the PWM driver is coded for many architectures. Future
enhancement might be to add function pwm_setchar() for example to just
set characteristics without starting the PWM output.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-08-24 01:37:40 +08:00
guohao15
d4cebd5d77 mtd:add dhara compatiblity layer
to support dhara ftl for fatfs

Signed-off-by: guohao15 <guohao15@xiaomi.com>
2023-08-22 23:16:14 +08:00
zhangwenjian
aa6727b20d Add the module of SDIO Slave
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2023-08-22 20:28:24 +08:00
shizhenghui
2b34977fac nuttx/audio: support 32-bits pcm
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2023-08-22 20:27:40 +08:00
xiajizhong
1c860f38e7 cordic API add scale parameter
Signed-off-by: xiajizhong <xiajizhong@xiaomi.com>
2023-08-22 12:51:36 +02:00
Zhe Weng
318d136320 netdev/upper: Add netpkt_to_iov() interface
Some driver like virtio-net can offload fragmented IOBs, so an interface
to support this feature is needed.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-22 16:34:21 +09:00
Zhe Weng
d44e19d115 mm/iob: Add support for increasing length in iob_update_pktlen
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-22 16:34:21 +09:00
Zhe Weng
efc75de61e net/udp: Fix hybrid dual-stack IPv6/IPv4 socket
- Fix `ip6_map_ipv4addr` and `ip6_get_ipv4addr` macro to work under
  different endianness.
- Use `iob_reserve` instead of `iob_trimhead` in `udp_datahandler`.
  - Because we may set `sockaddr_in6` into IPv4 header, which causes
    `offset` become negative. `iob_reserve` can hold this case while
    `iob_trimhead` cannot.
- Select IPv4 domain in send case.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-22 09:09:21 +08:00
dongjiuzhu1
edbeb5cdd9 libs/ctype/toupper_l: Implement function toupper_l instead of macro
toupper_l will be replaced by toupper, resulting in infinite recursion, so implement toupper_l

stack:
0  std::__1::ctype_byname<char>::do_toupper (this=0xf3888120, c=49 '1') at libcxx/src/locale.cpp:1231
1  0x005b8188 in std::__1::ctype<char>::toupper (__c=49 '1', this=0xf3888120) at nuttx/include/libcxx/__locale:667
2  std::__1::ctype_byname<char>::do_toupper (this=0xf3888120, c=49 '1') at libcxx/src/locale.cpp:1231
3  0x005b8188 in std::__1::ctype<char>::toupper (__c=49 '1', this=0xf3888120) at nuttx/include/libcxx/__locale:667
4  std::__1::ctype_byname<char>::do_toupper (this=0xf3888120, c=49 '1') at libcxx/src/locale.cpp:1231
5  0x0064cfc9 in std::__1::ctype<char>::toupper (__c=49 '1', this=0xf3888120) at nuttx/include/libcxx/__locale:667
6  std::__1::__scan_keyword<char*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::ctype<char> > (__b=@0xf38871a0: 0xf3887220 "11:55:59 PM",
   __e=0xf388722b "", __kb=0xf2c03990, __ke=0xf2c03a38, __ct=..., __err=@0xf38871b0: 0, __case_sensitive=false) at nuttx/include/libcxx/locale:299
7  0x005cb0ed in std::__1::__time_get_storage<char>::__analyze (this=0xf2c0398c, fmt=114 'r', ct=...) at libcxx/src/locale.cpp:4998
8  0x005cf888 in std::__1::__time_get_storage<char>::init (this=0xf2c0398c, ct=...) at libcxx/src/locale.cpp:5295
9  0x005d4d0f in std::__1::__time_get_storage<char>::__time_get_storage (this=0xf2c0398c, __nm=...) at libcxx/src/locale.cpp:5399
10 0x005b15c8 in std::__1::time_get_byname<char, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > >::time_get_byname (__refs=0, __nm=..., this=0xf2c03980)
   at nuttx/include/libcxx/locale:2446
11 std::__1::locale::__imp::__imp (this=0xf2803970, name=..., refs=0) at libcxx/src/locale.cpp:268
12 0x005b333e in std::__1::locale::locale (this=0xf3888f00, name=0x6ca340 "C") at libcxx/src/locale.cpp:562
13 0x0058313b in helloxx_main (argc=1, argv=0xf3878810) at helloxx_main.cxx:112
14 0x0048471a in nxtask_startup (entrypt=0x5830a0 <helloxx_main(int, char**)>, argc=1, argv=0xf3878810) at sched/task_startup.c:70
15 0x00431bcd in nxtask_start () at task/task_start.c:134
16 0x0048f643 in pre_start () at sim/sim_initialstate.c:52
17 0x00000000 in ?? ()

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-08-22 00:07:16 +08:00
xucheng5
9d3abe8b71 socket can : support ioctl cmd SIOCCANRECOVERY
send CMD to restart controller in state bus-off

Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-21 13:18:51 +08:00
makejian
afbe6239ae crypto: update aes algorithm process
(1)update iv in each encryption process
(2)support aes-ofb/aes-cfb128/aes-cfb8
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-21 13:05:19 +08:00
Xiang Xiao
6b1e8b9bfe include/nuttx/tls.h: Remove the dup typedef tls_dtor_t
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-20 14:32:25 +03:00
Petro Karashchenko
075738cf14 net/ip: print ip addresses using ip4_addrN macro
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-08-19 13:28:21 -03:00
zhanghongyu
3bd495c09d icmp: add SOCK_RAW type support
Since ICMPv6 has added SOCK_RAW, a SOCK_RAW related implementation has also
been added for ICMP.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-08-19 22:04:22 +08:00
fangxinyong
891e05d99a include: move clockid_t and time[r]_t define to sys/types.h
POSIX Standard: Primitive System Data Types
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-19 09:08:40 +03:00
rongyichang
917634446e drivers/lcd : add ioctl passthrough for LCD driver
Some LCD vendors support unit test commands, we should passthrough the ioctl
commands to drivers.

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-19 01:50:41 +08:00
chenrun1
709301cbfd hostfs:support SEEK_CUR
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-08-19 01:48:48 +08:00
wanggang26
d8f316b998 fs/ioctl: add BIOC_BLKGETSIZE cmd to get block sector numbers
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-08-19 01:43:59 +08:00
dongjiuzhu1
29ddfd44a0 driver/note: dump irq handler address to trace
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-08-19 01:42:17 +08:00
renjianguang
86ae87b1ec nuttx/audio: Add AUDIO_CHANNELS_RANGE macro
Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2023-08-19 01:32:13 +08:00
anjiahao
4c39cdce09 mempool:Use default alignment inside of blockalign
can reduce memery usage

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-19 01:29:14 +08:00
cenzhanquan1
0fb103bc66 driver/audio: add format for AAC/MSBC/CVSD
Signed-off-by: cenzhanquan1 <cenzhanquan1@xiaomi.com>
2023-08-18 23:03:13 +08:00
xucheng5
417207678e driver/capture : add capture debug, fixed compile warning
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-18 09:21:46 +02:00
makejian
120aaf27b3 crypto: remove software algorithm coupling in cryptodev
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-17 13:12:36 +08:00
wangyingdong
8f6f601ec1 net/local:Add peek support for pipe and MSG_PEEK support for local socket
fifo peek example:
struct pipe_peek_s peek_buf;
peek_buf.len = len;
peek_buf.data = buf;
ret = file_ioctl(filep, PIPEIOC_PEEK,(unsigned long)((uintptr_t)&peek_buf));

Signed-off-by: wangyingdong <wangyingdong@xiaomi.com>
2023-08-15 23:58:45 +08:00
fangxinyong
903e87a7bd builtin: support uid/gid config for binfs app
Implement I_SUID/I_SGID feature for binfs in the POSIX compliant way.
If set-user-ID bit is set in the file permissions, then the effective
user ID of process shall be set to UID of the new process image file.

test case:
hello example emulates to set uid and file set-user-ID bit, and call
geteuid and getegid API.
UID  = 2000
GID  = 3000
MODE = 06555

nsh> ls -l /bin/hello
 -r-sr-sr-x    2000    3000       0 hello
nsh> hello
geteuid:2000
getegid:3000

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-14 01:37:00 +08:00
fangxinyong
2d73e86b47 binfmt: support euid of process set from the file system
From posix spec, if set-user-ID bit is set in the file permissions,
then the effective user ID of the new process shall be set to the
user ID of the new process image file.
Let's ignore whether ST_NOSUID is set on the mounted file system.

https://pubs.opengroup.org/onlinepubs/007904875/functions/exec.html

test step:
hello example build as a module and call geteuid and getegid API.
then set file binary set-user-ID bit on the host.

$ chmod +s apps/bin/hello

nsh> mount -t hostfs -o fs=. /data
nsh> ls -l /data/apps/bin/hello
 -rwsrwsr-x    1000    1000    9264 /data/apps/bin/hello
nsh> /data/apps/bin/hello
geteuid:1000
getegid:1000

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-12 02:18:25 +08:00
yangyalei
50428979d0 fix wait after vfork return error
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-08-11 09:30:45 -06:00
yinshengkai
836263b132 drivers: fix devascii_register warning
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-11 21:20:13 +08:00
yangshuyong
9c4e608529 Fixed the reset format error
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
2023-08-11 20:39:16 +08:00
yangshuyong
6f6977d002 support nuttx reset driver model
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
2023-08-11 20:39:16 +08:00
xiajizhong
b84fbe87ee math acceleration api support FFT
Signed-off-by: xiajizhong <xiajizhong@xiaomi.com>
2023-08-11 20:38:00 +08:00
xiajizhong
f922f4cc61 expand cordic_register to math_register
Signed-off-by: xiajizhong <xiajizhong@xiaomi.com>
2023-08-11 20:38:00 +08:00
红桃六
d8b045fa6a Update mouse.h 2023-08-11 20:37:11 +08:00
liuhongchao
69b655f4b2 drivers/input:support mouse driver
Implement mouse driver lower upper

Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2023-08-11 20:37:11 +08:00
chao an
60c4d61c02 libs/libc/hex2bin: enhance 64-bit compatibility
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-11 19:43:37 +08:00
dulibo1
3f9a76e131 battery:add goldfish battery driver
support the goldfish emulator battery driver

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-11 15:30:35 +08:00
zhanghongyu
0ead147841 rpmsgdev: support single read/write mode device
The default mode for Rpmsgdev is to read/write data as long as possible for
caller, this mode does not apply to tun devices, tun devices can read and
write only one complete ip packet at a time.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-08-11 15:29:32 +08:00
zhanghongyu
2b4cf41e14 tun: move tun related macro definitions out of CONFIG_NET_TUN
to support cross-core tun device operations via rpmsgdev

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-08-11 15:26:39 +08:00
yinshengkai
4cb2d7dc25 note: directly returns the taskname pointer
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-11 13:27:17 +08:00
yinshengkai
84799d15ac note: remove NOTERAM_GETTASKNAME
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-11 13:27:17 +08:00
dulibo1
1456919e58 regulator:support lp mode and auto pm register
1.add new intf regulator_set_mode to manual set rehulator lower power mode;
2.when add auto lp desc,the regulator lp mode is controlled by  pm framework;

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-10 23:17:51 +08:00
dulibo1
935359fa3f regulator: support link to supply
when add supply desc,the regulator is linked to the parent regulator
1.if enable the regualtor, the parent regulator is enabled
2.if disable all child regulator, the parent regualtor is disabled

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-10 23:17:51 +08:00
dulibo1
67aa12e762 regulator:support always on
when add always on desc,the regulator is always enabled

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-10 23:17:51 +08:00
yinshengkai
541f600ab6 drivers/note: fix unknown type name bool
/home/baerg/code/NXOS/nuttx/include/nuttx/note/noteram_driver.h💯61: error: unknown type name ‘bool’
100 | noteram_initialize(FAR const char *devpath, size_t bufsize, bool overwrite);
| ^~~~
/home/baerg/code/NXOS/nuttx/include/nuttx/note/noteram_driver.h:31:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’?

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-10 15:58:35 +08:00
Zhe Weng
264283c5a2 net/icmpv6: Fix value of SIZEOF_ICMPV6_ECHO_xxx_S
The `SIZEOF_ICMPV6_ECHO_REQUEST_S` and `SIZEOF_ICMPV6_ECHO_REPLY_S`
macro are intended to be `8+n`, but actually becomes `10-1+n` and causes
the packet sent by `ping6` one byte more than expected.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-10 15:51:16 +08:00
makejian
ac76a8fe0f crypto: export SHA224/SHA384 via /dev/crypto
(1)add sha224 algorithm in sha2.c
(2)export sha224/sha384
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-10 13:36:19 +08:00
wangbowen6
9aa57b6c53 virtio: add virtio framework in NuttX
1. virtio devics/drivers match and probe/remote mechanism;
2. virtio mmio transport layer based on OpenAmp (Compatible with both
   virtio mmio version 1 and 2);
3. virtio-serial driver based on new virtio framework;
4. virtio-rng driver based on new virtio framework;
5. virtio-net driver based on new virtio framework
   (IOB Offload implementation);
6. virtio-blk driver based on new virtio framework;
7. Remove the old virtio mmio framework, the old framework only
   support mmio transport layer, and the new framwork support
   more transport layer and this commit has implemented all the
   old virtio drivers;
8. Refresh the the qemu-arm64 and qemu-riscv virtio related
   configs, and update its README.txt;

New virtio-net driver has better performance
Compared with previous virtio-mmio-net:
|                        | master/-c | master/-s | this/-c | this/-s |
| :--------------------: | :-------: | :-------: | :-----: | :-----: |
| qemu-armv8a:netnsh     |  539Mbps  |  524Mbps  | 906Mbps | 715Mbps |
| qemu-armv8a:netnsh_smp |  401Mbps  |  437Mbps  | 583Mbps | 505Mbps |
| rv-virt:netnsh         |  487Mbps  |  512Mbps  | 760Mbps | 634Mbps |
| rv-virt:netnsh_smp     |  387Mbps  |  455Mbps  | 447Mbps | 502Mbps |
| rv-virt:netnsh64       |  602Mbps  |  595Mbps  | 881Mbps | 769Mbps |
| rv-virt:netnsh64_smp   |  414Mbps  |  515Mbps  | 491Mbps | 525Mbps |
| rv-virt:knetnsh64      |  515Mbps  |  457Mbps  | 606Mbps | 540Mbps |
| rv-virt:knetnsh64_smp  |  308Mbps  |  389Mbps  | 415Mbps | 474Mbps |
Note: Both CONFIG_IOB_NBUFFERS=64, using iperf command, all in Mbits/sec
      Tested in QEMU 7.2.2

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-10 03:39:39 +08:00
jinxudong
571f52c9d3 feature: sensor: add force sensor
A sensor of this type measures the force on it, and additionally
compares the force with one or more specified thresholds. The sensor
can output the force value directly. Moreover, it's usually applied
as a press key. In that case, when it detects a force greater than
some given threshold, a corresponding event is reported.

Signed-off-by: jinxudong <jinxudong@xiaomi.com>
2023-08-09 21:57:58 +08:00
yangsen5
ce9f40aeb6 drivers/video: add nuttx goldfish camera driver
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-08-09 18:30:11 +08:00
yinshengkai
97c26f2376 syscall: remove duplicate getegid/geteuid
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-09 17:07:58 +08:00
fangxinyong
896f34fde9 sched: implement effective uid and gid interfaces
Implement 'effective' setuid, getuid, setgid, and getgid interfaces.
These will be inheritance by all child task groups. These definitons
are explicitly specified here:
https://pubs.opengroup.org/onlinepubs/000095399/functions/geteuid.html
https://pubs.opengroup.org/onlinepubs/000095399/functions/getegid.html
https://pubs.opengroup.org/onlinepubs/000095399/functions/seteuid.html
https://pubs.opengroup.org/onlinepubs/000095399/functions/setegid.html

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-09 17:07:58 +08:00
yinshengkai
13f071baa8 note: fix sched_note_begin address errr
SCHED_NOTE_IP address calculation error in some cases, refer to _THIS_IP_ implementation in linux
https://elixir.bootlin.com/linux/latest/source/include/linux/instruction_pointer.h#L6

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-09 15:11:33 +08:00
Petro Karashchenko
2c346c4c89 arch/esp32: use kernel internal API for libc stubs
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-08-08 11:58:29 -03:00
Petro Karashchenko
1b0baa8337 nuttx: use lib_free for memory de-allocation after strdup or asprintf
The memory allocated with strdup and asprintf is done via lib_malloc
so we need to use lib_free to deallocate memory otherwise the assertion
"Free memory from the wrong heap" is hit with flat mode and user separated
heap enabled mode.

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-08-08 11:58:29 -03:00
Zhe Weng
194d0cdec9 net/procfs: Simplify logic for tcp/udp stats
By:
1. Take out net_ip_binding_laddr/raddr macro
2. INET6_ADDRSTRLEN is long enough for all address buffer and no need to
   add 0 to the end of buffer since inet_ntop will do so

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-07 08:08:37 -07:00
shipei
858e43df91 audio:add format sbc support
Signed-off-by: shipei <shipei@xiaomi.com>
2023-08-07 06:44:33 -07:00
xucheng5
d0a2fa626a driver/mtd_config : add mtdconfig_register_by_path()
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-07 01:08:24 -07:00
zhangyuan21
98fba71998 usbadb: add usbadb boardctl
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-07 11:23:36 +08:00
zhangyuan21
fe6b0619f9 usbdev: Use composite devices as universal devices
The enumeration process for composite and non-composite devices
has a lot of duplicate code. Treating the code for composite
devices as universal enumeration code can reduce redundant code.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-07 11:23:36 +08:00
cuiziwei
6289205104 sched: Define sched_getcpu return 0 when CONFIG_SMP equals n
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-06 11:28:49 +02:00
Brennan Ashton
46b0f6d6ee fdt: Add initial FDT support and procfs for userspace export
VELAPLATFO-12536

This provides the initial hooks for Flattened Device Tree support
with QEMU RV. It also provides a new procfs file that exposes the
fdt to userspace much like the /sys/firmware/fdt endpoint in Linux.
See https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-firmware-ofw

Nodes in the fdt are not yet usable by the OS.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-08-05 12:41:06 -07:00
ligd
7a0ef1d0ca secure: fix compile failed when no CONFIG_ARCH_HAVE_TRUSTZONE
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-08-05 12:40:34 -07:00
anjiahao
3a808bab19 support stm32f429i-disco run open flash loader
We can use the driver in nuttx to download
files with debugger

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-05 12:40:02 -07:00
cuiziwei
7c8bb8c293 nuttx/tls: Remove the max key limiatation in task_tls_alloc and pthread_key_create
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-05 06:33:49 -07:00
yinshengkai
a6fcb0a5a9 fs: add pipe type support to inode
Both the device and the pipe used the FSNODEFLAG_TYPE_DRIVER type before,
and now add an independent pipe type

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-05 06:32:50 -07:00
Xiang Xiao
1dfcdaad84 noteram: Remove the unnessary inclusion and declaration from header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-04 19:24:08 -03:00
yinshengkai
08c4ac133b sched/cpuload: add SCHED_CPULOAD_OSCLK option
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-04 10:58:54 -07:00
yinshengkai
72de29422a drivers/noteram: noteram support multiple instances
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-04 06:48:48 -07:00
yinshengkai
3ab4d4a113 drivers/noteram: reduce global variable references
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-04 06:48:48 -07:00
Michal Lenc
a5fb83a5d3 ioexpander: define IOEXPANDER_OPTION_NONGENERIC option
This introduces non-generic option interface for IO expanders.
Some IO expanders have more advance options for pins and communication.
This is used to pass driver dependend structure to expander driver.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-08-04 05:54:24 -07:00
likun17
50fe301e8f fix SIM sensor rpmsg runtime error by asan report.
Signed-off-by: likun17 <likun17@xiaomi.com>
2023-08-04 04:20:45 -07:00
zhangyuan21
602d5974c8 usbdev: move usbdev_req function to common code
Move usbdev_req function to common code, Reduce duplicated code.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-03 22:46:25 -07:00
yangsen5
d8ca744052 drivers/video: video driver supports NV12
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-08-03 22:37:53 -07:00
makejian
775d9de30a crypto: export MD5/SHA1/SHA256/SHA512 via /dev/crypto
refer to commit 649dc2d985
(1) import hash method
(2) separate the update and finish processes

Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-03 22:37:30 -07:00
rongyichang
9e4a9fe32b drivers/fb: add fboverlay pandisplay & display area ioctl
1. support doublebuffer swtich for overlay layer
2. Add display area ioctl to scale the active area of the overlay layer
   to a specific region on the LCD through hardware.

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-03 10:57:14 -07:00
ligd
d313248a5b queue: add dq_inqueue & sq_inqueue support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-08-03 10:16:41 -07:00
Michal Lenc
0f6a5e50c4 ioexpander: add option to register GPIO by name for IOexpander
Function gpio_lower_half_byname() was added to support registration of
GPIO pin by name as supported for IOexpander. Some of the code is wrapped
in new static function gpio_lower_half_internal() to avoid code
duplication.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-08-03 07:02:12 -07:00
Michal Lenc
bf90361895 ioexpander: add support for pcf8575 expander
This adds support for 16 bit io expander pcf8575. The driver is basically
the same as for pcf8574 however it is for 16 bits instead of 8 bits. Since
pcf8575 and pcf8574 can be both used on the same i2c bus the driver for
pcf8575 is implemented in a different file to reduce the code size
and complexity and to have less if statements in the driver.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-08-03 06:52:27 -07:00
makejian
d5041420a3 crypto: porting Curve25519 algorithm into nuttx crypto
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-03 03:20:13 -07:00
zhangyuan21
3aa2aa4703 assert: add more information to panic notifier
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-03 03:17:22 -07:00
zhangyuan21
bfab486611 assert: add panic notifier data for notify more information
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-03 03:17:22 -07:00
yangjiao
bef756c004 fs/mqueue: Fix the wrong field type in mq_attr as the spec and add the logical judgment to deal with the condition when mq_maxmsg or mq_msgsize is less than zero or equal to zero.
In POSIX standard spec https://pubs.opengroup.org/onlinepubs/7908799/xsh/mqueue.h.html, the field type in mq_attr should be long not size_t. And no logical judgment when mq_maxmsg <= 0 or mq_msgsize <= 0. In this change, i update the field type in mq_attr, and add the missing logical judgment.

Signed-off-by: yangjiao <yangjiao@xiaomi.com>
2023-08-03 03:10:56 -07:00
Lee Lup Yuen
b2c1930825 serial/uart_16550: Wait before setting Line Control Register (Synopsys DesignWare 8250)
Some UART Controllers (Synopsys DesignWare 8250) will trigger spurious interrupts when the Line Control Register (LCR) is set while the UART is busy. This patch provides the option (16550_WAIT_LCR) to wait for UART until it's not busy, before setting the LCR. (16550_WAIT_LCR is disabled by default)

This patch fixes the spurious UART interrupts for the upcoming port of NuttX to StarFive JH7110 SoC (with Synopsys DesignWare 8250 UART). [The patch is explained here](https://lupyuen.github.io/articles/plic#appendix-fix-the-spurious-uart-interrupts)

drivers/serial/uart_16550.c: If 16550_WAIT_LCR is enabled, wait until UART is not busy before setting LCR

include/nuttx/serial/uart_16550.h: Define the UART Status Register (USR) for checking if UART is busy

drivers/serial/Kconfig-16550: Added option 16550_WAIT_LCR to 16550 UART Config, disabled by default
2023-08-03 08:38:07 +02:00
fangxinyong
43b0421b2a mm/map: limit the count of memory mapping for the task
No memory map count limit that will exhaust memory and cause
the system hang. Also that fix pass LTP posix case mmap/24-1.c

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-02 22:57:28 -07:00
fangxinyong
2bf434214e libc/sysconf: add _SC_REALTIME_SIGNALS
pass ltp case: open_posix_testsuite/conformance/interfaces/sigwait/7-1.c

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-02 22:57:28 -07:00
fangxinyong
da3a75da2c libc/net: compatible with Android for htonq/ntohq
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-02 22:47:29 -07:00
Bowen Wang
477602e657 mm_heap: mm dump and panic only valid for the heap own by OS
When other code use nuttx memory manager by call mm_xx api directly,
it better to let other code to control weather dump or panic when
malloc failed.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2023-08-02 06:11:59 -07:00
yangguangcai
05af311e68 qemu:add qemu rtc driver.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-02 03:27:55 -07:00
dongjiuzhu1
2945252b71 sensor/gps: support gps driver model
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-08-01 23:09:46 -07:00
dongjiuzhu1
1920ff31d3 libs/libc/gpsutils/minmea: move minmea library from apps/gpsutils
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-08-01 23:09:46 -07:00
dongjiuzhu1
f8ce0cd4ca fs/pseudofile: config pseudofile feature
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-31 22:22:58 -07:00
dongjiuzhu1
0f6d0eac52 fs/pesudofile: support pseudo-file operation
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-31 22:22:58 -07:00
Petro Karashchenko
effb0a1cad drivers: restore C89 compatibility by avoiding binary constants
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-31 18:56:40 -07:00
Petro Karashchenko
f3b5465969 drivers: remove redundant parentheses
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-31 18:56:40 -07:00
yangyalei
f40eee50d6 pwd: Add initial implementation of getpwent
fix ltp sigqueue testcase crash in getpwent:
nsh> ltp_sigqueue_3_1
core dumped

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-07-31 07:50:10 -07:00
yangyalei
4ecff53e2c sigaltstack: Add initial implementation of sigaltstack
fix ltp testcase compile error:
ltp/testcases/open_posix_testsuite/conformance/definitions/signal_h/31-1-buildonly.c:16:13: \
error: ‘sigaltstack’ undeclared (first use in this function)
   16 |  dummyvar = sigaltstack;
      |             ^~~~~~~~~~~

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-07-31 07:50:10 -07:00
yangyalei
3721af647a Add _POSIX_THREAD_PRIORITY_SCHEDULING define
fix ltp_pthread_rwlock_rdlock_2_2 testcase error:
nsh> ltp_pthread_rwlock_rdlock_2_2
Posix Thread Execution Scheduling not supported

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-07-31 07:50:10 -07:00
yangyalei
700cc5ab90 single: add SS_ONSTACK and SS_DISABLE define
fix ltp_sigaltstack_6_1 testcase comile error:
iltp/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c:41:28: \
error: ‘SS_ONSTACK’ undeclared (first use in this function); did you mean ‘SA_ONSTACK’?
ltp/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c:41:28: \
error: ‘SS_DISABLE’ undeclared (first use in this function

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-07-31 07:50:10 -07:00
yangyalei
c33e6528b1 getrlimit: add RLIMIT_MEMLOCK define
add RLIMIT_MEMLOCK define, enable compile mmap/18-1.c.
ltp/testcases/open_posix_testsuite/conformance/interfaces/mmap/18-1.c:95:16: \
error: ‘RLIMIT_MEMLOCK’ undeclared (first use in this function); did you mean ‘RLIMIT_STACK’?

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-07-31 07:50:10 -07:00
yangyalei
fde8affe71 singal: add stack_t define
stack_t used by sigaltstack, make it compile sucess in sim.

Signed-off-by: yangyalei <yangyalei@xiaomi.com>

ltp: fix compile errors

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-07-31 07:50:10 -07:00