History log of /openbmc/obmc-console/ (Results 1 – 25 of 201)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
375786fc09-Feb-2025 Dan Zhang <zhdaniel@google.com>

Fix unexpected behavior in client_timeout() error handling

There are 4 places that call client_close(), 3 are in poller callback
function before return _REMOVE. The client_ringbuffer_poll() and
clie

Fix unexpected behavior in client_timeout() error handling

There are 4 places that call client_close(), 3 are in poller callback
function before return _REMOVE. The client_ringbuffer_poll() and
client_poll() both set the client->rbc = NULL or client->poller = NULL
correspondingly to avoid client_close() unregistering the poller within
poller callback. Because calling console_poller_unregister() within the
loop of console-sever.c:call_pollers() will make the loop writing into
freed poller, corrupting the memory and cause unexpected hehavior.

This fix is let the timeout callback follow the same pattern and avoid
calling console_poller_unregister() within call_pollers() loop.

Change-Id: If723a476d4142a42aa62e97ed0d2e2abca5e00c6
Signed-off-by: Dan Zhang <zhdaniel@google.com>

show more ...

a1f911aa01-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

meson: reformat with meson formatter

Apply the `meson format` results.

Change-Id: Ife939931ed265bc3f7eceda84a0e3db3bd1012de
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

7a76595603-Feb-2025 Andrew Jeffery <andrew@codeconstruct.com.au>

config.h: Include stddef.h for size_t

Address the following clang-tidy issue:

```
Error while processing .../obmc-console/config.h.
.../obmc-console/config.h:36:49: error: unknown type name 'size_t

config.h: Include stddef.h for size_t

Address the following clang-tidy issue:

```
Error while processing .../obmc-console/config.h.
.../obmc-console/config.h:36:49: error: unknown type name 'size_t' [clang-diagnostic-error]
36 | int config_parse_bytesize(const char *size_str, size_t *size);
| ^
```

Fixes: 1e04f449b7f0 ("use iniparser dependency for config file parsing")
Change-Id: I22adfc548d1f8837fda8920267a16e93c17c8475
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

4ec26bb129-Aug-2024 Igor Kononenko <i.kononenko.e@gmail.com>

obmc-console: fix segfault on missing config

The `obmc-console-client` allow to not specify configuration file for
active session. But at the same time it does not tolerate null pointer
passed as co

obmc-console: fix segfault on missing config

The `obmc-console-client` allow to not specify configuration file for
active session. But at the same time it does not tolerate null pointer
passed as config. This leads to a segmentation fault due to a missing
configuration file.

Fix this small inconvenience.

Added testcase to make sure that obmc-console-client doesn't segfault
when invoked without any arguments.

Output without the fix:
'''
+ /home/dev/obmc-console/build/obmc-console-client
+ grep Connection refused
Segmentation fault (core dumped)
'''

Output with the fix:
'''
+ /home/ninad/dev/1110_ghe/obmc-console/build/obmc-console-client
+ grep Connection refused
+ cleanup
+ cd -
+ rm -rf /tmp/test_console_client_no_args_3245394.DZqk0S
'''

Change-Id: Ia83da8bca30e2be94e00066f20f2cbe2ccba23b6
Tested-by: Ninad Palsule <ninad@linux.ibm.com>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Signed-off-by: Igor Kononenko <i.kononenko.e@gmail.com>

show more ...

366651d922-Aug-2024 Marshall Zhan <marshall.zhan.wiwynn@gmail.com>

log-handler: Set the end of the file as the file size

The file descriptor is lost after system AC cycle.
The log file will grow indefinitely if the log recorded does not exceed
the maximum log size

log-handler: Set the end of the file as the file size

The file descriptor is lost after system AC cycle.
The log file will grow indefinitely if the log recorded does not exceed
the maximum log size after each AC cycle.

Change-Id: If23d68b08817d54731dd6eff8a42e9eb476b6437
Fixes: 46d9ef298f2e ("Do not truncate log files after reboot")
Signed-off-by: Marshall Zhan <marshall.zhan.wiwynn@gmail.com>

show more ...

6498f9fa13-Sep-2024 Alexander Hansen <alexander.hansen@9elements.com>

log-handler: fix console logs

server->n_consoles was not incremented until after console_init.

But the log handler already made use of that value to decide which
filename to use for logging, in the

log-handler: fix console logs

server->n_consoles was not incremented until after console_init.

But the log handler already made use of that value to decide which
filename to use for logging, in the case of config with no sections.

This fix avoids use of server->n_consoles in favor of looking at the
number of sections in the config.

Change-Id: Ic19802808197557cd1f632c63a0123604a619039
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

b965c22016-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I2f8eeee40b0b2583092d351979dd77fd277a97ba
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

85055f9905-Aug-2024 George Liu <liuxiwei@ieisystem.com>

docs/mux-support.md: Fix MD014 warnings

The following warnings are generated by using markdownlint analysis:
```
MD014/commands-show-output Dollar signs used before commands without showing output [

docs/mux-support.md: Fix MD014 warnings

The following warnings are generated by using markdownlint analysis:
```
MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ obmc-console-server --config..."]
```
Refer to markdown-lint [1] to fix MD014
[1]: https://github.com/updownpress/markdown-lint/blob/master/rules/014-commands-show-output.md

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I9daa0403355e45bf39410ccf92693bdccf1830c4

show more ...

ce3688c905-Aug-2024 George Liu <liuxiwei@ieisystem.com>

docs/mux-support.md: Fix MD040 warnings

The following warnings are generated by using markdownlint analysis:
```
MD040/fenced-code-language Fenced code blocks should have a language specified [Conte

docs/mux-support.md: Fix MD040 warnings

The following warnings are generated by using markdownlint analysis:
```
MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
```
Refer to markdown-lint [1] to fix MD040
[1]: https://github.com/updownpress/markdown-lint/blob/master/rules/040-fenced-code-language.md

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I67875268370268715241c0ddb2c58da4a9a3f54f

show more ...

97e7e51e02-Aug-2024 Alexander Hansen <alexander.hansen@9elements.com>

test: multiple consoles

Change-Id: Ib7e63eb9b5a9c000ad7548115e46517b8b0bfc92
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.

test: multiple consoles

Change-Id: Ib7e63eb9b5a9c000ad7548115e46517b8b0bfc92
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

c7602e0a02-Aug-2024 Alexander Hansen <alexander.hansen@9elements.com>

test: console socket write

Change-Id: I77ba9168f5b363f7e776d54eb143a716544b5bb5
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.c

test: console socket write

Change-Id: I77ba9168f5b363f7e776d54eb143a716544b5bb5
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

e11cca1e02-Aug-2024 Alexander Hansen <alexander.hansen@9elements.com>

test: console socket read

Change-Id: Ic7c2035640db4e403afe9db01a33ccb532d195d6
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.co

test: console socket read

Change-Id: Ic7c2035640db4e403afe9db01a33ccb532d195d6
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

a30b765902-Aug-2024 Alexander Hansen <alexander.hansen@9elements.com>

test: console-client can write

Change-Id: Iffc38fb78ebbf79f8a0bdd7cd0b8cbc5916768cc
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstru

test: console-client can write

Change-Id: Iffc38fb78ebbf79f8a0bdd7cd0b8cbc5916768cc
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

12bf483b02-Aug-2024 Alexander Hansen <alexander.hansen@9elements.com>

test: console-client can read

Change-Id: I08c7523af548968c1545189c0007f44144589aec
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruc

test: console-client can read

Change-Id: I08c7523af548968c1545189c0007f44144589aec
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

29a8f98930-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

test: console logs to file

Test for the logging feature of obmc-console-server.

Change-Id: I9836727a944a0351962133baa2fd2ff5eb60e67f
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Sign

test: console logs to file

Test for the logging feature of obmc-console-server.

Change-Id: I9836727a944a0351962133baa2fd2ff5eb60e67f
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

3ff250d708-Aug-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

changelog: List UART mux support and iniparser dependency

UART mux support is a notable feature. Make sure users can be aware
of it.

Change-Id: I26ae052f5b64d4eaaea1f814bfddf9632739f2c7
Signed-off-

changelog: List UART mux support and iniparser dependency

UART mux support is a notable feature. Make sure users can be aware
of it.

Change-Id: I26ae052f5b64d4eaaea1f814bfddf9632739f2c7
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

13d3aa7505-Aug-2024 George Liu <liuxiwei@ieisystem.com>

docs/mux-support.md: README.md: Fix MD041 warnings

The following warnings are generated by using markdownlint analysis:
```
docs/mux-support.md:1 MD041/first-line-heading/first-line-h1 First line in

docs/mux-support.md: README.md: Fix MD041 warnings

The following warnings are generated by using markdownlint analysis:
```
docs/mux-support.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Mux Support"]
```
Refer to markdown-lint [1] to fix MD041
[1]: https://github.com/updownpress/markdown-lint/blob/master/rules/041-first-line-h1.md

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: Id2dc44fd63b40492a67965c4a51aceeb67b9307d

show more ...

289e647905-Aug-2024 George Liu <liuxiwei@ieisystem.com>

README.md: Fix MD041 warnings

The following warnings are generated by using markdownlint analysis:
```
README.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level h

README.md: Fix MD041 warnings

The following warnings are generated by using markdownlint analysis:
```
README.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## To Build"]
```
Refer to markdown-lint [1] to fix MD041
[1]: https://github.com/updownpress/markdown-lint/blob/master/rules/041-first-line-h1.md

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I561d1b2950153f2b26bddbf9d1888a02016d4722

show more ...

86f6f61905-Aug-2024 George Liu <liuxiwei@ieisystem.com>

README.md: Fix MD040 warnings

The following warnings are generated by using markdownlint analysis:
```
README.md:5 MD040/fenced-code-language Fenced code blocks should have a language specified [Con

README.md: Fix MD040 warnings

The following warnings are generated by using markdownlint analysis:
```
README.md:5 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:12 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:20 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:29 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:40 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:78 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
```
Refer to markdown-lint [1] to fix MD040
[1]: https://github.com/updownpress/markdown-lint/blob/master/rules/040-fenced-code-language.md

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: Ibb0ba5ad26c7b362258dad92acad48ea10cae9a2

show more ...

8fee424206-Jun-2024 Alexander Hansen <alexander.hansen@9elements.com>

UART Mux Support: Documentation

This commit adds markdown documentation of how uart-mux support is
implemented in obmc-console. The supported hardware configuration and
example config files are show

UART Mux Support: Documentation

This commit adds markdown documentation of how uart-mux support is
implemented in obmc-console. The supported hardware configuration and
example config files are shown.

Change-Id: I19cd3de0f9cb6b98742fc264c4e2963c06ff9db1
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

a6b2910410-Jul-2024 Alexander Hansen <alexander.hansen@9elements.com>

console-server: Add UART Mux Support

This commit adds support for uart-muxes which can be controlled via
gpios.

Change-Id: I91a4de1962554adf4302a2a59d2b371f492dc21d
Signed-off-by: Alexander Hansen

console-server: Add UART Mux Support

This commit adds support for uart-muxes which can be controlled via
gpios.

Change-Id: I91a4de1962554adf4302a2a59d2b371f492dc21d
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

312ecdc210-Jul-2024 Alexander Hansen <alexander.hansen@9elements.com>

console-server: Enable multiple consoles

obmc-console can now support multiple consoles that can be configured.

The first console is the active console, if not configured otherwise.

This serves as

console-server: Enable multiple consoles

obmc-console can now support multiple consoles that can be configured.

The first console is the active console, if not configured otherwise.

This serves as preparation for uart mux support.

Change-Id: I6f350b8efe70c3b424bdadaa3fe1bbf89d310e5d
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

2325d5d507-Jun-2024 Alexander Hansen <alexander.hansen@9elements.com>

console-server: refactor pollfd management

Instead of the previous memory management of pollfd array,
with a fixed and flexible part and hardcoded indices,
provide two functions to request and relea

console-server: refactor pollfd management

Instead of the previous memory management of pollfd array,
with a fixed and flexible part and hardcoded indices,
provide two functions to request and release pollfds.

- console_server_request_pollfd
- console_server_release_pollfd

The pollfds are still in the same array but can be requested and
released by these functions now. struct console_server and
struct console now contain indices into that array of pollfds.

The benefit of this contribution is that the new interface provides a
clean allocator-like abstraction for requesting and releasing pollfds,
which will scale to multiple consoles and can be refactored or
unit-tested more easily in the future.

The previous implementation was tightly coupled to the single-console
use-case and the pollfds stored at hardcoded indices.

Change-Id: I93226699618130b175bffbeb4f71c20c91a7083a
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

e3a083eb08-Jul-2024 Alexander Hansen <alexander.hansen@9elements.com>

config: support sections in config_ api

This commit wraps some functions from iniparser to support sections in
our config files.

The new functions become part of the config_* api and will help to
s

config: support sections in config_ api

This commit wraps some functions from iniparser to support sections in
our config files.

The new functions become part of the config_* api and will help to
support the uart mux feature.

Change-Id: I7fa9aa1d60b67458943d5c53a1aeb90406c5fcf3
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

c2b0d8c707-Jun-2024 Alexander Hansen <alexander.hansen@9elements.com>

console-server: introduce `struct console_server`

Lift `struct console_server` from `struct console`

struct console_server will enable obmc-console to support multiple
consoles in a single obmc-con

console-server: introduce `struct console_server`

Lift `struct console_server` from `struct console`

struct console_server will enable obmc-console to support multiple
consoles in a single obmc-console-server in the future.

Currently the 'struct console_server' only supports one active console.

Change-Id: Icb22fb46f217b174f3bccc0a03485549d82d1d6b
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

123456789